public class XmlConfigLoader extends IstiXmlUtils
Modifier and Type | Field and Description |
---|---|
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 |
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 and Description |
---|
XmlConfigLoader() |
Modifier and Type | Method and Description |
---|---|
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.
|
addXmlFileExtension, clearErrorMessage, convertFromEscapedCodes, createCdata, createRootElement, ctrlCharsFromEscapedCodes, ctrlCharsToEscapedCodes, ctrlCharsToEscapedCodes, elementToFixedString, elementToString, elementToString, findElement, findElement, getAnyNSChild, getChildDataFixedStr, getChildDataStr, getChildDataStr, getChildDataStr, getComponentForClass, getEncodedString, getErrorFlag, getErrorMessage, getLoadFileOpenedFlag, getRootElement, loadFile, loadFile, loadStream, loadStream, loadStream, loadStream, saveToFile, saveToFile, saveToStream, saveToStream, setDocumentStylesheet, setElementNamespace, setElementNamespace, setErrorMessage, setFileLineSeparator, setFileOmitDeclaration, setFileOmitEncoding, setFileOutExpandEmptyElements, setFileOutIndent, setFileOutNewlines, setFileOutTextTrim, setLoadExternalDTDFeature, setRootElement, setStrOutExpandEmptyElements, setStrOutIndent, setStrOutNewlines, setStrOutTextTrim, setTrimAllWhite, stringToElement
clearErrorMessageString, clearFetchedErrorMessage, enterErrorMessageString, getErrorMessageFlag, getErrorMessageString, getUnfetchedMessageFlag, setErrorMessageString
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
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.