public class ApplicationJSONReader extends Object
Application using a Reader instance.| Modifier and Type | Field and Description |
|---|---|
protected String |
exceptionPrefix
Exception prefix containing the location (if set)
|
protected String |
location
The optional location.
|
| Modifier and Type | Method and Description |
|---|---|
protected List<org.apache.sling.feature.Configuration> |
addConfigurations(Map<String,Object> map,
org.apache.sling.feature.Artifact artifact,
org.apache.sling.feature.Configurations container) |
protected void |
checkType(String key,
Object val,
Class<?>... types)
Check if the value is one of the provided types
|
protected Map<String,Object> |
getJsonMap(javax.json.JsonObject json)
Get the JSON object as a map, removing all comments that start with a '#' character
|
protected String |
getProperty(Map<String,Object> map,
String key) |
protected Object |
handleLaunchVars(Object val)
Substitutes variables that need to be substituted at launch time.
|
protected Object |
handleResolveVars(Object val)
Substitutes variables that need to be specified before the resolver executes.
|
protected String |
minify(Reader reader) |
static org.apache.sling.feature.Application |
read(Reader reader)
Read a new application from the reader
The reader is not closed.
|
protected void |
readArtifacts(String section,
String artifactType,
List<org.apache.sling.feature.Artifact> artifacts,
Object listObj,
org.apache.sling.feature.Configurations container) |
protected void |
readBundles(Map<String,Object> map,
org.apache.sling.feature.Bundles container,
org.apache.sling.feature.Configurations configContainer)
Read the bundles / start levels section
|
protected void |
readConfigurations(Map<String,Object> map,
org.apache.sling.feature.Configurations container) |
protected void |
readExtensions(Map<String,Object> map,
List<String> keywords,
org.apache.sling.feature.Extensions container,
org.apache.sling.feature.Configurations configContainer) |
protected void |
readFrameworkProperties(Map<String,Object> map,
org.apache.sling.feature.KeyValueMap container) |
protected final String location
protected final String exceptionPrefix
public static org.apache.sling.feature.Application read(Reader reader) throws IOException
reader - The reader for the featureIOException - If an IO errors occurs or the JSON is invalid.protected String minify(Reader reader) throws IOException
IOExceptionprotected Map<String,Object> getJsonMap(javax.json.JsonObject json)
json - The JSON object to processprotected String getProperty(Map<String,Object> map, String key) throws IOException
IOExceptionprotected void readBundles(Map<String,Object> map, org.apache.sling.feature.Bundles container, org.apache.sling.feature.Configurations configContainer) throws IOException
map - The map describing the featurecontainer - The bundles containerconfigContainer - The configurations containerIOException - If the json is invalid.protected void readArtifacts(String section, String artifactType, List<org.apache.sling.feature.Artifact> artifacts, Object listObj, org.apache.sling.feature.Configurations container) throws IOException
IOExceptionprotected Object handleResolveVars(Object val)
val - The value that may contain a variable.protected Object handleLaunchVars(Object val)
val - The value that may contain a variable.protected List<org.apache.sling.feature.Configuration> addConfigurations(Map<String,Object> map, org.apache.sling.feature.Artifact artifact, org.apache.sling.feature.Configurations container) throws IOException
IOExceptionprotected void readConfigurations(Map<String,Object> map, org.apache.sling.feature.Configurations container) throws IOException
IOExceptionprotected void readFrameworkProperties(Map<String,Object> map, org.apache.sling.feature.KeyValueMap container) throws IOException
IOExceptionprotected void readExtensions(Map<String,Object> map, List<String> keywords, org.apache.sling.feature.Extensions container, org.apache.sling.feature.Configurations configContainer) throws IOException
IOExceptionprotected void checkType(String key, Object val, Class<?>... types) throws IOException
key - A key for the error messageval - The value to checktypes - The allowed typesIOException - If the val is not of the specified typesCopyright © 2007–2018 The Apache Software Foundation. All rights reserved.