Class ConfigParams
- java.lang.Object
-
- org.apache.manifoldcf.core.interfaces.Configuration
-
- org.apache.manifoldcf.core.interfaces.ConfigParams
-
- All Implemented Interfaces:
IHierarchyParent
public class ConfigParams extends Configuration
This class represents a set of configuration parameters, with structure, which is a generalized hierarchy of nodes that can be interpreted by a repository or authority connector in an appropriate way.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.manifoldcf.core.interfaces.Configuration
Configuration.JSONReader, Configuration.JSONWriter
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String_rcsidprotected static java.lang.StringATTR_NAMEprotected static java.lang.StringPARAMETER_TYPEThe parameter type nodeprotected java.util.Map<java.lang.String,java.lang.String>params-
Fields inherited from class org.apache.manifoldcf.core.interfaces.Configuration
children, JSON_ATTRIBUTE, JSON_CHILDREN, JSON_TYPE, JSON_VALUE, readOnly, rootNodeLabel
-
-
Constructor Summary
Constructors Constructor Description ConfigParams()Constructor.ConfigParams(java.io.InputStream xmlstream)Construct from XML.ConfigParams(java.lang.String xml)Construct from XML.ConfigParams(java.util.Map<java.lang.String,java.lang.String> map)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddOuterNode(ConfigurationNode node)Note the addition of a new outer node.protected voidclearOuterNodes()Note the removal of all outer nodes.protected ConfigurationcreateNew()Create a new object of the appropriate class.protected ConfigurationNodecreateNewNode(java.lang.String type)Create a new child node of the appropriate type and class.ConfigParamsduplicate()Duplicate.ConfigNodegetChild(int index)Get child node.java.lang.StringgetObfuscatedParameter(java.lang.String key)Get an obfuscated parameter value.java.lang.StringgetParameter(java.lang.String key)Get a parameter value.java.util.IteratorlistParameters()List parameters.protected voidremoveOuterNode(ConfigurationNode node)Note the removal of an outer node.voidsetObfuscatedParameter(java.lang.String key, java.lang.String value)Set an obfuscated parameter.voidsetParameter(java.lang.String key, java.lang.String value)Set a parameter value.-
Methods inherited from class org.apache.manifoldcf.core.interfaces.Configuration
addChild, clearChildren, createDuplicate, equals, findChild, fromJSON, fromXML, fromXML, getChildCount, hashCode, initializeFromDoc, makeReadOnly, processObject, processObject, readNode, readNode, removeChild, toJSON, toString, toXML, writeNode, writeNode
-
-
-
-
Field Detail
-
_rcsid
public static final java.lang.String _rcsid
- See Also:
- Constant Field Values
-
PARAMETER_TYPE
protected static final java.lang.String PARAMETER_TYPE
The parameter type node- See Also:
- Constant Field Values
-
ATTR_NAME
protected static final java.lang.String ATTR_NAME
- See Also:
- Constant Field Values
-
params
protected java.util.Map<java.lang.String,java.lang.String> params
-
-
Constructor Detail
-
ConfigParams
public ConfigParams()
Constructor.
-
ConfigParams
public ConfigParams(java.util.Map<java.lang.String,java.lang.String> map)
Constructor.- Parameters:
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.
-
ConfigParams
public ConfigParams(java.lang.String xml) throws ManifoldCFExceptionConstruct from XML.- Parameters:
xml- is the input XML.- Throws:
ManifoldCFException
-
ConfigParams
public ConfigParams(java.io.InputStream xmlstream) throws ManifoldCFExceptionConstruct from XML.- Parameters:
xmlstream- is the input XML stream. Does NOT close the stream.- Throws:
ManifoldCFException
-
-
Method Detail
-
createNew
protected Configuration createNew()
Create a new object of the appropriate class.- Overrides:
createNewin classConfiguration- Returns:
- the newly-created configuration object.
-
createNewNode
protected ConfigurationNode createNewNode(java.lang.String type)
Create a new child node of the appropriate type and class.- Overrides:
createNewNodein classConfiguration- Returns:
- the newly-created node.
-
clearOuterNodes
protected void clearOuterNodes()
Note the removal of all outer nodes.- Overrides:
clearOuterNodesin classConfiguration
-
addOuterNode
protected void addOuterNode(ConfigurationNode node)
Note the addition of a new outer node.- Overrides:
addOuterNodein classConfiguration- Parameters:
node- is the node that was just read.
-
removeOuterNode
protected void removeOuterNode(ConfigurationNode node)
Note the removal of an outer node.- Overrides:
removeOuterNodein classConfiguration- Parameters:
node- is the node that was just removed.
-
getParameter
public java.lang.String getParameter(java.lang.String key)
Get a parameter value.- Parameters:
key- is the name of the parameter.- Returns:
- the value.
-
getObfuscatedParameter
public java.lang.String getObfuscatedParameter(java.lang.String key)
Get an obfuscated parameter value.- Parameters:
key- is the name of the parameter.- Returns:
- the unobfuscated value.
-
setParameter
public void setParameter(java.lang.String key, java.lang.String value)Set a parameter value.- Parameters:
key- is the name of the parameter.value- is the new value, or null if we should delete the value.
-
setObfuscatedParameter
public void setObfuscatedParameter(java.lang.String key, java.lang.String value)Set an obfuscated parameter.- Parameters:
key- is the name of the parameter.value- is the unobfuscated new value, or null if delete request.
-
listParameters
public java.util.Iterator listParameters()
List parameters.
-
duplicate
public ConfigParams duplicate()
Duplicate.- Returns:
- an exact duplicate
-
getChild
public ConfigNode getChild(int index)
Get child node.- Parameters:
index- is the node number.- Returns:
- the node.
-
-