|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.bowstreet.util.SystemProperties
public class SystemProperties
Class to access Factory Property files. This class provides access to key/value pairs loaded from bowstreet.properties & cluster.properties and optionally override.properties which are located in the WEB-INF\config directory.
Constructor Summary | |
---|---|
SystemProperties()
|
Method Summary | |
---|---|
static java.lang.String |
getDocumentRoot()
Gets the String value of the Document Root directory file path. |
static SystemProperties |
getInstance()
Get the singleton instance of SystemProperties. |
static java.lang.String |
getProperty(java.lang.String key)
Gets a configuration property from one of the properties files |
static java.lang.String |
getProperty(java.lang.String key,
java.lang.String defaultVal)
Get a configuration property and return the default if none are found. |
static boolean |
getPropertyBoolean(java.lang.String key)
Return the boolean value of a "true/false" property value. |
static int |
getPropertyInt(java.lang.String key,
int defaultValue)
Get a configuration property as an int, returning the specified default if the config value can't be returned for some reason. |
static long |
getPropertyLong(java.lang.String key,
long defaultValue)
Get a configuration property as a long, returning the specified default if the config value can't be returned for some reason. |
static java.lang.String |
getWebInfDir()
Gets the String value of the WEB-INF directory file path. |
static boolean |
isRunningOnServer()
Determine if we are running in an application server or in Designer. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SystemProperties()
Method Detail |
---|
public static java.lang.String getDocumentRoot()
public static SystemProperties getInstance()
public static java.lang.String getProperty(java.lang.String key)
key
- - the property name
public static java.lang.String getProperty(java.lang.String key, java.lang.String defaultVal)
key
- - the property name.defaultVal
- default value to return if property not found.
public static boolean getPropertyBoolean(java.lang.String key)
key
- - the property name
public static int getPropertyInt(java.lang.String key, int defaultValue)
key
- - the property name.defaultValue
- default value to return if property not found.
public static long getPropertyLong(java.lang.String key, long defaultValue)
key
- - the property name.defaultValue
- default value to return if property not found.
public static java.lang.String getWebInfDir()
public static boolean isRunningOnServer()
TRUE
if called when running in an application server. FALSE
if running in Designer.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |