|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfr.tireme.shared.param.Parameters
public class Parameters
Responsible of managing external parameters. The following DTD is used: <?xml version="1.0"
encoding="UTF-8"?>
<!DOCTYPE parameters [ <!ELEMENT parameters (section+|config+)>
<!ELEMENT
config (section+)> <!ELEMENT section (param+)>
<!ATTLIST section type CDATA #REQUIRED > <!ELEMENT param (#PCDATA)>
<!ATTLIST param type CDATA #REQUIRED > ]>
The external file is called config.xml and is found within a data directory of the application
directory, within a program directory.
| Constructor Summary | |
|---|---|
Parameters(java.lang.String enVarName,
java.lang.String appName,
int generatesFor)
Constructor for the Parameters object using the default language |
|
Parameters(java.lang.String interfaceLanguage,
java.lang.String enVarName,
java.lang.String appName,
java.io.File paramFile,
int generatesFor)
Constructor for the Parameters object using a specific language |
|
Parameters(java.lang.String interfaceLanguage,
java.lang.String enVarName,
java.lang.String appName,
int generatesFor)
Constructor for the Parameters object using a specific language |
|
| Method Summary | |
|---|---|
Configuration |
addConfig(org.w3c.dom.Element elemToAdd)
Create a configuration and makes it the current one |
Configuration |
addConfig(org.w3c.dom.Element elemToAdd,
boolean manageSelection)
Create a configuration and makes it the current one depending on parameter |
Configuration |
addConfig(java.lang.String configToAddName)
Create a new configuration entry |
Configuration |
copyConfig(java.lang.String fromConfName,
java.lang.String newConfName)
Make a copy of a configuration |
void |
deleteConfig(java.lang.String confToDelete)
Delete a configuration section |
java.io.File |
getApplDir()
Gets the applDir attribute of the Parameters object |
java.io.File |
getApplDir(java.lang.String enVarName,
java.lang.String appName)
Find and validate the application directory |
Configuration |
getConfig(java.lang.String confName)
Gets the configFromName attribute of the Parameters object |
java.lang.String[] |
getConfigList()
Gets the configList attribute of the Parameters object |
java.lang.String |
getConfigName()
Gets the configName attribute of the Parameters object |
Configuration |
getCurrentConfig()
Gets the current configuration |
org.w3c.dom.Document |
getDocument()
Gets the document attribute of the Parameters object |
java.lang.String |
getParamFileName()
Gets the parameter file path attribute of the Parameters object |
boolean |
hasConfig(java.lang.String confName)
Description of the Method |
void |
saveParameters()
Save actual parameter set |
void |
setCurrentConfig(Configuration conf)
Sets the currentConfig attribute of the Parameters object |
void |
setCurrentConfig(java.lang.String confName)
Sets the currentConfig attribute of the Parameters object |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Parameters(java.lang.String enVarName,
java.lang.String appName,
int generatesFor)
throws ParamException
enVarName - environment variable where to find the config.xml fileappName - name of the application for being able to find the right directory in the envVarName. May ne null
if not neededgeneratesFor - either Symbols.SCHEMADOC_MANAGEMENT or Symbols.ANALDOC_MANAGEMENT
ParamException - Description of Exception
public Parameters(java.lang.String interfaceLanguage,
java.lang.String enVarName,
java.lang.String appName,
java.io.File paramFile,
int generatesFor)
throws ParamException
interfaceLanguage - language of the user interface for messagesenVarName - environment variable where to find the config.xml fileappName - name of the application for being able to find the right
directory in the envVarName. May ne null if not neededparamFile - FilegeneratesFor - either Symbols.SCHEMADOC_MANAGEMENT or
Symbols.ANALDOC_MANAGEMENT
ParamException - Description of Exception
public Parameters(java.lang.String interfaceLanguage,
java.lang.String enVarName,
java.lang.String appName,
int generatesFor)
throws ParamException
interfaceLanguage - language of the user interface for messagesenVarName - environment variable where to find the config.xml fileappName - name of the application for being able to find the right directory in the envVarName. May ne null
if not neededgeneratesFor - either Symbols.SCHEMADOC_MANAGEMENT or Symbols.ANALDOC_MANAGEMENT
ParamException - Description of Exception| Method Detail |
|---|
public Configuration addConfig(org.w3c.dom.Element elemToAdd)
throws ParamException
elemToAdd - The configuration: ned to be a config node, conforming to the public DTD for Config
ParamException
public Configuration addConfig(org.w3c.dom.Element elemToAdd,
boolean manageSelection)
throws ParamException
elemToAdd - The configuration: ned to be a config node, conforming to the public DTD for ConfigmanageSelection - do we want it to become selected or does it remains as it it defined in the element added
ParamException
public Configuration addConfig(java.lang.String configToAddName)
throws ParamException
configToAddName - The feature to be added to the Config attribute
ParamException - Description of Exception
public Configuration copyConfig(java.lang.String fromConfName,
java.lang.String newConfName)
throws ParamException
fromConfName - Description of ParameternewConfName - Description of Parameter
ParamException - Description of Exception
public void deleteConfig(java.lang.String confToDelete)
throws ParamException
confToDelete - Name of the configuration to delete
ParamException - Description of Exceptionpublic java.io.File getApplDir()
public java.io.File getApplDir(java.lang.String enVarName,
java.lang.String appName)
throws ParamException
enVarName - Where is the main application directoryappName - application name, may be null if the envVarName is enough
ParamException - Description of Exception
public Configuration getConfig(java.lang.String confName)
throws ParamException
confName - Description of Parameter
ParamException - Description of Exceptionpublic java.lang.String[] getConfigList()
public java.lang.String getConfigName()
public Configuration getCurrentConfig()
public org.w3c.dom.Document getDocument()
public java.lang.String getParamFileName()
public boolean hasConfig(java.lang.String confName)
confName - Description of Parameter
public void saveParameters()
throws StandardException
StandardExceptionpublic void setCurrentConfig(Configuration conf)
conf - The new currentConfig value
public void setCurrentConfig(java.lang.String confName)
throws ParamException
confName - The new currentConfig value
ParamException - Description of Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||