Class DefaultJavaBeanConfigXML

    • Method Detail

      • load

        public boolean load​(org.jdom2.Element shared,
                            org.jdom2.Element perNode)
        Description copied from class: AbstractXmlAdapter
        Create a set of configured objects from their XML description.
        Specified by:
        load in interface XmlAdapter
        Overrides:
        load in class AbstractXmlAdapter
        Parameters:
        shared - Top-level XML element containing the common, multi-node elements of the description
        perNode - Top-level XML element containing the private, single-node elements of the description
        Returns:
        true if successful
      • load

        public void load​(org.jdom2.Element e,
                         java.lang.Object o)
        Description copied from class: AbstractXmlAdapter
        Create a set of configured objects from their XML description, using an auxiliary object.

        For example, the auxilary object o might be a manager or GUI of some type that needs to be informed as each object is created.

        Specified by:
        load in interface XmlAdapter
        Overrides:
        load in class AbstractXmlAdapter
        Parameters:
        e - Top-level XML element containing the description
        o - Implementation-specific Object needed for the conversion
      • unpack

        java.lang.Object unpack​(org.jdom2.Element e)
                         throws java.lang.ClassNotFoundException,
                                java.lang.NoSuchMethodException,
                                java.lang.InstantiationException,
                                java.beans.IntrospectionException,
                                java.lang.IllegalAccessException,
                                java.lang.reflect.InvocationTargetException
        Throws:
        java.lang.ClassNotFoundException
        java.lang.NoSuchMethodException
        java.lang.InstantiationException
        java.beans.IntrospectionException
        java.lang.IllegalAccessException
        java.lang.reflect.InvocationTargetException
      • store

        public org.jdom2.Element store​(java.lang.Object o)
        Description copied from interface: XmlAdapter
        Store the object in XML
        Parameters:
        o - The object to be recorded. Specific XmlAdapter implementations will require this to be of a specific type; that binding is done in ConfigXmlManager.
        Returns:
        The XML representation Element
      • getAttributeString

        java.lang.String getAttributeString​(org.jdom2.Element elem,
                                            java.lang.String name)
        Get an attribute string value from an Element defining a NamedBean
        Parameters:
        elem - The existing Element
        name - name of desired Attribute
        Returns:
        the attribute string or null if name is not an attribute of elem
      • getAttributeBool

        boolean getAttributeBool​(org.jdom2.Element elem,
                                 java.lang.String name,
                                 boolean def)
        Get an attribute boolean value from an Element defining a NamedBean
        Parameters:
        elem - The existing Element
        name - Name of desired Attribute
        def - Default value for attribute
        Returns:
        value of name or def if name is not an attribute of elem