public class ConfigParams extends Configuration
Modifier and Type | Field and Description |
---|---|
static String |
_rcsid |
protected static String |
ATTR_NAME |
protected static String |
PARAMETER_TYPE
The parameter type node
|
protected Map<String,String> |
params |
children, JSON_ATTRIBUTE, JSON_CHILDREN, JSON_TYPE, JSON_VALUE, readOnly, rootNodeLabel
Constructor and Description |
---|
ConfigParams()
Constructor.
|
ConfigParams(InputStream xmlstream)
Construct from XML.
|
ConfigParams(Map<String,String> map)
Constructor.
|
ConfigParams(String xml)
Construct from XML.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addOuterNode(ConfigurationNode node)
Note the addition of a new outer node.
|
protected void |
clearOuterNodes()
Note the removal of all outer nodes.
|
protected Configuration |
createNew()
Create a new object of the appropriate class.
|
protected ConfigurationNode |
createNewNode(String type)
Create a new child node of the appropriate type and class.
|
ConfigParams |
duplicate()
Duplicate.
|
ConfigNode |
getChild(int index)
Get child node.
|
String |
getObfuscatedParameter(String key)
Get an obfuscated parameter value.
|
String |
getParameter(String key)
Get a parameter value.
|
Iterator |
listParameters()
List parameters.
|
protected void |
removeOuterNode(ConfigurationNode node)
Note the removal of an outer node.
|
void |
setObfuscatedParameter(String key,
String value)
Set an obfuscated parameter.
|
void |
setParameter(String key,
String value)
Set a parameter value.
|
addChild, clearChildren, createDuplicate, equals, findChild, fromJSON, fromXML, fromXML, getChildCount, hashCode, initializeFromDoc, makeReadOnly, processObject, processObject, readNode, readNode, removeChild, toJSON, toString, toXML, writeNode, writeNode
public static final String _rcsid
protected static final String PARAMETER_TYPE
protected static final String ATTR_NAME
public ConfigParams()
public ConfigParams(Map<String,String> map)
map
- is the initialized (mutable) map describing the name/value configuration parameters.
This method of setting up a ConfigParams object will go away when the parameters are all in XML.public ConfigParams(String xml) throws ManifoldCFException
xml
- is the input XML.ManifoldCFException
public ConfigParams(InputStream xmlstream) throws ManifoldCFException
xmlstream
- is the input XML stream. Does NOT close the stream.ManifoldCFException
protected Configuration createNew()
createNew
in class Configuration
protected ConfigurationNode createNewNode(String type)
createNewNode
in class Configuration
protected void clearOuterNodes()
clearOuterNodes
in class Configuration
protected void addOuterNode(ConfigurationNode node)
addOuterNode
in class Configuration
node
- is the node that was just read.protected void removeOuterNode(ConfigurationNode node)
removeOuterNode
in class Configuration
node
- is the node that was just removed.public String getParameter(String key)
key
- is the name of the parameter.public String getObfuscatedParameter(String key)
key
- is the name of the parameter.public void setParameter(String key, String value)
key
- is the name of the parameter.value
- is the new value, or null if we should
delete the value.public void setObfuscatedParameter(String key, String value)
key
- is the name of the parameter.value
- is the unobfuscated new value, or null if delete request.public Iterator listParameters()
public ConfigParams duplicate()
public ConfigNode getChild(int index)
index
- is the node number.