|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.nukesoft.bot2.botutil.XmlConfManager
The ConfManager simplifies access to an XML based configuration file. It manages file management and data location. It also provides the ability to globalize an instance itself, thus making it staticaly accessable. This class acts as a wrapper for the TXML library. (http://sourceforge.net/projects/txml/)
Constructor Summary | |
XmlConfManager(File confFile)
Creates a confuguration manager and loads a file. |
|
XmlConfManager(File confFile,
boolean globalize)
Creates a confuguration manager and loads a file. |
|
XmlConfManager(String confPath)
Creates a confuguration manager and loads a file. |
|
XmlConfManager(String confPath,
boolean globalize)
Creates a confuguration manager and loads a file. |
Method Summary | |
String[] |
getAllConfStrings(String confPath)
Loads multiple string from the configuration file. |
XmlConfManager[] |
getConfSet(String partialConfPath)
Returns an array of XmlConfManager objects that represent configuration subtrees with requested root nodes located in a designated location in the configuration file. |
static XmlConfManager |
getGlobalConf()
Gets the global configuration manager. |
String |
getOneConfString(String confPath)
Loads a single string from the configuration file. |
void |
globalize()
Promotes this XmlConfManager to global conf manager status. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public XmlConfManager(String confPath) throws IOException
confPath
- The path to the confuguration file to load.
IOException
- conf file not loaded.public XmlConfManager(String confPath, boolean globalize) throws IOException
confPath
- The path to the confuguration file to load.globalize
- Set to TRUE if you want this configuration file to be
the global config.
IOException
- conf file not loaded.public XmlConfManager(File confFile) throws IOException
confFile
- The confuguration file to load.
IOException
- conf file not loaded.public XmlConfManager(File confFile, boolean globalize) throws IOException
confFile
- The confuguration file to load.globalize
- Set to TRUE if you want this configuration file to be
the global config.
IOException
- conf file not loaded.Method Detail |
public String getOneConfString(String confPath) throws IOException
confPath
- The path in the configuration hiearchy to load.
Format: /RootNode/Node/Node/Element
IOException
- conf file not loaded.public String[] getAllConfStrings(String confPath) throws IOException
confPath
- The path in the configuration hiearchy to load.
Format: /RootNode/Node/Node/Element
IOException
- conf file not loaded.public XmlConfManager[] getConfSet(String partialConfPath) throws IOException
partialConfPath
- The path in the configuration hiearchy to the top
of the node set you wish to retreive. This includes the name of the
target nodes.
IOException
- conf file not loaded.public void globalize()
public static XmlConfManager getGlobalConf()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |