Class 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.
    • Field Detail

      • PARAMETER_TYPE

        protected static final java.lang.String PARAMETER_TYPE
        The parameter type node
        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.io.InputStream xmlstream)
                     throws ManifoldCFException
        Construct 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:
        createNew in class Configuration
        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:
        createNewNode in class Configuration
        Returns:
        the newly-created node.
      • clearOuterNodes

        protected void clearOuterNodes()
        Note the removal of all outer nodes.
        Overrides:
        clearOuterNodes in class Configuration
      • addOuterNode

        protected void addOuterNode​(ConfigurationNode node)
        Note the addition of a new outer node.
        Overrides:
        addOuterNode in class Configuration
        Parameters:
        node - is the node that was just read.
      • 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.