|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecteu.scape_project.watch.utils.ConfigUtils
public class ConfigUtils
A simple configuration utilities class, that loads the configuration files into memory and allows the retrieval of some config parameters. It first looks into the home directory for a config file, if none is found it falls back to the /etc/ directory and if none is found again it takes the default properties.
Field Summary | |
---|---|
static String |
KB_DATA_FOLDER_KEY
The property designating the data folder of the watch tdb. |
static String |
KB_INSERT_TEST_DATA
The property designating whether or not the test data should be inserted on startup. |
Constructor Summary | |
---|---|
ConfigUtils()
The default constructor loads the properties. |
Method Summary | |
---|---|
boolean |
getBooleanProperty(String key)
Returns a boolean value for the specified property key or false if none was found. |
int |
getIntProperty(String key)
Returns an integer value for the specified property key or -1. |
String |
getStringProperty(String key)
Gets a String representation for the property key or an empty string if no property was found. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String KB_DATA_FOLDER_KEY
public static final String KB_INSERT_TEST_DATA
Constructor Detail |
---|
public ConfigUtils()
ConfigUtils#loadConfig()}
Method Detail |
---|
public String getStringProperty(String key)
key
- the key of the property
public int getIntProperty(String key)
key
- the key of the property.
public boolean getBooleanProperty(String key)
key
- the key of the property.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |