- java.lang.Object
-
- ilusr.persistencelib.configuration.XmlConfigurationObject
-
- All Implemented Interfaces:
IXmlConfigurationObject
,PersistXml
public class XmlConfigurationObject extends Object implements PersistXml, IXmlConfigurationObject
- Author:
- Jeff Riggle
-
-
Constructor Summary
Constructors Constructor Description XmlConfigurationObject(String name)
XmlConfigurationObject(String name, List<ConfigurationProperty> properties, List<PersistXml> children, T value)
XmlConfigurationObject(String name, T value)
-
Method Summary
-
-
-
Constructor Detail
-
XmlConfigurationObject
public XmlConfigurationObject(String name) throws TransformerConfigurationException, ParserConfigurationException
- Parameters:
name
- The name of the configuration object.- Throws:
TransformerConfigurationException
ParserConfigurationException
-
XmlConfigurationObject
public XmlConfigurationObject(String name, T value) throws TransformerConfigurationException, ParserConfigurationException
- Parameters:
name
- The name of the configuration object.value
- The value for the configuration object.- Throws:
TransformerConfigurationException
ParserConfigurationException
-
XmlConfigurationObject
public XmlConfigurationObject(String name, List<ConfigurationProperty> properties, List<PersistXml> children, T value) throws TransformerConfigurationException, ParserConfigurationException
- Parameters:
name
- The name of the configuration object.properties
- List of @see ConfigurationProperty assoicated with this configuration object.children
- List of @see PersistXml associated with this configuration object.value
- The value for the configuration object.- Throws:
TransformerConfigurationException
ParserConfigurationException
-
-
Method Detail
-
name
public String name()
- Specified by:
name
in interfaceIXmlConfigurationObject
- Returns:
- The name of the Xml Configuration object.
-
name
public void name(String value)
- Specified by:
name
in interfaceIXmlConfigurationObject
- Parameters:
value
- The new name for the Xml Configuration object.
-
configurationProperties
public List<ConfigurationProperty> configurationProperties()
- Specified by:
configurationProperties
in interfaceIXmlConfigurationObject
- Returns:
- A list of @see ConfigurationProperty associated with this Xml Configuration object.
-
addConfigurationProperty
public void addConfigurationProperty(ConfigurationProperty property)
- Specified by:
addConfigurationProperty
in interfaceIXmlConfigurationObject
- See Also:
to add to this Xml Configuration object.
-
addConfigurationProperties
public void addConfigurationProperties(List<ConfigurationProperty> properties)
- Specified by:
addConfigurationProperties
in interfaceIXmlConfigurationObject
- Parameters:
properties
- List of @see ConfigurationProperty to add to this Xml Configuration object.
-
removeConfigurationProperty
public void removeConfigurationProperty(ConfigurationProperty property)
- Specified by:
removeConfigurationProperty
in interfaceIXmlConfigurationObject
- See Also:
to remove from this Xml Configuration object.
-
removeConfigurationProperties
public void removeConfigurationProperties(List<ConfigurationProperty> properties)
- Specified by:
removeConfigurationProperties
in interfaceIXmlConfigurationObject
- Parameters:
properties
- List of @see ConfigurationProperty to remove from this Xml Configuration object.
-
clearConfigurationProperties
public void clearConfigurationProperties()
Description copied from interface:IXmlConfigurationObject
Remove all @see ConfigurationProperty from this Xml Configuration object.- Specified by:
clearConfigurationProperties
in interfaceIXmlConfigurationObject
-
children
public List<PersistXml> children()
- Specified by:
children
in interfaceIXmlConfigurationObject
- Returns:
- List of @see PersistXml associated with this Xml Configuration object.
-
addChild
public void addChild(PersistXml child)
- Specified by:
addChild
in interfaceIXmlConfigurationObject
- See Also:
to add to this Xml Configuration object.
-
addChildren
public void addChildren(List<PersistXml> children)
- Specified by:
addChildren
in interfaceIXmlConfigurationObject
- Parameters:
children
- List of @see PersistXml to add to this Xml Configuration object.
-
removeChild
public void removeChild(PersistXml child)
- Specified by:
removeChild
in interfaceIXmlConfigurationObject
- See Also:
to remove from this Xml Configuration object.
-
removeChildren
public void removeChildren(List<PersistXml> children)
- Specified by:
removeChildren
in interfaceIXmlConfigurationObject
- Parameters:
children
- List of @see PersistXml to remove from this Xml Configuration object.
-
clearChildren
public void clearChildren()
Description copied from interface:IXmlConfigurationObject
Removes all @see PersistXml children from this Xml Configuration object.- Specified by:
clearChildren
in interfaceIXmlConfigurationObject
-
value
public <T> T value()
- Specified by:
value
in interfaceIXmlConfigurationObject
- Returns:
- The value associated with this Xml Configuration object.
-
value
public <T> void value(T value)
- Specified by:
value
in interfaceIXmlConfigurationObject
- Parameters:
value
- The new value to associated with this Xml Configuration object.
-
persist
public Element persist(ilusr.core.datamanager.xml.XmlGenerator generator)
- Specified by:
persist
in interfacePersistXml
- Parameters:
generator
- A @see XmlGenerator to save xml objects to.- Returns:
- The @see Element created in the @see XmlGenerator.
-
load
public void load(Element xmlObject)
- Specified by:
load
in interfacePersistXml
- Parameters:
xmlObject
- The @see Element to load into memory.
-
getChildObject
public XmlConfigurationObject getChildObject(String name)
- Specified by:
getChildObject
in interfaceIXmlConfigurationObject
- Parameters:
name
- The String name associated with the Configuration object.- Returns:
- The child @see XmlConfigurationObject.
-
getChildValue
public <T> T getChildValue(String name)
- Specified by:
getChildValue
in interfaceIXmlConfigurationObject
- Parameters:
name
- name The String name associated with the Configuration object.- Returns:
- name The value associated with the Configuration object.
-
getValueType
public String getValueType()
-
-