| |
|
| java.lang.Object com.finalist.jaggenerator.ConfigManager
ConfigManager | public class ConfigManager (Code) | | The ConfigManager deals with loading / saving JAG configuraton information
to/from an XML config file.
author: Michael O'Connor - Finalist IT Group |
Field Summary | |
final protected static String | XMLTAG_GUI The name of the XML tag that contains the GUI configuration properties. |
Method Summary | |
public Document | getDocument() Gets the config information, parsed as an XML document. | public static synchronized ConfigManager | getInstance() The ConfigManager is a singleton - this method obtains the one and only instance. | public Map | retrievePropertiesFromXML(String rootElementName) Creates a Map that contains key-value pairs representing the XML elements / text nodes
that fall underneath the node with the supplied name. | public void | save() Saves the configurations to the XML JAG_CONFIG_FILE. |
XMLTAG_GUI | final protected static String XMLTAG_GUI(Code) | | The name of the XML tag that contains the GUI configuration properties.
|
getDocument | public Document getDocument()(Code) | | Gets the config information, parsed as an XML document.
NOTE: this Document is provided READ-ONLY - any changes made to the doc will NOT be persisted!
the doc. |
getInstance | public static synchronized ConfigManager getInstance()(Code) | | The ConfigManager is a singleton - this method obtains the one and only instance.
|
retrievePropertiesFromXML | public Map retrievePropertiesFromXML(String rootElementName)(Code) | | Creates a Map that contains key-value pairs representing the XML elements / text nodes
that fall underneath the node with the supplied name. If there are more than one node with the supplied
name, only the first of these is translated into a Map.
Property values are of type String[] : if a given property within the Map occurs more than
once in the XML there will be more than one String in the array.
Parameters: rootElementName - The name of the parent node whose children we want making into a Properties object. a Map whose keys are Strings and whose values are String[].The map will be empty (but never null ) if there are no nodes with the namespecified in rootElementName . |
save | public void save()(Code) | | Saves the configurations to the XML JAG_CONFIG_FILE.
|
|
|
|