Interface ConfigurationElement

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      ConfigurationValue getAttribute​(java.lang.String name)
      Returns the value associated with the given attribute.
      HashList getAttributes()
      Returns the list of all attributes available to this ConfigurationElement.
      ConfigurationElement getElement​(java.lang.Object nodeName)
      Returns the ConfigurationElement instance associated with the given nodeName.
      HashList getElements()
      Returns the list of all child-elements available to this ConfigurationElement.
      java.lang.Object getKey()
      This method is used to uniquely identify this ConfigurationElement within a list.
      java.lang.String getNodeName()
      Returns the node-name for this element.
      java.lang.String getStrAttribute​(java.lang.String name)  
      void initFromXML​(org.w3c.dom.Node root)
      Initializes the object with information from an XML Node.
      void reload()
      Triggers the re-initialization of the element and its children if the configuration files have changed.
      org.w3c.dom.Element toXML​(org.w3c.dom.Document doc)
      Utility method to get the object's XML representation.
    • Method Detail

      • getAttributes

        HashList getAttributes()
        Returns the list of all attributes available to this ConfigurationElement.
      • getElements

        HashList getElements()
        Returns the list of all child-elements available to this ConfigurationElement.
      • getAttribute

        ConfigurationValue getAttribute​(java.lang.String name)
        Returns the value associated with the given attribute. If the attribute was not present in the xml configuration the method returns null. If multiple ElementSources are defined for this element, it returns the value of the one with greater priority.
      • getElement

        ConfigurationElement getElement​(java.lang.Object nodeName)
        Returns the ConfigurationElement instance associated with the given nodeName. If the ConfigurationElement was not present in the xml configuration, this method shall return an empty instance of the ConfigurationElement. If a list is associated with the given nodeName, this method returns an instance a single ConfigurationElement whose children are the ConfigurationElement instances for that nodeName. If no ConfigurationElement is associated with the given nodeName, the method returns null.
      • getNodeName

        java.lang.String getNodeName()
        Returns the node-name for this element.
      • getKey

        java.lang.Object getKey()
        This method is used to uniquely identify this ConfigurationElement within a list. Typically this is mapped to the value of a single attribute, but this is not necessary as each ConfigurationElement can define its own schema.

        If it's not possible to uniquely identify this object, this method should return null.
        Returns:
        The value representing the key of this object, null if there is no key available.
      • initFromXML

        void initFromXML​(org.w3c.dom.Node root)
        Initializes the object with information from an XML Node.
        Parameters:
        root - Node intance representing the configuration element properties
      • toXML

        org.w3c.dom.Element toXML​(org.w3c.dom.Document doc)
        Utility method to get the object's XML representation.
        Parameters:
        doc - Document object where the new element will be created from.
        Returns:
        an XML Element instance of the object being represented
      • reload

        void reload()
             throws ConfigException
        Triggers the re-initialization of the element and its children if the configuration files have changed.
        Throws:
        ConfigException
      • getStrAttribute

        java.lang.String getStrAttribute​(java.lang.String name)