|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sap.ip.me.api.pios.configuration.ConfigurationManager
Configuration Manager is the manager for all the PIOS configurations (internal use only).
Provides a skeletal implementation of a configuration manager. Note that all methods of this class are protected. The inherited class will provide access to different configurations options like delete, get, add, list or save. Different scenarios may render in a Configuration class when only the get and list method are accessible to developers. Other scenarios involve all method access to developers.
Constructor Summary | |
protected |
ConfigurationManager()
Allow access to the default constructor only for inheritance. |
protected |
ConfigurationManager(ConfigurationManager confManager)
Constructs a new ConfigurationManager object. |
Method Summary | |
protected Configuration |
add(java.lang.String name,
java.lang.String type)
Adds a configuration data to the configuration file. |
protected void |
delete(java.lang.String name)
Deletes a configuration. |
protected Configuration |
get(java.lang.String name,
java.lang.String type)
Returns the Configuration object to which this manager maps the specified name and type. |
protected java.util.Properties |
getConfig()
Returns the configuration properties file. |
protected java.lang.String |
getHeaderName()
Returns the name of the header to be used for this configuration. |
protected java.lang.String |
getParamaterValue(java.lang.String name,
java.lang.String parameter)
Returns the value for the parameter. |
protected java.lang.String[] |
getParameters(java.lang.String type)
Returns all the parameters for an specific configuration type. |
protected java.lang.String[] |
getPossibleValues(java.lang.String type,
java.lang.String parameter)
Returns the possible values intended for the specific parameter on a configuration type. |
protected java.lang.String[] |
getTypes()
Returns a list of all types registered on the metadata file. |
protected java.lang.String[] |
list()
Returns a list of all configurations registered on the configuration file. |
protected java.lang.String[] |
list(java.lang.String type)
Returns all configurations that match the specified type. |
protected void |
save()
Stores all the configurations to the configuration file. |
protected void |
setParameterValue(java.lang.String name,
java.lang.String parameter,
java.lang.String value)
Sets a value for a parameter for an specific configuration. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
protected ConfigurationManager()
protected ConfigurationManager(ConfigurationManager confManager) throws ConfigurationException
confManager
- implementation for the configuration manager.
ConfigurationException
Method Detail |
protected java.util.Properties getConfig()
Properties
protected java.lang.String getHeaderName()
protected Configuration add(java.lang.String name, java.lang.String type) throws ConfigurationException
name
- the configuration nametype
- the configuration type
ConfigurationException
- thrown if a configuration with this
name already exists.protected java.lang.String[] getTypes() throws ConfigurationException
ConfigurationException
- thrown if there is an error
while searching for the types key on the metadata fileprotected java.lang.String[] list() throws ConfigurationException
ConfigurationException
- thrown if there is an error
while searching for the configurations key on the configuration fileprotected java.lang.String[] list(java.lang.String type) throws ConfigurationException
type
- the type used to filter the configurations
ConfigurationException
- thrown if there is an error
while searching the configurationsprotected void delete(java.lang.String name) throws ConfigurationException
name
- the configuration name
ConfigurationException
- thrown if the configuration
do not exits.protected Configuration get(java.lang.String name, java.lang.String type) throws ConfigurationException
name
- the configuration nametype
- the configuration type
ConfigurationException
- thrown if the configuration do
not exists.protected java.lang.String[] getParameters(java.lang.String type) throws ConfigurationException
type
- the configuration type
ConfigurationException
- thrown if the type does not existsprotected java.lang.String[] getPossibleValues(java.lang.String type, java.lang.String parameter) throws ConfigurationException
type
- the configuration typeparameter
- the parameter name
ConfigurationException
- thrown if the type does not existprotected void setParameterValue(java.lang.String name, java.lang.String parameter, java.lang.String value) throws ConfigurationException
name
- the configuration nameparameter
- the parameter namevalue
- the parameter value
ConfigurationException
- throw if the parameter name does
not existprotected void save() throws ConfigurationException
ConfigurationException
- thrown if an error occurs while
saving the configuration file.protected java.lang.String getParamaterValue(java.lang.String name, java.lang.String parameter) throws ConfigurationException
name
- the configuration nameparameter
- the parameter name
ConfigurationException
- thrown if the parameter
does not exist
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |