|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.xvsm.configuration.ConfigurationManager
public final class ConfigurationManager
Method Summary | |
---|---|
boolean |
getBooleanSetting(java.lang.String key)
Get the setting for the specified key as a boolean. |
static ConfigurationManager |
getInstance()
Factory method. |
int |
getIntegerSetting(java.lang.String key)
Get the setting for the specified key as an int. |
long |
getLongSetting(java.lang.String key)
Get the setting for the specified key as a long. |
java.lang.String |
getStringSetting(java.lang.String key)
Get the setting for the specified key as a String. |
static void |
init(java.lang.String configurationFile)
Initializes the ConfigurationManager to use a specific configuration File. |
static void |
removeInstance()
Destroys the ConfigurationManager instance. |
protected void |
setDefaults()
Put default values into the defaultSettings. |
boolean |
setStringSetting(java.lang.String key,
java.lang.String value)
This function stores an key - value pair in the configuration file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static ConfigurationManager getInstance()
init(String)
to initialize the
ConfigurationManager before you call this method otherwise a default
configuration file will be created and used.
public static void removeInstance()
public static void init(java.lang.String configurationFile) throws java.io.IOException
configurationFile
- the configuration File which shall be used.
java.io.IOException
- when errors occure when writing the settings to the harddisk.protected void setDefaults()
public boolean setStringSetting(java.lang.String key, java.lang.String value)
key
- The key to the new setting.value
- The value to the new setting.
public java.lang.String getStringSetting(java.lang.String key)
key
- the key to that setting.
public int getIntegerSetting(java.lang.String key)
key
- the key to that setting.
public long getLongSetting(java.lang.String key)
key
- the key to that setting.
public boolean getBooleanSetting(java.lang.String key)
key
- the key to that setting.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |