is the root location for retrieving all application specific properties.
When initializing the ConfigurationRoot Properties class, first the file 'default.properties'
is loaded from the app.home/properties directory. Second, any additional
files in the properties directory ending with '.properties', will be loaded (possibly
overridding the default.properties or each other).
This structure allows for spoke applications to add property information to the runtime, without
merging property files.
There are three levels of property objects:
the top level are the System properties (System.getProperties)
the second level are the 'default.properties'
lastly, all remaining properties files are added to the same PropertyObject.
Note that property values can be 'escaped'. a property key within a '${key}' will
be replaced by the property value for the given key.
If necessary, a future version can support spoke only overrides where a fourth level is added
and only presented to a given spoke so that one spoke does not override values seen by another spoke.
- Version:
- $Id: //depot/carrierwave/src/shared/com/vinculumtech/platform/root/ConfigurationRoot.java#6 $
Method Summary |
static boolean |
getBooleanProperty(java.lang.String property)
Returns a boolean true if the value for the given property is
the String 'true'. |
static boolean |
getBooleanProperty(java.lang.String property,
boolean defaultValue)
Returns a boolean true if the value for the given property is
the String 'true'. |
static java.util.Properties |
getEscapedProperties()
Retuns a Properies instance where all the values with escapes have been resolved. |
static int |
getIntProperty(java.lang.String property,
int defaultValue)
|
static java.util.Properties |
getProperties()
Returns a Properties instance where all escaped values are not resolved till requested. |
static java.lang.String |
getProperty(java.lang.String property)
Returns the value for the given property key. |
static java.lang.String |
getProperty(java.lang.String property,
java.lang.String defaultValue)
Returns the value for the given property key, the defaultValue if none is found. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
APPLICATION_HOME
public static final java.lang.String APPLICATION_HOME
- System property key for the root directory of the current appliation.
- See Also:
- Constant Field Values
DEFAULT_PROPERTIES_DIR
public static final java.lang.String DEFAULT_PROPERTIES_DIR
- See Also:
- Constant Field Values
DEFAULT_PROPERTIES_FILE
public static final java.lang.String DEFAULT_PROPERTIES_FILE
- See Also:
- Constant Field Values
DEFAULT_PROPERTIES_EXT
public static final java.lang.String DEFAULT_PROPERTIES_EXT
- See Also:
- Constant Field Values
INCLUDE_FILE
public static final java.lang.String INCLUDE_FILE
- See Also:
- Constant Field Values
getEscapedProperties
public static final java.util.Properties getEscapedProperties()
- Retuns a Properies instance where all the values with escapes have been resolved.
- Returns:
getProperties
public static final java.util.Properties getProperties()
- Returns a Properties instance where all escaped values are not resolved till requested.
- Returns:
getProperty
public static final java.lang.String getProperty(java.lang.String property)
- Returns the value for the given property key.
- Parameters:
property
-
- Returns:
getProperty
public static final java.lang.String getProperty(java.lang.String property,
java.lang.String defaultValue)
- Returns the value for the given property key, the defaultValue if none is found.
- Parameters:
property
- defaultValue
-
- Returns:
getBooleanProperty
public static final boolean getBooleanProperty(java.lang.String property)
- Returns a boolean true if the value for the given property is
the String 'true'.
- Parameters:
property
-
- Returns:
getBooleanProperty
public static final boolean getBooleanProperty(java.lang.String property,
boolean defaultValue)
- Returns a boolean true if the value for the given property is
the String 'true'.
- Parameters:
property
- defaultValue
-
- Returns:
getIntProperty
public static final int getIntProperty(java.lang.String property,
int defaultValue)
- Parameters:
property
- defaultValue
-
- Returns:
Copyright (C) 2002 Vinculum Technologies, Inc. All Rights Reserved.