|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgr.uoa.di.madgik.commons.configuration.ConfigurationManager
public class ConfigurationManager
This class is the main entry point to the Configuration Utility. Once the ConfigurationManager
class is loaded, the configuration file is loaded and parsed, the DependencyGraph
is cosntructed
and then resolved. If after the parameter evaluation there are still some parameters that were not resolved
the process stops and the Configuration manager will not be able to be used for all the parameters that were
declared in the configuration file. Since all configuration parameters are evaluated at startup and the default
behaviour for most parameters is to serve values that cannot be changed, the ConfigurationManager
does not perform any type of locking. One parameter though, ObjectParameter
can be set to be shared.
This means that the same reference will be passed to any requestor of the parameter. In this case any kind of
locking that might be nessecary should be performed by the client code, or be handled withinthe objec itself.
Event though a client might change the value of an ObjectParameter
field, this change is not reflected
in the configuration file. If the ConfigurationManager
is reinitialized, the change made to the object's
field are not mirrored.
TODO Rethink the way the configuration file is found
Constructor Summary | |
---|---|
ConfigurationManager()
|
Method Summary | |
---|---|
static java.lang.Boolean |
GetBooleanParameter(java.lang.String ParameterName)
Retrieves the parameter value attached to the specified key if the key points to a valid non internal parameter. |
static java.lang.Byte |
GetByteParameter(java.lang.String ParameterName)
Retrieves the parameter value attached to the specified key if the key points to a valid non internal parameter. |
static java.lang.Double |
GetDoubleParameter(java.lang.String ParameterName)
Retrieves the parameter value attached to the specified key if the key points to a valid non internal parameter. |
static java.lang.Float |
GetFloatParameter(java.lang.String ParameterName)
Retrieves the parameter value attached to the specified key if the key points to a valid non internal parameter. |
static java.io.File |
GetGonfigurationFile()
Retrieves the configuration file the ConfigurationManager is using |
static java.lang.Integer |
GetIntegerParameter(java.lang.String ParameterName)
Retrieves the parameter value attached to the specified key if the key points to a valid non internal parameter. |
static java.lang.Long |
GetLongParameter(java.lang.String ParameterName)
Retrieves the parameter value attached to the specified key if the key points to a valid non internal parameter. |
static java.lang.Object |
GetParameter(java.lang.String ParameterName)
Retrieves the parameter value attached to the specified key if the key points to a valid non internal parameter. |
static java.lang.Short |
GetShortParameter(java.lang.String ParameterName)
Retrieves the parameter value attached to the specified key if the key points to a valid non internal parameter. |
static java.lang.String |
GetStringParameter(java.lang.String ParameterName)
Retrieves the parameter value attached to the specified key if the key points to a valid non internal parameter. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ConfigurationManager()
Method Detail |
---|
public static java.io.File GetGonfigurationFile()
ConfigurationManager
is using
public static java.lang.Object GetParameter(java.lang.String ParameterName) throws java.lang.Exception
ParameterName
- the name of the parameter
java.lang.Exception
- The parameter is not defined of the value is not of the expected typepublic static java.lang.Boolean GetBooleanParameter(java.lang.String ParameterName) throws java.lang.Exception
ParameterName
- the name of the parameter
java.lang.Exception
- The parameter is not defined of the value is not of the expected typepublic static java.lang.Byte GetByteParameter(java.lang.String ParameterName) throws java.lang.Exception
ParameterName
- the name of the parameter
java.lang.Exception
- The parameter is not defined of the value is not of the expected typepublic static java.lang.Double GetDoubleParameter(java.lang.String ParameterName) throws java.lang.Exception
ParameterName
- the name of the parameter
java.lang.Exception
- The parameter is not defined of the value is not of the expected typepublic static java.lang.Float GetFloatParameter(java.lang.String ParameterName) throws java.lang.Exception
ParameterName
- the name of the parameter
java.lang.Exception
- The parameter is not defined of the value is not of the expected typepublic static java.lang.Integer GetIntegerParameter(java.lang.String ParameterName) throws java.lang.Exception
ParameterName
- the name of the parameter
java.lang.Exception
- The parameter is not defined of the value is not of the expected typepublic static java.lang.Long GetLongParameter(java.lang.String ParameterName) throws java.lang.Exception
ParameterName
- the name of the parameter
java.lang.Exception
- The parameter is not defined of the value is not of the expected typepublic static java.lang.Short GetShortParameter(java.lang.String ParameterName) throws java.lang.Exception
ParameterName
- the name of the parameter
java.lang.Exception
- The parameter is not defined of the value is not of the expected typepublic static java.lang.String GetStringParameter(java.lang.String ParameterName) throws java.lang.Exception
ParameterName
- the name of the parameter
java.lang.Exception
- The parameter is not defined of the value is not of the expected type
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |