|
Jumpi v1.2.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.jumpi.impl.AbstractConfigurationLoader
Provides a mechanism to load and customize configuration properties.
Field Summary | |
static java.lang.String |
PROPERTY_SET_KEY
Property key determining property set to load. |
static java.lang.String |
PROPERTY_SYSTEM_PREFIX
Prefix used to identify system properties. |
static java.lang.String |
REMOVE_PROPERTY
Property value to indicate removal. |
Constructor Summary | |
AbstractConfigurationLoader()
|
Method Summary | |
protected abstract void |
addSystemProperties(java.util.Hashtable props)
Add any System properties to the list of properties. |
Properties |
getConfiguration(java.util.Hashtable parameters)
Gets the named property set using loadPropertySet(java.lang.String, java.util.Hashtable, java.util.Hashtable) . |
java.lang.String |
getJumpiClassname(java.util.Hashtable parameters)
Get the classname of the Jumpi instance. |
protected abstract void |
loadPropertySet(java.lang.String propertySetName,
java.util.Hashtable props,
java.util.Hashtable parameters)
Load a property set into the props Properties container, given a set name, and customization parameters. |
protected void |
replaceCustomProperties(java.util.Hashtable props,
java.util.Hashtable parameters)
Replace loaded property values with client provided alternatives. |
protected void |
replaceSystemProperties(java.util.Hashtable props)
Replace any property values beginning with $ with the corresponding system environment variable. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String PROPERTY_SET_KEY
public static final java.lang.String REMOVE_PROPERTY
public static final java.lang.String PROPERTY_SYSTEM_PREFIX
Constructor Detail |
public AbstractConfigurationLoader()
Method Detail |
public Properties getConfiguration(java.util.Hashtable parameters) throws java.lang.Exception
loadPropertySet(java.lang.String, java.util.Hashtable, java.util.Hashtable)
. All system
properties are then added to the properties. Thereafter any additional
properties in parameters are added and any properties to be deleted are
deleted. Expansion of system variables then takes place over all
remaining properties.
getConfiguration
in interface ConfigurationLoader
parameters
- read-only customization parameters.
java.lang.Exception
- for any failure condition.
java.lang.IllegalArgumentException
- if parameters is null.ConfigurationLoader.getConfiguration(java.util.Hashtable)
public java.lang.String getJumpiClassname(java.util.Hashtable parameters) throws java.lang.Exception
getJumpiClassname
in interface ConfigurationLoader
parameters
- read-only customization parameters - not used.
java.lang.Exception
- when any error condition occurs.ConfigurationLoader.getJumpiClassname(java.util.Hashtable)
protected abstract void loadPropertySet(java.lang.String propertySetName, java.util.Hashtable props, java.util.Hashtable parameters) throws java.lang.Exception
propertySetName
- the property set to load.props
- the container for the loaded properties.parameters
- customization properties to change loading behaviour
or results.
java.lang.Exception
- if any failure condition occurs.protected void replaceCustomProperties(java.util.Hashtable props, java.util.Hashtable parameters)
REMOVE_PROPERTY
, then
the property will be removed.
props
- loaded properties to be changed.parameters
- client provided properties to replace loaded
properties.protected abstract void addSystemProperties(java.util.Hashtable props)
props
- the Properties where to place any system properties.protected void replaceSystemProperties(java.util.Hashtable props)
props
- the properties to have system variables replaced.
|
Jumpi v1.2.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |