|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.myra.framework.Configuration
public final class Configuration
Helper class to get configuration property values.
Field Summary | |
---|---|
static java.lang.String |
CONFIG_FILE
The property key under which the config file name is stored. |
Method Summary | |
---|---|
static boolean |
getBooleanProperty(java.lang.String key)
Returns the property indicated by the specified key as a boolean value. |
static boolean |
getBooleanProperty(java.lang.String key,
boolean defaultValue)
Returns the property indicated by the specified key as a boolean value. |
static double |
getDoubleProperty(java.lang.String key)
Returns the property indicated by the specified key as a double value. |
static double |
getDoubleProperty(java.lang.String key,
double defaultValue)
Returns the property indicated by the specified key as an double value. |
static int |
getIntProperty(java.lang.String key)
Returns the property indicated by the specified key as an integer value. |
static int |
getIntProperty(java.lang.String key,
int defaultValue)
Returns the property indicated by the specified key as an integer value. |
static long |
getLongProperty(java.lang.String key)
Returns the property indicated by the specified key as an long value. |
static long |
getLongProperty(java.lang.String key,
int defaultValue)
Returns the property indicated by the specified key as an long value. |
static java.util.Properties |
getOptions()
Returns the configuration property options. |
static java.lang.String |
getProperty(java.lang.String key)
Returns the property indicated by the specified key. |
static java.lang.String |
getProperty(java.lang.String key,
java.lang.String defaultValue)
Returns the property indicated by the specified key. |
static boolean |
isPresent(java.lang.String key)
Checks if the property has a value associated. |
static void |
setProperty(java.lang.String property,
boolean value)
|
static void |
setProperty(java.lang.String property,
java.lang.Double value)
|
static void |
setProperty(java.lang.String property,
int value)
|
static void |
setProperty(java.lang.String property,
long value)
|
static void |
setProperty(java.lang.String property,
java.lang.String value)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String CONFIG_FILE
Method Detail |
---|
public static java.lang.String getProperty(java.lang.String key)
key
- the name of the system property.
null
if there is no property with that key.public static int getIntProperty(java.lang.String key)
key
- the name of the system property.
null
if there is no property with that key.public static long getLongProperty(java.lang.String key)
key
- the name of the system property.
null
if there is no property with that key.public static double getDoubleProperty(java.lang.String key)
key
- the name of the system property.
public static boolean getBooleanProperty(java.lang.String key)
key
- the name of the system property.
public static java.lang.String getProperty(java.lang.String key, java.lang.String defaultValue)
key
- the name of the system property.defaultValue
- a default value.
public static int getIntProperty(java.lang.String key, int defaultValue)
key
- the name of the system property.defaultValue
- a default value.
public static long getLongProperty(java.lang.String key, int defaultValue)
key
- the name of the system property.defaultValue
- a default value.
public static double getDoubleProperty(java.lang.String key, double defaultValue)
key
- the name of the system property.defaultValue
- a default value.
public static boolean getBooleanProperty(java.lang.String key, boolean defaultValue)
key
- the name of the system property.defaultValue
- a default value.
public static boolean isPresent(java.lang.String key)
key
- the property key.
true
if the property has a value associated;
otherwise false
.getProperty(String)
public static java.util.Properties getOptions()
public static void setProperty(java.lang.String property, java.lang.String value)
public static void setProperty(java.lang.String property, boolean value)
public static void setProperty(java.lang.String property, java.lang.Double value)
public static void setProperty(java.lang.String property, int value)
public static void setProperty(java.lang.String property, long value)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |