|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.scopemvc.util.ScopeConfig
Loads the Scope config in such a way that custom properties can be set from
the Java command line (-D switch) or from a custom ResourceBundle. Any
properties not supplied are loaded with the default settings in DefaultScopeConfig
.
A custom ResourceBundle name can be specified with setPropertiesName(java.lang.String)
during application initialisation, although the default "scope.config"
resource is always loaded if it can be found.
Property definitions have the following priority (from highest to lowest):
DefaultScopeConfig
DefaultScopeConfig
Method Summary | |
static char |
getChar(java.lang.String inKey)
Gets the char value of the property |
static java.lang.Class |
getClass(java.lang.String inKey)
Gets the class value of the property |
protected java.lang.String |
getDefaultConfigName()
Returns the name of the default configuration bundle. |
protected java.lang.String |
getDefaultCustomConfigName()
Returns the name of the default custom configuration bundle. |
static ScopeConfig |
getInstance()
Gets the instance of the Scope config |
static java.lang.Integer |
getInteger(java.lang.String inKey)
Gets the integer value of the property |
static java.util.Iterator |
getKeysMatching(java.lang.String inKeyPrefix)
Gets the keys starting with the prefix |
static java.lang.Object |
getObject(java.lang.String inKey)
Gets the object value of the property |
protected static java.util.HashMap |
getProperties()
Gets the properties |
protected java.lang.String |
getPropertyPrefix()
Returns the property name prefix. |
static java.lang.String |
getString(java.lang.String inKey)
Gets the string value of the property |
protected void |
initialise()
Initialises the class by loading in the configuration. |
static void |
setPropertiesName(java.lang.String inName)
Set name of custom properties that will override the DefaultScopeConfig and "scope.properties", but not override any System properties. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static ScopeConfig getInstance()
public static java.lang.String getString(java.lang.String inKey)
inKey
- The property name
public static java.lang.Object getObject(java.lang.String inKey)
inKey
- The property name
public static char getChar(java.lang.String inKey)
inKey
- The property name
public static java.lang.Class getClass(java.lang.String inKey)
inKey
- The property name
public static java.lang.Integer getInteger(java.lang.String inKey)
inKey
- The property name
public static java.util.Iterator getKeysMatching(java.lang.String inKeyPrefix)
inKeyPrefix
- The prefix of the keys to match
public static void setPropertiesName(java.lang.String inName)
inName
- The new propertiesName valueprotected static java.util.HashMap getProperties()
protected java.lang.String getDefaultCustomConfigName()
protected java.lang.String getDefaultConfigName()
protected java.lang.String getPropertyPrefix()
protected void initialise()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |