Interface BaseConfiguration

    • Method Summary

      All Methods Instance Methods Abstract Methods Deprecated Methods 
      Modifier and Type Method Description
      void addListener​(MetamergeConfigChangeListener listener)
      Registers an object to be notified of change events in this object.
      boolean detachFromParent()
      This method removes this objects from its parent container.
      boolean flatten​(java.util.List<java.lang.String> excludedNS)
      flatten - combines all values from this object and its inherited objects into one single config object.
      void fromEntry​(java.lang.Object entry)
      This method populates this object's internal data with the data from a Entry object.
      boolean getBooleanParameter​(java.lang.Object name, boolean defval)
      Converts value from getParameter call to a boolean
      BaseConfiguration getChild​(java.lang.Object name)  
      BaseConfiguration getChildForPath​(java.lang.String path)
      This method traverses the child hierarchy (from the top) and returns the configuration object associated with the path.
      java.util.List<java.lang.String> getChildNames()
      Returns a list of names for all child configuration object
      java.lang.Object getClone()  
      java.util.TreeMap getData()
      Returns a TreeMap with key/value pairs for all local parameters.
      java.util.Iterator<java.lang.String> getDataIterator()
      Returns an Iterator for the keys in the data object.
      boolean getDebug()
      Returns the debug flag for the object.
      boolean getDebug​(boolean defval)
      Returns the debug flag for the object.
      boolean getDebugBreak​(boolean defval)
      Gets the debugBreak attribute of the BaseConfiguration object.
      boolean getEnabled()
      Gets the enabled attribute of the BaseConfiguration object.
      int getFlags()
      Returns the flags which determines how the getParameter behaves in terms of inheritance and external properties.
      BaseConfiguration getInheritsFrom()
      Returns the object from which this object inherits data.
      java.lang.String getInheritsFromRef()
      Gets the name of the object this object should inherit its values.
      int getIntegerParameter​(java.lang.Object name, int defval)
      Converts value from getParameter call to an int
      java.util.List<java.lang.String> getKeys​(int level)
      Gets the keys attribute of the BaseConfiguration object
      boolean getLogEnabled()
      Gets the log enabled attribute of the BaseConfiguration object.
      MetamergeConfig getMetamergeConfig()
      Gets the MetamergeConfig object to which this object belongs.
      boolean getModified()
      Modified state
      long getModTS()
      Returns the last time this BaseConfiguration was changed.
      javax.naming.Name getName()
      The object's full name
      java.lang.Object getNamespace()
      Gets the namespace attribute of the BaseConfiguration object
      java.lang.String getNullBehavior()
      Gets the nullBehavior attribute of the BaseConfiguration object.
      java.lang.String getNullBehaviorValue()
      Gets the nullBehaviorValue attribute of the BaseConfiguration object.
      java.lang.String getNullDefinition()
      Gets the nullDefinition attribute of the BaseConfiguration object.
      java.lang.String getNullDefinitionValue()
      Gets the nullDefinitionValue attribute of the BaseConfiguration object.
      java.lang.Object getParameter​(java.lang.Object name)
      Returns the value for a given config item.
      java.lang.Object getParameter​(java.lang.Object name, java.lang.Object createValue)
      Gets the parameter attribute of the BaseConfiguration object.
      java.lang.Object getParameter​(java.lang.Object name, java.lang.Object createValue, java.util.List<java.lang.String> cref)
      Returns the value for a given config item.
      java.lang.String getParameterPropertySource​(java.lang.Object name)
      Returns the user property name for a parameter.
      java.lang.Object getParameterRaw​(java.lang.Object name)
      Returns the value for a given config item without expanding the property value.
      BaseConfiguration getParent()
      Returns the parent object to which this object belongs.
      java.lang.String getPath()
      Returns the complete path to this object.
      java.util.List<java.lang.String> getReferences​(java.util.List<java.lang.String> list)  
      java.lang.String getScript()
      Gets the script attribute of the BaseConfiguration object.
      java.lang.String getScriptEngine()
      Gets the ScriptEngine attribute of the BaseConfiguration object.
      java.lang.String getShortName()
      Gets the shortName attribute of the BaseConfiguration object.
      java.lang.String getStringParameter​(java.lang.Object name)
      Converts value from getParameter call to a string
      java.util.Map<java.lang.String,​java.lang.Object> getSubstitutionMap()  
      boolean getUseListeners()
      Deprecated.
      java.lang.String getUserComment()  
      boolean hasParameter​(java.lang.Object name)
      Returns true if parameter name is local to this object.
      void init()
      Called to initialize to object.
      boolean isExpression​(java.lang.Object parameter)  
      boolean isParameterLocal​(java.lang.Object name)
      Returns true if the parameter is local and false if the parameter does not exist either in this object or in any inherited object.
      boolean isProtectedParameter​(java.lang.String name)
      Returns true if this is a parameter that needs to be protected (a password)
      java.lang.String nameForChild​(BaseConfiguration config)
      Returns the name for a configuration object
      void notifyChange​(MetamergeConfigChange event)
      Signal a change event to listeners.
      void notifyChange​(java.lang.Object source, java.lang.Object key, int operation)
      Notifies listeners for a change event.
      void notifyChange​(java.lang.Object source, java.lang.Object key, int operation, java.lang.Object userObject)
      Notifies listeners for a change event.
      boolean reattachToParent​(int position)
      This method reattaches this object to its former parent.
      void removeListener​(MetamergeConfigChangeListener listener)
      Removes a listener from the notification list.
      void removeParameter​(java.lang.Object name)
      Removes a local parameter from this object.
      java.util.List<javax.naming.Binding> search​(java.lang.String text, int options, int sizelimit)
      Searches a configuration object and optionally its children for a specific key or value.
      java.util.List<javax.naming.Binding> search​(java.lang.String text, int options, int sizelimit, java.util.List<javax.naming.Binding> results)
      Searches a configuration object and optionally its children for a specific key or value.
      void setBooleanParameter​(java.lang.Object name, boolean value)
      Calls setParameter converting value to a Boolean object.
      void setChild​(java.lang.Object name, BaseConfiguration config)
      Associates a configuration object with a name in this configuration
      void setData​(java.util.TreeMap data)
      Sets the data to be used by this object.
      void setDebug​(boolean debug)
      Sets the debug flag for the object.
      void setDebugBreak​(boolean debug)
      Sets the debugBreak attribute of the BaseConfiguration object.
      void setEnabled​(boolean enabled)
      Sets the enabled attribute of the BaseConfiguration object.
      void setFlags​(int flags)
      Controls how the getParameter behaves in terms of inheritance and external properties.
      void setInheritsFrom​(BaseConfiguration inherit)
      Sets the object from which this object inherits data.
      void setInheritsFromRef​(java.lang.String ref)
      Sets the name of the object from which this object should inherit its values.
      void setIntegerParameter​(java.lang.Object name, int value)
      Calls setParameter converting value to an Integer object.
      void setLogEnabled​(boolean enabled)
      Sets the log enabled attribute of the BaseConfiguration object.
      void setMetamergeConfig​(MetamergeConfig mc)
      Sets the MetamergeConfig object to which this object belongs.
      void setModified​(boolean modified)
      Sets the modified attribute of the BaseConfiguration object
      void setModTS​(long time)
      Sets the last time this BaseConfiguration was changed For internal use.
      void setName​(java.lang.String name)
      Sets the name attribute of the BaseConfiguration object
      void setName​(javax.naming.Name name)
      Sets the name attribute of the BaseConfiguration object
      void setNullBehavior​(java.lang.String nb)
      Sets the nullBehavior attribute of the BaseConfiguration object.
      void setNullBehaviorValue​(java.lang.String nbv)
      Sets the nullBehaviorValue attribute of the BaseConfiguration object.
      void setNullDefinition​(java.lang.String nb)
      Sets the nullDefinition attribute of the BaseConfiguration object.
      void setNullDefinitionValue​(java.lang.String nbv)
      Sets the nullDefinitionValue attribute of the BaseConfiguration object.
      void setParameter​(java.lang.Object name, java.lang.Object value)
      Sets the value for a given config item
      void setParameter​(java.lang.Object name, java.lang.Object value, boolean notify)
      Sets the value for a given config item, optionally notifying the change.
      void setParameterPropertySource​(java.lang.Object name, java.lang.String propertySource)
      Sets the user property name to use for an attribute.
      void setParent​(BaseConfiguration parent)
      Sets the parent object to which this object belongs.
      void setProtectedParameter​(java.lang.Object name, java.lang.Object value)
      Stores the parameter value in the default password store if one is configured.
      void setProtectedParameter​(java.lang.String name)
      Marks a parameter as needing protection (a password)
      void setScript​(java.lang.String script)
      Sets the script attribute of the BaseConfiguration object.
      void setScriptEngine​(java.lang.String engine)
      Sets the ScriptEngine attribute of the BaseConfiguration object.
      void setStringParameter​(java.lang.Object name, java.lang.String value)
      Calls setParameter.
      void setSubstitutionMap​(java.util.Map<java.lang.String,​java.lang.Object> map)
      Sets the substitution map for this configuration object.
      void setupInheritanceChain()
      Called to initialize the inheritance chain for this object.
      void setUseListeners​(boolean value)
      Deprecated.
      void setUserComment​(java.lang.String comment)
      Sets the user defined comment string.
      int size()
      Number of key/value pairs.
      java.lang.Object toEntry()
      This method returns a Entry object constructed from the internal data structure.
      void updateInheritsFrom​(java.lang.String ref)
      Sets the name of the object from which this object should inherit its values and calls the setupInheritanceChain to activate the change.
      boolean willFlatten​(java.util.List<java.lang.String> excludedNS)  
    • Field Detail

      • INHERIT_NONE

        static final java.lang.String INHERIT_NONE
        Explicitly disregards inheritance
        See Also:
        Constant Field Values
      • INHERIT_PARENT

        static final java.lang.String INHERIT_PARENT
        Inherit from parent
        See Also:
        Constant Field Values
      • SUBTREE

        static final int SUBTREE
        Return child entries's keys of this object
        See Also:
        Constant Field Values
      • RECURSIVE

        static final int RECURSIVE
        Flag that determines if getKeys() should recurse to inherited object
        See Also:
        Constant Field Values
      • RECURSIVE_SUBTREE

        static final int RECURSIVE_SUBTREE
        Convenience for RECURSIVE + SUBTREE
        See Also:
        Constant Field Values
      • RECURSIVE_ONELEVEL

        static final int RECURSIVE_ONELEVEL
        Convenience for RECURSIVE + ONE_LEVEL
        See Also:
        Constant Field Values
      • DISABLE_INHERITANCE

        static final int DISABLE_INHERITANCE
        Flag to disable inherited access (getParameter)
        See Also:
        Constant Field Values
      • DISABLE_EXTPROPS

        static final int DISABLE_EXTPROPS
        Flag to disable expansion of external properties (getParameter)
        See Also:
        Constant Field Values
      • CHILD_PATH_SEPARATOR

        static final char CHILD_PATH_SEPARATOR
        Separator between path components
        Since:
        7.0
        See Also:
        Constant Field Values
      • SEARCH_ONELEVEL

        static final int SEARCH_ONELEVEL
        Search option. Indicates that only keys of this object will be searched.
        See Also:
        Constant Field Values
      • SEARCH_EXACTCASE

        static final int SEARCH_EXACTCASE
        Search option. Indicates objects matching the exact case will be returned.
        See Also:
        Constant Field Values
      • SEARCH_REGEX

        static final int SEARCH_REGEX
        Search option. Indicates objects matching a given regular expression will be returned.
        See Also:
        Constant Field Values
      • SEARCH_PARAMNAME

        static final int SEARCH_PARAMNAME
        Search option. Indicates that the parameter name will be used as a value to search for.
        See Also:
        Constant Field Values
      • SEARCH_PROPERTY

        static final int SEARCH_PROPERTY
        Search option. Indicates that the user property name of the parameter or its value will be used as a value to search for.
        See Also:
        Constant Field Values
      • SEARCH_SUBSTRING

        static final int SEARCH_SUBSTRING
        Search option. Indicates that the value is checked for presence of the search string.
        See Also:
        Constant Field Values
      • SEARCH_PARAMNAME_RE

        static final int SEARCH_PARAMNAME_RE
        Search option. Convenience for SEARCH_PARAMNAME + SEARCH_REGEX.
        See Also:
        Constant Field Values
    • Method Detail

      • getName

        javax.naming.Name getName()
        The object's full name
        Returns:
        The name value
      • getShortName

        java.lang.String getShortName()
        Gets the shortName attribute of the BaseConfiguration object. The short name is the last component in a multi component name. E.g.: AssemblyLines/MyName --> "MyName"
        Returns:
        The shortName value
      • setName

        void setName​(javax.naming.Name name)
        Sets the name attribute of the BaseConfiguration object
        Parameters:
        name - The new name value
      • setName

        void setName​(java.lang.String name)
              throws java.lang.Exception
        Sets the name attribute of the BaseConfiguration object
        Parameters:
        name - The new name value
        Throws:
        java.lang.Exception - if the operation does not succeed
      • getNamespace

        java.lang.Object getNamespace()
        Gets the namespace attribute of the BaseConfiguration object
        Returns:
        The namespace value
      • getModified

        boolean getModified()
        Modified state
        Returns:
        The modified value
      • setModified

        void setModified​(boolean modified)
        Sets the modified attribute of the BaseConfiguration object
        Parameters:
        modified - The new modified value
      • setFlags

        void setFlags​(int flags)
        Controls how the getParameter behaves in terms of inheritance and external properties.
        Parameters:
        flags - new value for the flags
      • getFlags

        int getFlags()
        Returns the flags which determines how the getParameter behaves in terms of inheritance and external properties.
        Returns:
        value of the flags
      • getParameterRaw

        java.lang.Object getParameterRaw​(java.lang.Object name)
        Returns the value for a given config item without expanding the property value.
        Parameters:
        name - The parameter name
        Returns:
        The parameter value
      • getParameter

        java.lang.Object getParameter​(java.lang.Object name)
        Returns the value for a given config item. This method will call inherited object's getParameter if this object does not contain the named value. In case of returning an inherited value, the value from the inherited object will be cloned. It is up to the user to create a key/value local to this object by calling one of the setParameter methods.
        Parameters:
        name - The parameter name
        Returns:
        The parameter value
      • getParameter

        java.lang.Object getParameter​(java.lang.Object name,
                                      java.lang.Object createValue)
        Gets the parameter attribute of the BaseConfiguration object. If the parameter is not present a default value is assigned to the parameter using createValue.
        Parameters:
        name - The parameter name
        createValue - The value added to this object in case the parameter does not exist
        Returns:
        The parameter value
      • getParameter

        java.lang.Object getParameter​(java.lang.Object name,
                                      java.lang.Object createValue,
                                      java.util.List<java.lang.String> cref)
        Returns the value for a given config item. This method will call inherited object's getParameter if this object does not contain the named value. In case of returning an inherited value, the value from the inherited object will be cloned. It is up to the user to create a key/value local to this object by calling one of the setParameter methods.

        This method also conveys the List object to ParameterSubstitution calls to resolve circular references. If the parameter is not present even after calling inherited object's getParameter, a default value is assigned to the parameter using createValue.

        Parameters:
        name - The parameter name
        createValue - The value added to this object in case the parameter does not exist
        cref - The circular references list of previously used config object expressions
        Returns:
        The parameter value
      • getStringParameter

        java.lang.String getStringParameter​(java.lang.Object name)
        Converts value from getParameter call to a string
        Parameters:
        name - The parameter name
        Returns:
        The stringParameter value
      • getBooleanParameter

        boolean getBooleanParameter​(java.lang.Object name,
                                    boolean defval)
        Converts value from getParameter call to a boolean
        Parameters:
        name - The parameter name
        defval - The default value if parameter does not exist
        Returns:
        The boolean value
      • getIntegerParameter

        int getIntegerParameter​(java.lang.Object name,
                                int defval)
        Converts value from getParameter call to an int
        Parameters:
        name - The parameter name
        defval - The default value if parameter does not exist
        Returns:
        The integerParameter value
      • setParameter

        void setParameter​(java.lang.Object name,
                          java.lang.Object value)
        Sets the value for a given config item
        Parameters:
        name - Parameter name
        value - Parameter value
      • setProtectedParameter

        void setProtectedParameter​(java.lang.Object name,
                                   java.lang.Object value)
                            throws java.lang.Exception
        Stores the parameter value in the default password store if one is configured. Retrieval of the parameter is done through the standard getParameter methods.
        Parameters:
        name - Parameter name
        value - Parameter value
        Throws:
        java.lang.Exception - if error occurs while setting property to the property store chosen by TDIProperties object associated with this config
      • setBooleanParameter

        void setBooleanParameter​(java.lang.Object name,
                                 boolean value)
        Calls setParameter converting value to a Boolean object.
        Parameters:
        name - Parameter name
        value - Parameter value
      • setIntegerParameter

        void setIntegerParameter​(java.lang.Object name,
                                 int value)
        Calls setParameter converting value to an Integer object.
        Parameters:
        name - Parameter name
        value - Parameter value
      • setStringParameter

        void setStringParameter​(java.lang.Object name,
                                java.lang.String value)
        Calls setParameter.
        Parameters:
        name - Parameter name
        value - Parameter value
      • setParameter

        void setParameter​(java.lang.Object name,
                          java.lang.Object value,
                          boolean notify)
        Sets the value for a given config item, optionally notifying the change. If notify is true, the behavior is identical to setParameter( name, value ).
        Parameters:
        name - Parameter name
        value - Parameter value
        notify - If true, notify of the change.
        Since:
        6.1.1
      • removeParameter

        void removeParameter​(java.lang.Object name)
        Removes a local parameter from this object.
        Parameters:
        name - Parameter name
      • hasParameter

        boolean hasParameter​(java.lang.Object name)
        Returns true if parameter name is local to this object.
        Parameters:
        name - Parameter name
        Returns:
        true if name is local.
      • isParameterLocal

        boolean isParameterLocal​(java.lang.Object name)
        Returns true if the parameter is local and false if the parameter does not exist either in this object or in any inherited object.
        Parameters:
        name - Parameter name
        Returns:
        true if name is local; otherwise false.
      • getParameterPropertySource

        java.lang.String getParameterPropertySource​(java.lang.Object name)
        Returns the user property name for a parameter.
        Parameters:
        name - Parameter name
        Returns:
        The user property source value.
      • setParameterPropertySource

        void setParameterPropertySource​(java.lang.Object name,
                                        java.lang.String propertySource)
        Sets the user property name to use for an attribute.
        Parameters:
        name - Parameter name
        propertySource - User property name
      • size

        int size()
        Number of key/value pairs.
        Returns:
        A count of local items in this object.
      • getData

        java.util.TreeMap getData()
        Returns a TreeMap with key/value pairs for all local parameters.
        Returns:
        The TreeMap object.
      • setData

        void setData​(java.util.TreeMap data)
        Sets the data to be used by this object. The data is passed by a TreeMap object containing key/value pairs.

        Note: The TreeMap data is not cloned.

        Parameters:
        data - The new data value.
      • init

        void init()
           throws java.lang.Exception
        Called to initialize to object.
        Throws:
        java.lang.Exception - if the initialization fails.
      • getDataIterator

        java.util.Iterator<java.lang.String> getDataIterator()
        Returns an Iterator for the keys in the data object.
        Returns:
        The dataIterator value.
      • getKeys

        java.util.List<java.lang.String> getKeys​(int level)
        Gets the keys attribute of the BaseConfiguration object
        Parameters:
        level - The level of keys returned.
        Returns:
        The list of keys
      • getUseListeners

        @Deprecated
        boolean getUseListeners()
        Deprecated.
        Checks whether event listeners are used.
        Returns:
        true if event listeners are used; otherwise false.
      • setUseListeners

        @Deprecated
        void setUseListeners​(boolean value)
        Deprecated.
        Specifies whether event listeners are used.
        Parameters:
        value - true indicates using event listeners; false - not using
      • addListener

        void addListener​(MetamergeConfigChangeListener listener)
        Registers an object to be notified of change events in this object.
        Parameters:
        listener - The listener object to notify.
      • removeListener

        void removeListener​(MetamergeConfigChangeListener listener)
        Removes a listener from the notification list.
        Parameters:
        listener - The listener object to remove.
      • notifyChange

        void notifyChange​(java.lang.Object source,
                          java.lang.Object key,
                          int operation)
        Notifies listeners for a change event.

        Note: This method is typically called by setParameter method but not from user code.

        Parameters:
        source - The caller initiating the change event
        key - The key that changed
        operation - The operation performed on key
      • notifyChange

        void notifyChange​(java.lang.Object source,
                          java.lang.Object key,
                          int operation,
                          java.lang.Object userObject)
        Notifies listeners for a change event.

        Note: This method is typically called by setParameter method but not from user code.

        Parameters:
        source - The caller initiating the change event
        key - The key that changed
        operation - The operation performed on key
        userObject - Arbitrary object provided by caller
      • toEntry

        java.lang.Object toEntry()
                          throws java.lang.Exception
        This method returns a Entry object constructed from the internal data structure.
        Returns:
        The entry representing the internal data.
        Throws:
        java.lang.Exception - Any exception thrown by the implementing class.
      • fromEntry

        void fromEntry​(java.lang.Object entry)
                throws java.lang.Exception
        This method populates this object's internal data with the data from a Entry object.
        Parameters:
        entry - The entry containing data.
        Throws:
        java.lang.Exception - Any exception thrown by the implementing class.
      • setParent

        void setParent​(BaseConfiguration parent)
        Sets the parent object to which this object belongs. Many configuration objects are part of another object and cannot be addressed by the MetamergeConfig object. These objects should notify their parents of any changes made.
        Parameters:
        parent - The new parent value
      • getParent

        BaseConfiguration getParent()
        Returns the parent object to which this object belongs.
        Returns:
        The parent value.
      • setMetamergeConfig

        void setMetamergeConfig​(MetamergeConfig mc)
        Sets the MetamergeConfig object to which this object belongs.
        Parameters:
        mc - The new metamergeConfig object
      • getMetamergeConfig

        MetamergeConfig getMetamergeConfig()
        Gets the MetamergeConfig object to which this object belongs.
        Returns:
        The metamergeConfig object
      • setupInheritanceChain

        void setupInheritanceChain()
                            throws java.lang.Exception
        Called to initialize the inheritance chain for this object.
        Throws:
        java.lang.Exception - if the operation does not succeed
      • getInheritsFrom

        BaseConfiguration getInheritsFrom()
        Returns the object from which this object inherits data.
        Returns:
        The inherited object.
      • getInheritsFromRef

        java.lang.String getInheritsFromRef()
        Gets the name of the object this object should inherit its values.
        Returns:
        The name of the inherited object.
      • setInheritsFromRef

        void setInheritsFromRef​(java.lang.String ref)
        Sets the name of the object from which this object should inherit its values.
        Parameters:
        ref - The new inheritsFromRef value
      • updateInheritsFrom

        void updateInheritsFrom​(java.lang.String ref)
                         throws java.lang.Exception
        Sets the name of the object from which this object should inherit its values and calls the setupInheritanceChain to activate the change.
        Parameters:
        ref - The new inheritsFromRef value
        Throws:
        java.lang.Exception - if the operation does not succeed
      • setInheritsFrom

        void setInheritsFrom​(BaseConfiguration inherit)
        Sets the object from which this object inherits data.

        Note: Call this method to setup a temporary (non persistent) object for inheritance.

        Parameters:
        inherit - The new inheritsFrom value.
      • getDebug

        boolean getDebug()
        Returns the debug flag for the object.
        Returns:
        The debug value.
      • getDebug

        boolean getDebug​(boolean defval)
        Returns the debug flag for the object.
        Parameters:
        defval - The value to be returned, if the debug parameter cannot be found
        Returns:
        The debug value.
      • setDebug

        void setDebug​(boolean debug)
        Sets the debug flag for the object.
        Parameters:
        debug - The new debug value
      • getDebugBreak

        boolean getDebugBreak​(boolean defval)
        Gets the debugBreak attribute of the BaseConfiguration object.
        Parameters:
        defval - The value to be returned, if the debugBreak parameter cannot be found
        Returns:
        The debugBreak value.
      • setDebugBreak

        void setDebugBreak​(boolean debug)
        Sets the debugBreak attribute of the BaseConfiguration object.
        Parameters:
        debug - The new debugBreak value
      • getScript

        java.lang.String getScript()
        Gets the script attribute of the BaseConfiguration object.
        Returns:
        The script value.
      • setScript

        void setScript​(java.lang.String script)
        Sets the script attribute of the BaseConfiguration object.
        Parameters:
        script - The new script value
      • getScriptEngine

        java.lang.String getScriptEngine()
        Gets the ScriptEngine attribute of the BaseConfiguration object.
        Returns:
        The ScriptEngine value.
      • setScriptEngine

        void setScriptEngine​(java.lang.String engine)
        Sets the ScriptEngine attribute of the BaseConfiguration object.
        Parameters:
        engine - The new ScriptEngine value
      • getNullBehavior

        java.lang.String getNullBehavior()
        Gets the nullBehavior attribute of the BaseConfiguration object.
        Returns:
        The nullBehavior value.
      • getNullBehaviorValue

        java.lang.String getNullBehaviorValue()
        Gets the nullBehaviorValue attribute of the BaseConfiguration object.
        Returns:
        The nullBehaviorValue value.
      • setNullBehavior

        void setNullBehavior​(java.lang.String nb)
        Sets the nullBehavior attribute of the BaseConfiguration object.
        Parameters:
        nb - The new nullBehavior value
      • setNullBehaviorValue

        void setNullBehaviorValue​(java.lang.String nbv)
        Sets the nullBehaviorValue attribute of the BaseConfiguration object.
        Parameters:
        nbv - The new nullBehaviorValue value
      • getNullDefinition

        java.lang.String getNullDefinition()
        Gets the nullDefinition attribute of the BaseConfiguration object.
        Returns:
        The nullDefinition value.
      • getNullDefinitionValue

        java.lang.String getNullDefinitionValue()
        Gets the nullDefinitionValue attribute of the BaseConfiguration object.
        Returns:
        The nullDefinitionValue value.
      • setNullDefinition

        void setNullDefinition​(java.lang.String nb)
        Sets the nullDefinition attribute of the BaseConfiguration object.
        Parameters:
        nb - The new nullBehavior value
      • setNullDefinitionValue

        void setNullDefinitionValue​(java.lang.String nbv)
        Sets the nullDefinitionValue attribute of the BaseConfiguration object.
        Parameters:
        nbv - The new nullBehaviorValue value
      • getEnabled

        boolean getEnabled()
        Gets the enabled attribute of the BaseConfiguration object.
        Returns:
        The nullBehaviorValue value.
      • setEnabled

        void setEnabled​(boolean enabled)
        Sets the enabled attribute of the BaseConfiguration object.
        Parameters:
        enabled - true for enabling; false otherwise.
      • getClone

        java.lang.Object getClone()
                           throws java.lang.Exception
        Returns:
        a cloned version of this object.
        Throws:
        java.lang.Exception
      • getLogEnabled

        boolean getLogEnabled()
        Gets the log enabled attribute of the BaseConfiguration object.
        Returns:
        The nullBehaviorValue value.
      • setLogEnabled

        void setLogEnabled​(boolean enabled)
        Sets the log enabled attribute of the BaseConfiguration object.
        Parameters:
        enabled - true for enabled log; false otherwise.
      • setUserComment

        void setUserComment​(java.lang.String comment)
        Sets the user defined comment string.
        Parameters:
        comment - new value for user comment
      • getUserComment

        java.lang.String getUserComment()
        Returns:
        the user defined comment string.
      • getSubstitutionMap

        java.util.Map<java.lang.String,​java.lang.Object> getSubstitutionMap()
        Returns:
        the Map object containing available objects for param substitution.
      • setSubstitutionMap

        void setSubstitutionMap​(java.util.Map<java.lang.String,​java.lang.Object> map)
        Sets the substitution map for this configuration object.
        Parameters:
        map - the new value for the substitution map
      • willFlatten

        boolean willFlatten​(java.util.List<java.lang.String> excludedNS)
        Parameters:
        excludedNS - List of namespaces to exclude from flattening
        Returns:
        true if this object will attempt flattening given the provided excluded namespaces.
      • flatten

        boolean flatten​(java.util.List<java.lang.String> excludedNS)
                 throws java.lang.Exception
        flatten - combines all values from this object and its inherited objects into one single config object. After flattening, the object is a complete object with no inherited values except those from the excludedNS list.
        Parameters:
        excludedNS - List of namespaces to exclude from flattening
        Returns:
        false if this object did not flatten because of inheritance from excludedNS; true otherwise.
        Throws:
        java.lang.Exception
      • getReferences

        java.util.List<java.lang.String> getReferences​(java.util.List<java.lang.String> list)
        Parameters:
        list - If non-null, the object must use the provided list rather than creating its own
        Returns:
        a list of all references to other object from which this object or its children inherit from.
      • search

        java.util.List<javax.naming.Binding> search​(java.lang.String text,
                                                    int options,
                                                    int sizelimit)
        Searches a configuration object and optionally its children for a specific key or value.
        Parameters:
        text - The search text
        options - Search options (oneLevel=1, exactCase=2, regExp=4, paramName=8)
        sizelimit - Max number of hits returned
        Returns:
        List of Binding objects containing results from the performed search.
      • search

        java.util.List<javax.naming.Binding> search​(java.lang.String text,
                                                    int options,
                                                    int sizelimit,
                                                    java.util.List<javax.naming.Binding> results)
        Searches a configuration object and optionally its children for a specific key or value.
        Parameters:
        text - The search text
        options - Search options (oneLevel=1, exactCase=2, regExp=4, paramName=8)
        sizelimit - Max number of hits returned
        results - A list of results.
        Returns:
        the results from the performed search added into the provided results parameter.
      • getChild

        BaseConfiguration getChild​(java.lang.Object name)
        Parameters:
        name - The name of the configuration object
        Returns:
        the configuration object named name.
      • setChild

        void setChild​(java.lang.Object name,
                      BaseConfiguration config)
        Associates a configuration object with a name in this configuration
        Parameters:
        name - The name
        config - The configuration object
      • nameForChild

        java.lang.String nameForChild​(BaseConfiguration config)
        Returns the name for a configuration object
        Parameters:
        config - The configuration object
        Returns:
        The name associated with config or null if not found
      • getChildNames

        java.util.List<java.lang.String> getChildNames()
        Returns a list of names for all child configuration object
        Returns:
        list of names
      • getPath

        java.lang.String getPath()
        Returns the complete path to this object. The complete path is built by concatenating the names (child names, not necessarily the actual object names as returned by getName()) for all objects in the parent chain. The parent chain typically starts with the major objects like AssemblyLineConfig etc.
        Returns:
        The full path to this object
      • getChildForPath

        BaseConfiguration getChildForPath​(java.lang.String path)
                                   throws javax.naming.NameNotFoundException
        This method traverses the child hierarchy (from the top) and returns the configuration object associated with the path. This method will in effect split the path in its components and recursively call getChild() to drill down to the last object in the path.
        Parameters:
        path - The complete path to an object (as returned by getPath())
        Returns:
        The configuration object associated with the path
        Throws:
        javax.naming.NameNotFoundException - if the child could not be found.
      • detachFromParent

        boolean detachFromParent()
        This method removes this objects from its parent container. If this cannot be removed from the parent the contents should be cleared (default implementation) and true be returned as if it were removed. If the object cannot be cleared or removed it should return false.
        Returns:
        true if this object was removed; false if it could not be removed.
        Since:
        7.0
      • reattachToParent

        boolean reattachToParent​(int position)
        This method reattaches this object to its former parent.
        Parameters:
        position -
        Returns:
        true if this object was reattached; false if not;
        Since:
        7.0
      • isExpression

        boolean isExpression​(java.lang.Object parameter)
        Parameters:
        parameter - name of the parameter
        Returns:
        true if the parameter is an expression.
        Since:
        7.0
      • notifyChange

        void notifyChange​(MetamergeConfigChange event)
        Signal a change event to listeners. This method is typically called by setParameter but not user code.
        Parameters:
        event - The event describing the change
        Since:
        7.0
      • getModTS

        long getModTS()
        Returns the last time this BaseConfiguration was changed. For internal use.
        Since:
        7.1.1
      • setModTS

        void setModTS​(long time)
        Sets the last time this BaseConfiguration was changed For internal use.
        Since:
        7.1.1
      • setProtectedParameter

        void setProtectedParameter​(java.lang.String name)
        Marks a parameter as needing protection (a password)
        Since:
        7.2
      • isProtectedParameter

        boolean isProtectedParameter​(java.lang.String name)
        Returns true if this is a parameter that needs to be protected (a password)
        Since:
        7.2