|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.slim3.commons.config.Configuration
public final class Configuration
A class to access the configuration information.
Field Summary | |
---|---|
static String |
COOL
cool value. |
static String |
DEFAULT_PATH
The default path. |
static String |
DEPLOYMENT_KEY
The deployment key. |
static String |
HOT
hot value. |
static String |
PRODUCTION
production value. |
static String |
ROOT_PACKAGES_KEY
The key for root packages. |
static String |
STAGE_KEY
The stage key. |
Method Summary | |
---|---|
static Boolean |
getBooleanValue(String key)
Returns the boolean value for the key. |
static Byte |
getByteValue(String key)
Returns the byte value for the key. |
static String |
getDeployment()
Returns the deployment value. |
static Double |
getDoubleValue(String key)
Returns the double value for the key. |
static Float |
getFloatValue(String key)
Returns the float value for the key. |
static Integer |
getIntegerValue(String key)
Returns the integer value for the key. |
static Long |
getLongValue(String key)
Returns the long value for the key. |
static String[] |
getRootPackages()
Returns the root packages. |
static Short |
getShortValue(String key)
Returns the short value for the key. |
static String |
getStage()
Returns the stage value. |
static String |
getStringValue(String key)
Returns the string value for the key. |
static void |
initialize()
Initializes the configuration information. |
static void |
initialize(String path)
Initializes the configuration information. |
static boolean |
isCoolDeployment()
Determines if the deployment is "cool". |
static boolean |
isHotDeployment()
Determines if the deployment is "hot". |
protected static String |
toLongKey(String key)
Converts the short key to a long key. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String STAGE_KEY
public static final String DEPLOYMENT_KEY
public static final String HOT
public static final String COOL
public static final String PRODUCTION
public static final String DEFAULT_PATH
public static final String ROOT_PACKAGES_KEY
Method Detail |
---|
public static void initialize()
public static void initialize(String path)
path
- the path for the configuration file
NullPointerException
- if the path parameter is null
IllegalArgumentException
- if an IO exception is encounteredpublic static String getStage()
IllegalStateException
- if the stage value is nullpublic static String getDeployment()
IllegalStateException
- if the deployment value is nullpublic static String[] getRootPackages()
public static String getStringValue(String key)
key
- the key
NullPointerException
- if the key parameter is null.protected static String toLongKey(String key)
key
- the short key
public static Byte getByteValue(String key)
key
- the key
IllegalArgumentException
- if an exception is encountered while convertingpublic static Short getShortValue(String key)
key
- the key
IllegalArgumentException
- if an exception is encountered while convertingpublic static Integer getIntegerValue(String key)
key
- the key
IllegalArgumentException
- if an exception is encountered while convertingpublic static Long getLongValue(String key)
key
- the key
IllegalArgumentException
- if an exception is encountered while convertingpublic static Float getFloatValue(String key)
key
- the key
IllegalArgumentException
- if an exception is encountered while convertingpublic static Double getDoubleValue(String key)
key
- the key
IllegalArgumentException
- if an exception is encountered while convertingpublic static Boolean getBooleanValue(String key)
key
- the key
IllegalArgumentException
- if an exception is encountered while convertingpublic static boolean isHotDeployment()
public static boolean isCoolDeployment()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |