|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.isti.util.ErrorMessageMgr com.isti.util.IstiXmlUtils com.isti.util.XmlConfigLoader
public class XmlConfigLoader
Class XmlConfigLoader defines a loader for reading configuration-property settings from an XML-format input file.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.isti.util.IstiXmlUtils |
---|
IstiXmlUtils.RootElement |
Field Summary | |
---|---|
protected static java.lang.String |
DEF_HELP1_STR
|
protected static java.lang.String |
DEF_HELP2_STR
|
protected static java.lang.String |
DEF_VER1_STR
|
protected static java.lang.String |
DEF_VER2_STR
|
protected static java.lang.String |
help1String
|
protected static java.lang.String |
help2String
|
protected static java.lang.String |
version1String
|
protected static java.lang.String |
version2String
|
Fields inherited from class com.isti.util.IstiXmlUtils |
---|
ISO_8859_1_ENCODING_FORMAT, loadFileOpenedFlag, rootElement, useDocumentFlag, UTF_8_ENCODING_FORMAT, XML_FILE_EXTENSION, XML_STYLESHEET, XML_STYLESHEET_PROCESSING_INSTRUCTION, xmlBuilderObj, xmlFileOutputterObj, xmlFixedStrOutputterObj, xmlStrOutputterObj |
Constructor Summary | |
---|---|
XmlConfigLoader()
|
Method Summary | |
---|---|
java.lang.String |
getVersionString()
Gets the version string to be displayed. |
boolean |
loadConfiguration(java.lang.String fileName,
java.lang.String rootElementName,
java.lang.String settingsElementName,
boolean mustFlag,
CfgProperties cfgPropObj,
boolean defaultsFlag)
Loads the XML-format configuration file and loads the set of "name = value" items specified by the "Settings" element in the configuration file. |
boolean |
loadConfiguration(java.lang.String fileName,
java.lang.String rootElementName,
java.lang.String settingsElementName,
boolean mustFlag,
CfgProperties cfgPropObj,
java.lang.String[] programArgs)
Loads the XML-format configuration file and loads the set of "name = value" items specified by the "Settings" element in the configuration file. |
boolean |
loadConfiguration(java.lang.String fileName,
java.lang.String rootElementName,
java.lang.String settingsElementName,
boolean mustFlag,
CfgProperties cfgPropObj,
java.lang.String[] programArgs,
boolean defaultsFlag,
java.lang.String cfgParamSpecStr)
Loads the XML-format configuration file and loads the set of "name = value" items specified by the "Settings" element in the configuration file. |
boolean |
loadConfiguration(java.lang.String fileName,
java.lang.String rootElementName,
java.lang.String settingsElementName,
boolean mustFlag,
CfgProperties cfgPropObj,
java.lang.String[] programArgs,
java.lang.String cfgParamSpecStr)
Loads the XML-format configuration file and loads the set of "name = value" items specified by the "Settings" element in the configuration file. |
static void |
setHelpParamNames(java.lang.String help1Str,
java.lang.String help2Str)
Sets the names for the display-help-info command-line parameters. |
static void |
setVersionParamNames(java.lang.String ver1Str,
java.lang.String ver2Str)
Sets the names for the display-version-info command-line parameters. |
void |
setVersionString(java.lang.String s)
Sets the version string to be displayed. |
Methods inherited from class com.isti.util.ErrorMessageMgr |
---|
clearErrorMessageString, clearFetchedErrorMessage, enterErrorMessageString, getErrorMessageFlag, getErrorMessageString, getUnfetchedMessageFlag, setErrorMessageString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final java.lang.String DEF_VER1_STR
protected static final java.lang.String DEF_VER2_STR
protected static final java.lang.String DEF_HELP1_STR
protected static final java.lang.String DEF_HELP2_STR
protected static java.lang.String version1String
protected static java.lang.String version2String
protected static java.lang.String help1String
protected static java.lang.String help2String
Constructor Detail |
---|
public XmlConfigLoader()
Method Detail |
---|
public boolean loadConfiguration(java.lang.String fileName, java.lang.String rootElementName, java.lang.String settingsElementName, boolean mustFlag, CfgProperties cfgPropObj, java.lang.String[] programArgs, boolean defaultsFlag, java.lang.String cfgParamSpecStr)
fileName
- the name of the XML file to load.rootElementName
- the expected name of the root element in the
XML file, or null to accept any name.settingsElementName
- the name of the "Settings" element whose
text contains the "name = value" items.mustFlag
- if true and a configuration file with a "Settings"
element is not found then an error will be generated and the method
will return 'false'.cfgPropObj
- the 'CfgProperties' object to be loaded from the
configuration file.programArgs
- string array of command-line parameters to be
processed, or null for none.defaultsFlag
- true to load the items as defaults into the
configuration-properties object; false to load the items normally.cfgParamSpecStr
- name of command-line parameter for specifying
the configuration file, or null for none.
public boolean loadConfiguration(java.lang.String fileName, java.lang.String rootElementName, java.lang.String settingsElementName, boolean mustFlag, CfgProperties cfgPropObj, java.lang.String[] programArgs, java.lang.String cfgParamSpecStr)
fileName
- the name of the XML file to load.rootElementName
- the expected name of the root element in the
XML file, or null to accept any name.settingsElementName
- the name of the "Settings" element whose
text contains the "name = value" items.mustFlag
- if true and a configuration file with a "Settings"
element is not found then an error will be generated and the method
will return 'false'.cfgPropObj
- the 'CfgProperties' object to be loaded from the
configuration file.programArgs
- string array of command-line parameters to be
processed, or null for none.cfgParamSpecStr
- name of command-line parameter for specifying
the configuration file, or null for none.
public boolean loadConfiguration(java.lang.String fileName, java.lang.String rootElementName, java.lang.String settingsElementName, boolean mustFlag, CfgProperties cfgPropObj, java.lang.String[] programArgs)
fileName
- the name of the XML file to load.rootElementName
- the expected name of the root element in the
XML file, or null to accept any name.settingsElementName
- the name of the "Settings" element whose
text contains the "name = value" items.mustFlag
- if true and a configuration file with a "Settings"
element is not found then an error will be generated and the method
will return 'false'.cfgPropObj
- the 'CfgProperties' object to be loaded from the
configuration file.programArgs
- string array of command-line parameters to be
processed, or null for none.
public boolean loadConfiguration(java.lang.String fileName, java.lang.String rootElementName, java.lang.String settingsElementName, boolean mustFlag, CfgProperties cfgPropObj, boolean defaultsFlag)
fileName
- the name of the XML file to load.rootElementName
- the expected name of the root element in the
XML file, or null to accept any name.settingsElementName
- the name of the "Settings" element whose
text contains the "name = value" items.mustFlag
- if true and a configuration file with a "Settings"
element is not found then an error will be generated and the method
will return 'false'.cfgPropObj
- the 'CfgProperties' object to be loaded from the
configuration file.defaultsFlag
- true to load the items as defaults into the
configuration-properties object; false to load the items normally.
public java.lang.String getVersionString()
public void setVersionString(java.lang.String s)
s
- the version string or null if none.public static void setVersionParamNames(java.lang.String ver1Str, java.lang.String ver2Str)
ver1Str
- first parameter name to use.ver2Str
- second parameter name to use.public static void setHelpParamNames(java.lang.String help1Str, java.lang.String help2Str)
help1Str
- first parameter name to use.help2Str
- second parameter name to use.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |