|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.bowstreet.BSConfig
public class BSConfig
This class provides methods to obscure/unobscure system properties. To access system properties, use the webAppAccess.getSystemProperties() method to retrieve the com.bowstreet.util.SystemProperties singleton in your webapp, or use the getInstance() method on SystemProperties to get the singleton from custom builder code.
WebAppAccess
,
SystemProperties
Nested Class Summary | |
---|---|
static class |
BSConfig.ValueOverride
Instances of this class can override property settings on a fine-grained basis. |
Field Summary | |
---|---|
static java.lang.String |
APACHE_CONTAINER_PROVIDER
|
static java.lang.String |
BOWSTREET_BASE_FILENAME
|
static java.lang.String |
CLUSTER_BASE_FILENAME
|
static java.lang.String |
DEFAULT_APPCONTEXT
|
static java.lang.String |
enableObserverThreadsProperty
Property used to enable or disable the creation and startup of property observer threads. |
static java.lang.String |
EXPORT_VALUE_PREFIX
|
static int |
EXPORT_VALUE_PREFIX_LEN
|
static java.lang.String |
IN_BOWSTREET_CONTAINER
|
static java.lang.String |
IN_THIRD_PARTY_CONTAINER
|
static java.lang.String |
LOGGING_BASE_FILENAME
|
static java.lang.String |
OBSCURED_VALUE_PREFIX
|
static int |
OBSCURED_VALUE_PREFIX_LEN
|
static java.lang.String |
OVERRIDE_BASE_FILENAME
|
static java.lang.String |
PORTAL_BASE_FILENAME
|
static java.lang.String |
RUNTIME_ADMINSERVLETPATH
|
static java.lang.String |
RUNTIME_APPCONTEXT
|
static java.lang.String |
RUNTIME_ROOT_DIRECTORY
|
static java.lang.String |
RUNTIME_RUNNINGONSERVER
|
static java.lang.String |
RUNTIME_SERVERINFO
|
static java.lang.String |
SERVER_BASE_FILENAME
|
static java.lang.String |
SUNONE_CONTAINER_IMPLEMENTATION
|
static java.lang.String |
SUNONE_CONTAINER_PROVIDER
|
static java.lang.String |
TOMCAT_CONTAINER_IMPLEMENTATION
|
static java.lang.String |
UNKNOWN_APPCONTEXT
|
static java.lang.String |
UNKNOWN_CONTAINER_IMPLEMENTATION
|
static java.lang.String |
UNKNOWN_CONTAINER_PROVIDER
|
static java.lang.String |
UNKNOWN_CONTAINER_VERSION
|
static java.lang.String |
WEBLOGIC_CONTAINER_IMPLEMENTATION
|
static java.lang.String |
WEBLOGIC_CONTAINER_PROVIDER
|
static java.lang.String |
WEBSPHERE_CONTAINER_IMPLEMENTATION
|
static java.lang.String |
WEBSPHERE_CONTAINER_PROVIDER
|
Constructor Summary | |
---|---|
BSConfig()
|
Method Summary | |
---|---|
static void |
completeReset()
Similar to reset() above, but also clears the property cache and HTML root field. |
static void |
createInstance()
Mini factory to create an instance of this class the first time used. |
static java.lang.String |
getConfigFilePath(java.lang.String baseFileName)
A convenience method for getting a config file. |
static java.lang.String |
getHomedir()
Get a reference to our home directory file path. |
static java.lang.String |
getHomedirCanonical()
Get canonical form of home directory file path. |
static java.lang.String |
getHtmlRootDir()
Get the String value of the HTML Root directory file path. |
static BSConfig |
getInstance()
Get the singleton instance |
static java.util.Map |
getPropertiesList(java.lang.String prefix)
get a list of properties |
static com.bowstreet.util.ObservableProperties |
getPropertiesObject(java.lang.String prop)
Get a Bow Street configuration property observer. |
static java.lang.String |
getProperty(java.lang.String key)
Get a Bow Street configuration property from one of the properties files |
static java.lang.String |
getProperty(java.lang.String key,
java.lang.String defaultVal)
Get a Bow Street 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 boolean |
getPropertyBoolean(java.lang.String key,
boolean defaultValue)
Return the boolean value of a "true/false" property value. |
static java.lang.Integer |
getPropertyInt(java.lang.String key)
Get a Bow Street configuration property as an Integer. |
static int |
getPropertyInt(java.lang.String key,
int defaultValue)
Get a Bow Street 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 Bow Street configuration property as a long, returning the specified default if the config value can't be returned for some reason. |
static java.lang.String |
getServerUpTime()
This method calculates the time that a server has been up and returns the formatted result. |
static long |
getStartTime()
|
static BSConfig.ValueOverride |
getValueOverride()
Get the current value override object. |
static java.lang.String |
getVersion()
Get the engine version info. |
static boolean |
isRunningOnServer()
Get runtime parameter indicating whether we are running on a Factory server or not |
static void |
reloadProperties()
Reload all of the property files on demand. |
static void |
reloadProperties(java.lang.String baseFileName)
Reload the specified property file on demand. |
static void |
reset()
This method clear all the existing properties, and re-initialize them. |
static void |
setValueOverride(BSConfig.ValueOverride overrider)
Set a value override object. |
void |
shutdown()
Shupdown all of the property observer threads maintained by BSConfig. |
static java.lang.String |
testVersion(java.lang.String sReqVersion)
testVersion Test that the version of the Bowserver that is running is at least that of the required version (passed in). |
void |
update(java.util.Observable obj,
java.lang.Object arg)
Update request from one of our observable property objects This doesn't happen often (only when a property is changed at runtime) so we're not picky about just clearing a single cache entry. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String APACHE_CONTAINER_PROVIDER
public static final java.lang.String BOWSTREET_BASE_FILENAME
public static final java.lang.String CLUSTER_BASE_FILENAME
public static final java.lang.String DEFAULT_APPCONTEXT
public static final java.lang.String enableObserverThreadsProperty
public static final java.lang.String EXPORT_VALUE_PREFIX
public static final int EXPORT_VALUE_PREFIX_LEN
public static final java.lang.String IN_BOWSTREET_CONTAINER
public static final java.lang.String IN_THIRD_PARTY_CONTAINER
public static final java.lang.String LOGGING_BASE_FILENAME
public static final java.lang.String OBSCURED_VALUE_PREFIX
public static final int OBSCURED_VALUE_PREFIX_LEN
public static final java.lang.String OVERRIDE_BASE_FILENAME
public static final java.lang.String PORTAL_BASE_FILENAME
public static final java.lang.String RUNTIME_ADMINSERVLETPATH
public static final java.lang.String RUNTIME_APPCONTEXT
public static final java.lang.String RUNTIME_ROOT_DIRECTORY
public static final java.lang.String RUNTIME_RUNNINGONSERVER
public static final java.lang.String RUNTIME_SERVERINFO
public static final java.lang.String SERVER_BASE_FILENAME
public static final java.lang.String SUNONE_CONTAINER_IMPLEMENTATION
public static final java.lang.String SUNONE_CONTAINER_PROVIDER
public static final java.lang.String TOMCAT_CONTAINER_IMPLEMENTATION
public static final java.lang.String UNKNOWN_APPCONTEXT
public static final java.lang.String UNKNOWN_CONTAINER_IMPLEMENTATION
public static final java.lang.String UNKNOWN_CONTAINER_PROVIDER
public static final java.lang.String UNKNOWN_CONTAINER_VERSION
public static final java.lang.String WEBLOGIC_CONTAINER_IMPLEMENTATION
public static final java.lang.String WEBLOGIC_CONTAINER_PROVIDER
public static final java.lang.String WEBSPHERE_CONTAINER_IMPLEMENTATION
public static final java.lang.String WEBSPHERE_CONTAINER_PROVIDER
Constructor Detail |
---|
public BSConfig()
Method Detail |
---|
public static void completeReset()
public static void createInstance()
public static java.lang.String getConfigFilePath(java.lang.String baseFileName)
public static java.lang.String getHomedir()
public static java.lang.String getHomedirCanonical()
public static java.lang.String getHtmlRootDir()
public static BSConfig getInstance()
public static java.util.Map getPropertiesList(java.lang.String prefix)
public static com.bowstreet.util.ObservableProperties getPropertiesObject(java.lang.String prop)
public static java.lang.String getProperty(java.lang.String key)
key
- the property name (eg, "server.htmlRoot" )
public static java.lang.String getProperty(java.lang.String key, java.lang.String defaultVal)
key
- the property name (eg, "server.htmlRoot" ).defaultVal
- default value to return if property not found.
public static boolean getPropertyBoolean(java.lang.String key)
key
- the property name
public static boolean getPropertyBoolean(java.lang.String key, boolean defaultValue)
key
- the property namedefaultValue
- the default to use if the property is not set, or not set properly.
public static java.lang.Integer getPropertyInt(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 getServerUpTime()
public static long getStartTime()
public static BSConfig.ValueOverride getValueOverride()
public static java.lang.String getVersion()
public static boolean isRunningOnServer()
public static void reloadProperties() throws java.io.IOException
java.io.IOException
public static void reloadProperties(java.lang.String baseFileName) throws java.io.IOException
baseFileName
parameter must
be "override" rather than the actual name of the file used to provide the
over-ride properties.
java.io.IOException
public static void reset()
public static void setValueOverride(BSConfig.ValueOverride overrider)
public void shutdown()
shutdown
in interface com.bowstreet.servlet.ObjectLifeCycleHandler.ShutdownAwareObject
public static java.lang.String testVersion(java.lang.String sReqVersion)
public void update(java.util.Observable obj, java.lang.Object arg)
update
in interface java.util.Observer
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |