Class AttributeMapItemImpl

    • Constructor Detail

      • AttributeMapItemImpl

        public AttributeMapItemImpl()
        Default Constructor.
      • AttributeMapItemImpl

        public AttributeMapItemImpl​(java.lang.Object config)
        Constructor.
        Parameters:
        config - TreeMap of attribute/value pairs.
    • Method Detail

      • init

        public void init()
                  throws java.lang.Exception
        Called after internal data structure is set.
        Specified by:
        init in interface BaseConfiguration
        Overrides:
        init in class BaseConfigurationImpl
        Throws:
        java.lang.Exception - if the initialization fails.
      • clone

        public static AttributeMapItem clone​(AttributeMapItem ami)
        Clone an Attribute Map Item.
        Parameters:
        ami - Attribute Map Item, which will be cloned.
        Returns:
        The created clone.
      • getModify

        public boolean getModify()
        Gets the modify attribute of the AttributeMapItem object
        Specified by:
        getModify in interface AttributeMapItem
        Returns:
        The modify value
      • setModify

        public void setModify​(boolean modify)
        Sets the modify attribute of the AttributeMapItem object
        Specified by:
        setModify in interface AttributeMapItem
        Parameters:
        modify - The new modify value
      • getAdd

        public boolean getAdd()
        Gets the add attribute of the AttributeMapItem object
        Specified by:
        getAdd in interface AttributeMapItem
        Returns:
        The add value
      • setAdd

        public void setAdd​(boolean add)
        Sets the add attribute of the AttributeMapItem object
        Specified by:
        setAdd in interface AttributeMapItem
        Parameters:
        add - The new add value
      • getSimple

        public java.lang.String getSimple()
        Gets the simple attribute of the AttributeMapItem object
        Specified by:
        getSimple in interface AttributeMapItem
        Returns:
        The simple value
      • setSimple

        public void setSimple​(java.lang.String attribute)
        Sets the simple attribute of the AttributeMapItem object
        Specified by:
        setSimple in interface AttributeMapItem
        Parameters:
        attribute - The new simple value
      • setType

        public void setType​(java.lang.String type)
        Sets the type attribute of the AttributeMapItem object
        Specified by:
        setType in interface AttributeMapItem
        Parameters:
        type - The new type value
      • getType

        public java.lang.String getType()
        Gets the type attribute of the AttributeMapItem object
        Specified by:
        getType in interface AttributeMapItem
        Returns:
        The type value
      • isSimple

        public boolean isSimple()
        Returns true if this AttributeMapItem is a simple attribute map
        Specified by:
        isSimple in interface AttributeMapItem
        Returns:
        The simple value
      • isAdvanced

        public boolean isAdvanced()
        Returns true if this AttributeMapItem is an advanced attribute map (mapped by a script)
        Specified by:
        isAdvanced in interface AttributeMapItem
        Returns:
        The advanced value
      • isSubstitution

        public boolean isSubstitution()
        Returns true if this attribute map item is subject to property expansion
        Specified by:
        isSubstitution in interface AttributeMapItem
        Returns:
        The if enabled, false if disabled
      • setSubstitution

        public void setSubstitution​(java.lang.String str)
        Sets the substitution template attribute of the AttributeMapItem object
        Specified by:
        setSubstitution in interface AttributeMapItem
        Parameters:
        str - The substitution template
      • getSubstitution

        public java.lang.String getSubstitution()
        Gets the substitution template attribute of the AttributeMapItem object
        Specified by:
        getSubstitution in interface AttributeMapItem
        Returns:
        The substitution template
      • flatten

        public boolean flatten​(java.util.List<java.lang.String> excludedNS)
                        throws java.lang.Exception
        This method 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.
        Specified by:
        flatten in interface BaseConfiguration
        Overrides:
        flatten in class BaseConfigurationImpl
        Parameters:
        excludedNS - List of namespaces to exclude from flattening
        Returns:
        true if object attempted flattening, FALSE is this object inherits from an excluded namespace or has no inheritance
        Throws:
        java.lang.Exception
      • detachFromParent

        public boolean detachFromParent()
        Detach this Attribute Map item from its parent Attribute Map. Note that the modification affects only the Attribute Map, the item itself still keeps its knowledge that the Attribute Map is its parent. This behavior is used by the reattachToParent(int) method.
        Specified by:
        detachFromParent in interface BaseConfiguration
        Overrides:
        detachFromParent in class BaseConfigurationImpl
        Returns:
        Always true.
      • reattachToParent

        public boolean reattachToParent​(int position)
        Re-attach this Attribute Map item to its parent Attribute Map.
        Specified by:
        reattachToParent in interface BaseConfiguration
        Overrides:
        reattachToParent in class BaseConfigurationImpl
        Parameters:
        position - This parameter is ignored.
        Returns:
        False if the Attribute Map already contains this Attribute Map item, true otherwise.
      • getChildAttributeMaps

        public java.util.List getChildAttributeMaps()
        Returns a list of child attribute map items.
        Specified by:
        getChildAttributeMaps in interface AttributeMapItem
        Returns:
        List of child AttributeMapItem items