Module ilusr.persistencelib
Class XmlConfigurationManager
- java.lang.Object
-
- ilusr.persistencelib.configuration.XmlConfigurationManager
-
- All Implemented Interfaces:
IPersistenceManager
public class XmlConfigurationManager extends Object implements IPersistenceManager
- Author:
- Jeff Riggle
-
-
Constructor Summary
Constructors Constructor Description XmlConfigurationManager(ilusr.core.datamanager.xml.XmlManager manager, List<PersistXml> config)
XmlConfigurationManager(String location)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addConfigurationObject(PersistXml configObject)
void
addConfigurationObjects(List<PersistXml> configObjects)
void
clearConfigurationObjects()
Remove all @see PersistXml from this file.List<PersistXml>
configurationObjects()
void
load()
Loads the persistence object from disk to memory.void
prepare()
Prepares the persistence object to be saved to disk.void
removeConfigurationObject(PersistXml configObject)
void
removeConfigurationObjects(List<PersistXml> configObjects)
void
save()
Saves the persistence object to disk.
-
-
-
Constructor Detail
-
XmlConfigurationManager
public XmlConfigurationManager(String location) throws TransformerConfigurationException, ParserConfigurationException, SAXException, IOException
- Parameters:
location
- The location of the xml file.- Throws:
TransformerConfigurationException
ParserConfigurationException
SAXException
IOException
-
XmlConfigurationManager
public XmlConfigurationManager(ilusr.core.datamanager.xml.XmlManager manager, List<PersistXml> config)
- Parameters:
manager
- The @see XmlManager to read and write to disk.config
- List of @see XmlConfigurationObjects to be saved and read.
-
-
Method Detail
-
configurationObjects
public List<PersistXml> configurationObjects()
- Returns:
- A list of @see PersistXml assoicated with this configuration object.
-
addConfigurationObject
public void addConfigurationObject(PersistXml configObject)
- Parameters:
configObject
- The @see PersistXml to add to the file.
-
addConfigurationObjects
public void addConfigurationObjects(List<PersistXml> configObjects)
- Parameters:
configObjects
- List of @see PersistXml to be added to file.
-
removeConfigurationObject
public void removeConfigurationObject(PersistXml configObject)
- Parameters:
configObject
- The @see PersistXml to remove from this file.
-
removeConfigurationObjects
public void removeConfigurationObjects(List<PersistXml> configObjects)
- Parameters:
configObjects
- List of @see PersistXml to remove from this file.
-
clearConfigurationObjects
public void clearConfigurationObjects()
Remove all @see PersistXml from this file.
-
prepare
public void prepare() throws TransformerConfigurationException, ParserConfigurationException
Description copied from interface:IPersistenceManager
Prepares the persistence object to be saved to disk.- Specified by:
prepare
in interfaceIPersistenceManager
- Throws:
ParserConfigurationException
TransformerConfigurationException
-
save
public void save() throws TransformerException, ParserConfigurationException
Description copied from interface:IPersistenceManager
Saves the persistence object to disk.- Specified by:
save
in interfaceIPersistenceManager
- Throws:
TransformerException
ParserConfigurationException
-
load
public void load() throws SAXException, IOException, TransformerConfigurationException, ParserConfigurationException
Description copied from interface:IPersistenceManager
Loads the persistence object from disk to memory.- Specified by:
load
in interfaceIPersistenceManager
- Throws:
SAXException
IOException
TransformerConfigurationException
ParserConfigurationException
-
-