|
Last update: 2011-06-23 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.proteios.core.Config
public class Config
Use this class to access the configuration settings for Proteios. The default configuration should be located in /proteios.config. For tomcat that is .../WEB-INF/classes/proteios.config. You could change the location of this file by specifying the environment variable PROTEIOS_CONFIG; which should be a valid URL e.g. file:///etc/proteios/config
| Field Summary | |
|---|---|
static String |
PROTEIOS_CONFIG
Environment variable optionally defined to alter location of proteios.config file |
| Constructor Summary | |
|---|---|
Config()
|
|
| Method Summary | |
|---|---|
static boolean |
getBoolean(String key)
Get the configuration setting specified by key as a
boolean value. |
static String |
getConfigFileName()
|
static int |
getInt(String key)
Get the configuration setting specified by key as an
integer value. |
static int |
getInt(String key,
int defaultValue)
Get the configuration setting specified by key as an
integer value. |
static String |
getString(String key)
Get the configuration setting specified by key as a String
value. |
static String |
getString(String key,
String defaultValue)
Get the configuration setting specified by key as a String
value. |
static void |
setConfigFileName(String configFileName)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String PROTEIOS_CONFIG
| Constructor Detail |
|---|
public Config()
| Method Detail |
|---|
public static String getConfigFileName()
public static void setConfigFileName(String configFileName)
public static String getString(String key)
key as a String
value.
key - The key for the setting
key or null if it is not
found
public static String getString(String key,
String defaultValue)
key as a String
value.
key - The key for the settingdefaultValue - The value to return if the key is not
found
key or
defaultValue if it is not found or is emptypublic static int getInt(String key)
key as an
integer value.
key - The key for the setting
key or 0 if it is not found
or is not a number
public static int getInt(String key,
int defaultValue)
key as an
integer value.
key - The key for the settingdefaultValue - The value to return if the key is not
found
key or
defaultValue if it is not foundpublic static boolean getBoolean(String key)
key as a
boolean value. FALSE is returned if the setting doesn't exist, if it
contains an empty string, or one of the values 'no', 'false' or '0'. In
all other cases TRUE is returned.
key - The key for the setting
key
|
Last update: 2011-06-23 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||