|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.kuali.rice.core.config.ConfigParserImpl
public class ConfigParserImpl
ConfigParser implementation that supports a hierarchy of configs, in which configs can include other configs. Variable tokens are resolved at parse time, in the order in which they are encountered. This class relies on Spring for resource loading and Apache Commons Lang for variable replacement.
Field Summary | |
---|---|
static String |
ALTERNATE_BUILD_LOCATION_KEY
|
Constructor Summary | |
---|---|
ConfigParserImpl()
|
Method Summary | |
---|---|
protected int |
generateRandomInteger(String rangeSpec)
Generates a random integer in the range specified by the specifier, in the format: min-max |
protected void |
getNodeValue(String name,
String location,
Node n,
StringBuilder sb)
|
protected void |
parse(LinkedHashMap<String,Object> params,
String[] locations)
Parses a list of locations |
protected void |
parse(LinkedHashMap<String,Object> params,
String location,
org.apache.commons.lang.text.StrSubstitutor subs,
int depth)
Parses a single config location |
void |
parse(Map props,
String[] locations)
Parses config file resources |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String ALTERNATE_BUILD_LOCATION_KEY
Constructor Detail |
---|
public ConfigParserImpl()
Method Detail |
---|
public void parse(Map props, String[] locations) throws IOException
ConfigParser
parse
in interface ConfigParser
locations
- an array of file or classpath config resources
IOException
org.kuali.rice.core.config.ConfigParser#parse(java.lang.String[])
protected void parse(LinkedHashMap<String,Object> params, String[] locations) throws IOException
params
- the current parameter maplocations
- a list of locations to parse
IOException
protected void parse(LinkedHashMap<String,Object> params, String location, org.apache.commons.lang.text.StrSubstitutor subs, int depth) throws IOException
params
- the current parameter maplocation
- the location to parsesubs
- a StrSubstitutor used to substitute variable tokens
IOException
protected int generateRandomInteger(String rangeSpec)
rangeSpec
- a range specification, 'min-max'
protected void getNodeValue(String name, String location, Node n, StringBuilder sb) throws IOException
name
- name of the nodelocation
- config file locationn
- the nodesb
- a StringBuilder into which to set contents of the node, preserving any XML content
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |