|
||||||||||
| 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 Boolean |
GetBooleanParameter(String ParameterName)
Retrieves the parameter value attached to the specified key if the key points to a valid non internal parameter. |
static Byte |
GetByteParameter(String ParameterName)
Retrieves the parameter value attached to the specified key if the key points to a valid non internal parameter. |
static Double |
GetDoubleParameter(String ParameterName)
Retrieves the parameter value attached to the specified key if the key points to a valid non internal parameter. |
static Float |
GetFloatParameter(String ParameterName)
Retrieves the parameter value attached to the specified key if the key points to a valid non internal parameter. |
static File |
GetGonfigurationFile()
Retrieves the configuration file the ConfigurationManager is using |
static Integer |
GetIntegerParameter(String ParameterName)
Retrieves the parameter value attached to the specified key if the key points to a valid non internal parameter. |
static Long |
GetLongParameter(String ParameterName)
Retrieves the parameter value attached to the specified key if the key points to a valid non internal parameter. |
static Object |
GetParameter(String ParameterName)
Retrieves the parameter value attached to the specified key if the key points to a valid non internal parameter. |
static Short |
GetShortParameter(String ParameterName)
Retrieves the parameter value attached to the specified key if the key points to a valid non internal parameter. |
static String |
GetStringParameter(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 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ConfigurationManager()
| Method Detail |
|---|
public static File GetGonfigurationFile()
ConfigurationManager is using
public static Object GetParameter(String ParameterName)
throws Exception
ParameterName - the name of the parameter
Exception - The parameter is not defined of the value is not of the expected type
public static Boolean GetBooleanParameter(String ParameterName)
throws Exception
ParameterName - the name of the parameter
Exception - The parameter is not defined of the value is not of the expected type
public static Byte GetByteParameter(String ParameterName)
throws Exception
ParameterName - the name of the parameter
Exception - The parameter is not defined of the value is not of the expected type
public static Double GetDoubleParameter(String ParameterName)
throws Exception
ParameterName - the name of the parameter
Exception - The parameter is not defined of the value is not of the expected type
public static Float GetFloatParameter(String ParameterName)
throws Exception
ParameterName - the name of the parameter
Exception - The parameter is not defined of the value is not of the expected type
public static Integer GetIntegerParameter(String ParameterName)
throws Exception
ParameterName - the name of the parameter
Exception - The parameter is not defined of the value is not of the expected type
public static Long GetLongParameter(String ParameterName)
throws Exception
ParameterName - the name of the parameter
Exception - The parameter is not defined of the value is not of the expected type
public static Short GetShortParameter(String ParameterName)
throws Exception
ParameterName - the name of the parameter
Exception - The parameter is not defined of the value is not of the expected type
public static String GetStringParameter(String ParameterName)
throws Exception
ParameterName - the name of the parameter
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 | |||||||||