- 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:
TransformerConfigurationExceptionParserConfigurationException
-
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:
TransformerConfigurationExceptionParserConfigurationException
-
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:
TransformerConfigurationExceptionParserConfigurationException
-
-
Method Detail
-
name
public String name()
- Specified by:
namein interfaceIXmlConfigurationObject- Returns:
- The name of the Xml Configuration object.
-
name
public void name(String value)
- Specified by:
namein interfaceIXmlConfigurationObject- Parameters:
value- The new name for the Xml Configuration object.
-
configurationProperties
public List<ConfigurationProperty> configurationProperties()
- Specified by:
configurationPropertiesin interfaceIXmlConfigurationObject- Returns:
- A list of @see ConfigurationProperty associated with this Xml Configuration object.
-
addConfigurationProperty
public void addConfigurationProperty(ConfigurationProperty property)
- Specified by:
addConfigurationPropertyin interfaceIXmlConfigurationObject- See Also:
to add to this Xml Configuration object.
-
addConfigurationProperties
public void addConfigurationProperties(List<ConfigurationProperty> properties)
- Specified by:
addConfigurationPropertiesin interfaceIXmlConfigurationObject- Parameters:
properties- List of @see ConfigurationProperty to add to this Xml Configuration object.
-
removeConfigurationProperty
public void removeConfigurationProperty(ConfigurationProperty property)
- Specified by:
removeConfigurationPropertyin interfaceIXmlConfigurationObject- See Also:
to remove from this Xml Configuration object.
-
removeConfigurationProperties
public void removeConfigurationProperties(List<ConfigurationProperty> properties)
- Specified by:
removeConfigurationPropertiesin interfaceIXmlConfigurationObject- Parameters:
properties- List of @see ConfigurationProperty to remove from this Xml Configuration object.
-
clearConfigurationProperties
public void clearConfigurationProperties()
Description copied from interface:IXmlConfigurationObjectRemove all @see ConfigurationProperty from this Xml Configuration object.- Specified by:
clearConfigurationPropertiesin interfaceIXmlConfigurationObject
-
children
public List<PersistXml> children()
- Specified by:
childrenin interfaceIXmlConfigurationObject- Returns:
- List of @see PersistXml associated with this Xml Configuration object.
-
addChild
public void addChild(PersistXml child)
- Specified by:
addChildin interfaceIXmlConfigurationObject- See Also:
to add to this Xml Configuration object.
-
addChildren
public void addChildren(List<PersistXml> children)
- Specified by:
addChildrenin interfaceIXmlConfigurationObject- Parameters:
children- List of @see PersistXml to add to this Xml Configuration object.
-
removeChild
public void removeChild(PersistXml child)
- Specified by:
removeChildin interfaceIXmlConfigurationObject- See Also:
to remove from this Xml Configuration object.
-
removeChildren
public void removeChildren(List<PersistXml> children)
- Specified by:
removeChildrenin interfaceIXmlConfigurationObject- Parameters:
children- List of @see PersistXml to remove from this Xml Configuration object.
-
clearChildren
public void clearChildren()
Description copied from interface:IXmlConfigurationObjectRemoves all @see PersistXml children from this Xml Configuration object.- Specified by:
clearChildrenin interfaceIXmlConfigurationObject
-
value
public <T> T value()
- Specified by:
valuein interfaceIXmlConfigurationObject- Returns:
- The value associated with this Xml Configuration object.
-
value
public <T> void value(T value)
- Specified by:
valuein 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:
persistin 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:
loadin interfacePersistXml- Parameters:
xmlObject- The @see Element to load into memory.
-
getChildObject
public XmlConfigurationObject getChildObject(String name)
- Specified by:
getChildObjectin 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:
getChildValuein 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()
-
-