Class MultiFileHierarchicalConfiguration
- java.lang.Object
-
- org.apache.commons.configuration.event.EventSource
-
- org.apache.commons.configuration.AbstractConfiguration
-
- org.apache.commons.configuration.HierarchicalConfiguration
-
- org.apache.commons.configuration.AbstractHierarchicalFileConfiguration
-
- org.apache.commons.configuration.MultiFileHierarchicalConfiguration
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
,Configuration
,ConfigurationErrorListener
,ConfigurationListener
,FileConfiguration
,FileSystemBased
,Reloadable
,EntityResolverSupport
public class MultiFileHierarchicalConfiguration extends AbstractHierarchicalFileConfiguration implements ConfigurationListener, ConfigurationErrorListener, EntityResolverSupport
This class provides access to multiple configuration files that reside in a location that can be specified by a pattern allowing applications to be multi-tenant. For example, providing a pattern of "file:///opt/config/${product}/${client}/config.xml" will result in "product" and "client" being resolved on every call. The configuration resulting from the resolved pattern will be saved for future access.- Since:
- 1.6
- Version:
- $Id: MultiFileHierarchicalConfiguration.java 1534064 2013-10-21 08:44:33Z henning $
- Author:
- Commons Configuration team
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.commons.configuration.AbstractHierarchicalFileConfiguration
AbstractHierarchicalFileConfiguration.FileConfigurationDelegate
-
Nested classes/interfaces inherited from class org.apache.commons.configuration.HierarchicalConfiguration
HierarchicalConfiguration.BuilderVisitor, HierarchicalConfiguration.Node, HierarchicalConfiguration.NodeVisitor
-
-
Field Summary
-
Fields inherited from class org.apache.commons.configuration.HierarchicalConfiguration
EVENT_ADD_NODES, EVENT_CLEAR_TREE, EVENT_SUBNODE_CHANGED
-
Fields inherited from class org.apache.commons.configuration.AbstractConfiguration
END_TOKEN, EVENT_ADD_PROPERTY, EVENT_CLEAR, EVENT_CLEAR_PROPERTY, EVENT_READ_PROPERTY, EVENT_SET_PROPERTY, START_TOKEN
-
-
Constructor Summary
Constructors Constructor Description MultiFileHierarchicalConfiguration()
Default Constructor.MultiFileHierarchicalConfiguration(java.lang.String pathPattern)
Construct the configuration with the specified pattern.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addConfigurationListener(ConfigurationListener l)
Adds a configuration listener to this object.void
addErrorListener(ConfigurationErrorListener l)
Adds a new configuration error listener to this object.void
addNodes(java.lang.String key, java.util.Collection<? extends ConfigurationNode> nodes)
Directly adds sub nodes to this configuration.void
addProperty(java.lang.String key, java.lang.Object value)
Add a property to the configuration.void
clear()
Clears this configuration.void
clearConfigurationListeners()
Removes all registered configuration listeners.void
clearErrorListeners()
Removes all registered error listeners.void
clearProperty(java.lang.String key)
Removes the property with the given key.void
clearTree(java.lang.String key)
Removes all values of the property with the given name and of keys that start with this name.SubnodeConfiguration
configurationAt(java.lang.String key)
Returns a hierarchical subnode configuration for the node specified by the given key.SubnodeConfiguration
configurationAt(java.lang.String key, boolean supportUpdates)
Returns a hierarchical subnode configuration object that wraps the configuration node specified by the given key.void
configurationChanged(ConfigurationEvent event)
Reacts on configuration change events triggered by the delegate.void
configurationError(ConfigurationErrorEvent event)
Notifies this listener that in an observed configuration an error occurred.java.util.List<HierarchicalConfiguration>
configurationsAt(java.lang.String key)
Returns a list of sub configurations for all configuration nodes selected by the given key.boolean
containsKey(java.lang.String key)
Checks if the specified key is contained in this configuration.java.math.BigDecimal
getBigDecimal(java.lang.String key)
Get aBigDecimal
associated with the given configuration key.java.math.BigDecimal
getBigDecimal(java.lang.String key, java.math.BigDecimal defaultValue)
Get aBigDecimal
associated with the given configuration key.java.math.BigInteger
getBigInteger(java.lang.String key)
Get aBigInteger
associated with the given configuration key.java.math.BigInteger
getBigInteger(java.lang.String key, java.math.BigInteger defaultValue)
Get aBigInteger
associated with the given configuration key.boolean
getBoolean(java.lang.String key)
Get a boolean associated with the given configuration key.boolean
getBoolean(java.lang.String key, boolean defaultValue)
Get a boolean associated with the given configuration key.java.lang.Boolean
getBoolean(java.lang.String key, java.lang.Boolean defaultValue)
Obtains the value of the specified key and tries to convert it into aBoolean
object.byte
getByte(java.lang.String key)
Get a byte associated with the given configuration key.byte
getByte(java.lang.String key, byte defaultValue)
Get a byte associated with the given configuration key.java.lang.Byte
getByte(java.lang.String key, java.lang.Byte defaultValue)
Get aByte
associated with the given configuration key.java.util.Collection<ConfigurationListener>
getConfigurationListeners()
Returns a collection with all configuration event listeners that are currently registered at this object.double
getDouble(java.lang.String key)
Get a double associated with the given configuration key.double
getDouble(java.lang.String key, double defaultValue)
Get a double associated with the given configuration key.java.lang.Double
getDouble(java.lang.String key, java.lang.Double defaultValue)
Get aDouble
associated with the given configuration key.org.xml.sax.EntityResolver
getEntityResolver()
Return the EntityResolver associated with the class.java.util.Collection<ConfigurationErrorListener>
getErrorListeners()
Returns a collection with all configuration error listeners that are currently registered at this object.ExpressionEngine
getExpressionEngine()
Returns the expression engine used by this configuration.float
getFloat(java.lang.String key)
Get a float associated with the given configuration key.float
getFloat(java.lang.String key, float defaultValue)
Get a float associated with the given configuration key.java.lang.Float
getFloat(java.lang.String key, java.lang.Float defaultValue)
Get aFloat
associated with the given configuration key.int
getInt(java.lang.String key)
Get a int associated with the given configuration key.int
getInt(java.lang.String key, int defaultValue)
Get a int associated with the given configuration key.java.lang.Integer
getInteger(java.lang.String key, java.lang.Integer defaultValue)
Get anInteger
associated with the given configuration key.java.util.Iterator<java.lang.String>
getKeys()
Returns an iterator with all keys defined in this configuration.java.util.Iterator<java.lang.String>
getKeys(java.lang.String prefix)
Returns an iterator with all keys defined in this configuration that start with the given prefix.java.util.List<java.lang.Object>
getList(java.lang.String key)
Get a List of strings associated with the given configuration key.java.util.List<java.lang.Object>
getList(java.lang.String key, java.util.List<?> defaultValue)
Get a List of strings associated with the given configuration key.long
getLong(java.lang.String key)
Get a long associated with the given configuration key.long
getLong(java.lang.String key, long defaultValue)
Get a long associated with the given configuration key.java.lang.Long
getLong(java.lang.String key, java.lang.Long defaultValue)
Get aLong
associated with the given configuration key.int
getMaxIndex(java.lang.String key)
Returns the maximum defined index for the given key.java.util.Properties
getProperties(java.lang.String key)
Get a list of properties associated with the given configuration key.java.lang.Object
getProperty(java.lang.String key)
Fetches the specified property.ReloadingStrategy
getReloadingStrategy()
Return the reloading strategy.java.lang.Object
getReloadLock()
Returns the object to synchronize on a reload.HierarchicalConfiguration.Node
getRoot()
Returns the root node of this hierarchical configuration.ConfigurationNode
getRootNode()
Returns the root node of this hierarchical configuration.short
getShort(java.lang.String key)
Get a short associated with the given configuration key.short
getShort(java.lang.String key, short defaultValue)
Get a short associated with the given configuration key.java.lang.Short
getShort(java.lang.String key, java.lang.Short defaultValue)
Get aShort
associated with the given configuration key.java.lang.String
getString(java.lang.String key)
Get a string associated with the given configuration key.java.lang.String
getString(java.lang.String key, java.lang.String defaultValue)
Get a string associated with the given configuration key.java.lang.String[]
getStringArray(java.lang.String key)
Get an array of strings associated with the given configuration key.Configuration
interpolatedConfiguration()
Returns a configuration with the same content as this configuration, but with all variables replaced by their actual values.boolean
isAttributeSplittingDisabled()
boolean
isEmpty()
Checks if this configuration is empty.boolean
isSchemaValidation()
boolean
isValidating()
void
load()
Load the configuration from the underlying URL.void
load(java.io.File file)
Load the configuration from the specified file.void
load(java.io.InputStream in)
Load the configuration from the specified stream, using the encoding returned byFileConfiguration.getEncoding()
.void
load(java.io.InputStream in, java.lang.String encoding)
Load the configuration from the specified stream, using the specified encoding.void
load(java.io.Reader reader)
Load the configuration from the specified reader.void
load(java.lang.String fileName)
Locate the specified file and load the configuration.void
load(java.net.URL url)
Load the configuration from the specified URL.void
removeConfiguration()
Remove the current Configuration.boolean
removeConfigurationListener(ConfigurationListener l)
Removes the specified event listener so that it does not receive any further events caused by this object.boolean
removeErrorListener(ConfigurationErrorListener l)
Removes the specified error listener so that it does not receive any further events caused by this object.protected java.lang.Object
resolveContainerStore(java.lang.String key)
Returns an object from the store described by the key.void
save()
Save the configuration.void
save(java.io.File file)
Save the configuration to the specified file.void
save(java.io.OutputStream out)
Save the configuration to the specified stream, using the encoding returned byFileConfiguration.getEncoding()
.void
save(java.io.OutputStream out, java.lang.String encoding)
Save the configuration to the specified stream, using the specified encoding.void
save(java.io.Writer writer)
Save the configuration to the specified writer.void
save(java.lang.String fileName)
Save the configuration to the specified file.void
save(java.net.URL url)
Save the configuration to the specified URL.void
setAttributeSplittingDisabled(boolean attributeSplittingDisabled)
void
setEntityResolver(org.xml.sax.EntityResolver entityResolver)
Set the EntityResolver to associate with this class.void
setExpressionEngine(ExpressionEngine expressionEngine)
Sets the expression engine to be used by this configuration.void
setFilePattern(java.lang.String pathPattern)
Set the File patternvoid
setIgnoreException(boolean ignoreException)
Set to true if an empty Configuration should be returned when loading fails.void
setLoggerName(java.lang.String name)
void
setProperty(java.lang.String key, java.lang.Object value)
Sets the value of the specified property.void
setReloadingStrategy(ReloadingStrategy strategy)
Set the reloading strategy.void
setRoot(HierarchicalConfiguration.Node node)
Sets the root node of this hierarchical configuration.void
setRootNode(ConfigurationNode rootNode)
Sets the root node of this hierarchical configuration.void
setSchemaValidation(boolean schemaValidation)
void
setValidating(boolean validating)
Configuration
subset(java.lang.String prefix)
Creates a newConfiguration
object containing all keys that start with the specified prefix.-
Methods inherited from class org.apache.commons.configuration.AbstractHierarchicalFileConfiguration
addPropertyDirect, createDelegate, fetchNodeList, getBasePath, getDelegate, getEncoding, getFile, getFileName, getFileSystem, getURL, isAutoSave, refresh, reload, resetFileSystem, setAutoSave, setBasePath, setDelegate, setEncoding, setFile, setFileName, setFileSystem, setURL, subnodeConfigurationChanged
-
Methods inherited from class org.apache.commons.configuration.HierarchicalConfiguration
clearNode, clearNode, clearReferences, clone, createAddPath, createNode, createSubnodeConfiguration, createSubnodeConfiguration, fetchAddNode, findLastPathNode, findPropertyNodes, getDefaultExpressionEngine, nodeDefined, nodeDefined, removeNode, removeNode, setDefaultExpressionEngine
-
Methods inherited from class org.apache.commons.configuration.AbstractConfiguration
addErrorLogListener, append, clearPropertyDirect, copy, createInterpolator, getDefaultListDelimiter, getDelimiter, getInterpolator, getListDelimiter, getLogger, getProperties, getSubstitutor, interpolate, interpolate, interpolateHelper, isDelimiterParsingDisabled, isScalarValue, isThrowExceptionOnMissing, setDefaultListDelimiter, setDelimiter, setDelimiterParsingDisabled, setListDelimiter, setLogger, setThrowExceptionOnMissing
-
Methods inherited from class org.apache.commons.configuration.event.EventSource
createErrorEvent, createEvent, fireError, fireEvent, isDetailEvents, setDetailEvents
-
-
-
-
Constructor Detail
-
MultiFileHierarchicalConfiguration
public MultiFileHierarchicalConfiguration()
Default Constructor.
-
MultiFileHierarchicalConfiguration
public MultiFileHierarchicalConfiguration(java.lang.String pathPattern)
Construct the configuration with the specified pattern.- Parameters:
pathPattern
- The pattern to use to locate configuration files.
-
-
Method Detail
-
setLoggerName
public void setLoggerName(java.lang.String name)
-
setFilePattern
public void setFilePattern(java.lang.String pathPattern)
Set the File pattern- Parameters:
pathPattern
- The pattern for the path to the configuration.
-
isSchemaValidation
public boolean isSchemaValidation()
-
setSchemaValidation
public void setSchemaValidation(boolean schemaValidation)
-
isValidating
public boolean isValidating()
-
setValidating
public void setValidating(boolean validating)
-
isAttributeSplittingDisabled
public boolean isAttributeSplittingDisabled()
-
setAttributeSplittingDisabled
public void setAttributeSplittingDisabled(boolean attributeSplittingDisabled)
-
getReloadingStrategy
public ReloadingStrategy getReloadingStrategy()
Description copied from interface:FileConfiguration
Return the reloading strategy.- Specified by:
getReloadingStrategy
in interfaceFileConfiguration
- Overrides:
getReloadingStrategy
in classAbstractHierarchicalFileConfiguration
- Returns:
- the reloading strategy currently used
-
setReloadingStrategy
public void setReloadingStrategy(ReloadingStrategy strategy)
Description copied from interface:FileConfiguration
Set the reloading strategy.- Specified by:
setReloadingStrategy
in interfaceFileConfiguration
- Overrides:
setReloadingStrategy
in classAbstractHierarchicalFileConfiguration
- Parameters:
strategy
- the reloading strategy to use
-
setEntityResolver
public void setEntityResolver(org.xml.sax.EntityResolver entityResolver)
Description copied from interface:EntityResolverSupport
Set the EntityResolver to associate with this class.- Specified by:
setEntityResolver
in interfaceEntityResolverSupport
- Parameters:
entityResolver
- The EntityResolver
-
getEntityResolver
public org.xml.sax.EntityResolver getEntityResolver()
Description copied from interface:EntityResolverSupport
Return the EntityResolver associated with the class.- Specified by:
getEntityResolver
in interfaceEntityResolverSupport
- Returns:
- The EntityResolver.
-
setIgnoreException
public void setIgnoreException(boolean ignoreException)
Set to true if an empty Configuration should be returned when loading fails. If false an exception will be thrown.- Parameters:
ignoreException
- The ignore value.
-
addProperty
public void addProperty(java.lang.String key, java.lang.Object value)
Description copied from interface:Configuration
Add a property to the configuration. If it already exists then the value stated here will be added to the configuration entry. For example, if the property:resource.loader = file
is already present in the configuration and you calladdProperty("resource.loader", "classpath")
Then you will end up with a List like the following:["file", "classpath"]
- Specified by:
addProperty
in interfaceConfiguration
- Overrides:
addProperty
in classAbstractConfiguration
- Parameters:
key
- The key to add the property to.value
- The value to add.
-
clear
public void clear()
Description copied from class:HierarchicalConfiguration
Clears this configuration. This is a more efficient implementation than the one inherited from the base class. It directly removes all data from the root node.- Specified by:
clear
in interfaceConfiguration
- Overrides:
clear
in classHierarchicalConfiguration
-
clearProperty
public void clearProperty(java.lang.String key)
Description copied from class:HierarchicalConfiguration
Removes the property with the given key. Properties with names that start with the given key (i.e. properties below the specified key in the hierarchy) won't be affected.- Specified by:
clearProperty
in interfaceConfiguration
- Overrides:
clearProperty
in classAbstractHierarchicalFileConfiguration
- Parameters:
key
- the key of the property to be removed
-
containsKey
public boolean containsKey(java.lang.String key)
Description copied from class:HierarchicalConfiguration
Checks if the specified key is contained in this configuration. Note that for this configuration the term "contained" means that the key has an associated value. If there is a node for this key that has no value but children (either defined or undefined), this method will still return false .- Specified by:
containsKey
in interfaceConfiguration
- Overrides:
containsKey
in classAbstractHierarchicalFileConfiguration
- Parameters:
key
- the key to be chekced- Returns:
- a flag if this key is contained in this configuration
-
getBigDecimal
public java.math.BigDecimal getBigDecimal(java.lang.String key, java.math.BigDecimal defaultValue)
Description copied from interface:Configuration
Get aBigDecimal
associated with the given configuration key. If the key doesn't map to an existing object, the default value is returned.- Specified by:
getBigDecimal
in interfaceConfiguration
- Overrides:
getBigDecimal
in classAbstractConfiguration
- Parameters:
key
- The configuration key.defaultValue
- The default value.- Returns:
- The associated BigDecimal if key is found and has valid format, default value otherwise.
-
getBigDecimal
public java.math.BigDecimal getBigDecimal(java.lang.String key)
Description copied from class:AbstractConfiguration
Get aBigDecimal
associated with the given configuration key.- Specified by:
getBigDecimal
in interfaceConfiguration
- Overrides:
getBigDecimal
in classAbstractConfiguration
- Parameters:
key
- The configuration key.- Returns:
- The associated BigDecimal if key is found and has valid format
- See Also:
AbstractConfiguration.setThrowExceptionOnMissing(boolean)
-
getBigInteger
public java.math.BigInteger getBigInteger(java.lang.String key, java.math.BigInteger defaultValue)
Description copied from interface:Configuration
Get aBigInteger
associated with the given configuration key. If the key doesn't map to an existing object, the default value is returned.- Specified by:
getBigInteger
in interfaceConfiguration
- Overrides:
getBigInteger
in classAbstractConfiguration
- Parameters:
key
- The configuration key.defaultValue
- The default value.- Returns:
- The associated BigInteger if key is found and has valid format, default value otherwise.
-
getBigInteger
public java.math.BigInteger getBigInteger(java.lang.String key)
Description copied from class:AbstractConfiguration
Get aBigInteger
associated with the given configuration key.- Specified by:
getBigInteger
in interfaceConfiguration
- Overrides:
getBigInteger
in classAbstractConfiguration
- Parameters:
key
- The configuration key.- Returns:
- The associated BigInteger if key is found and has valid format
- See Also:
AbstractConfiguration.setThrowExceptionOnMissing(boolean)
-
getBoolean
public boolean getBoolean(java.lang.String key, boolean defaultValue)
Description copied from class:AbstractConfiguration
Get a boolean associated with the given configuration key. If the key doesn't map to an existing object, the default value is returned.- Specified by:
getBoolean
in interfaceConfiguration
- Overrides:
getBoolean
in classAbstractConfiguration
- Parameters:
key
- The configuration key.defaultValue
- The default value.- Returns:
- The associated boolean.
- See Also:
PropertyConverter.toBoolean(Object)
-
getBoolean
public java.lang.Boolean getBoolean(java.lang.String key, java.lang.Boolean defaultValue)
Description copied from class:AbstractConfiguration
Obtains the value of the specified key and tries to convert it into aBoolean
object. If the property has no value, the passed in default value will be used.- Specified by:
getBoolean
in interfaceConfiguration
- Overrides:
getBoolean
in classAbstractConfiguration
- Parameters:
key
- the key of the propertydefaultValue
- the default value- Returns:
- the value of this key converted to a
Boolean
- See Also:
PropertyConverter.toBoolean(Object)
-
getBoolean
public boolean getBoolean(java.lang.String key)
Description copied from class:AbstractConfiguration
Get a boolean associated with the given configuration key.- Specified by:
getBoolean
in interfaceConfiguration
- Overrides:
getBoolean
in classAbstractConfiguration
- Parameters:
key
- The configuration key.- Returns:
- The associated boolean.
- See Also:
PropertyConverter.toBoolean(Object)
-
getByte
public byte getByte(java.lang.String key, byte defaultValue)
Description copied from interface:Configuration
Get a byte associated with the given configuration key. If the key doesn't map to an existing object, the default value is returned.- Specified by:
getByte
in interfaceConfiguration
- Overrides:
getByte
in classAbstractConfiguration
- Parameters:
key
- The configuration key.defaultValue
- The default value.- Returns:
- The associated byte.
-
getByte
public java.lang.Byte getByte(java.lang.String key, java.lang.Byte defaultValue)
Description copied from interface:Configuration
Get aByte
associated with the given configuration key.- Specified by:
getByte
in interfaceConfiguration
- Overrides:
getByte
in classAbstractConfiguration
- Parameters:
key
- The configuration key.defaultValue
- The default value.- Returns:
- The associated byte if key is found and has valid format, default value otherwise.
-
getByte
public byte getByte(java.lang.String key)
Description copied from interface:Configuration
Get a byte associated with the given configuration key.- Specified by:
getByte
in interfaceConfiguration
- Overrides:
getByte
in classAbstractConfiguration
- Parameters:
key
- The configuration key.- Returns:
- The associated byte.
-
getDouble
public double getDouble(java.lang.String key, double defaultValue)
Description copied from interface:Configuration
Get a double associated with the given configuration key. If the key doesn't map to an existing object, the default value is returned.- Specified by:
getDouble
in interfaceConfiguration
- Overrides:
getDouble
in classAbstractConfiguration
- Parameters:
key
- The configuration key.defaultValue
- The default value.- Returns:
- The associated double.
-
getDouble
public java.lang.Double getDouble(java.lang.String key, java.lang.Double defaultValue)
Description copied from interface:Configuration
Get aDouble
associated with the given configuration key.- Specified by:
getDouble
in interfaceConfiguration
- Overrides:
getDouble
in classAbstractConfiguration
- Parameters:
key
- The configuration key.defaultValue
- The default value.- Returns:
- The associated double if key is found and has valid format, default value otherwise.
-
getDouble
public double getDouble(java.lang.String key)
Description copied from interface:Configuration
Get a double associated with the given configuration key.- Specified by:
getDouble
in interfaceConfiguration
- Overrides:
getDouble
in classAbstractConfiguration
- Parameters:
key
- The configuration key.- Returns:
- The associated double.
-
getFloat
public float getFloat(java.lang.String key, float defaultValue)
Description copied from interface:Configuration
Get a float associated with the given configuration key. If the key doesn't map to an existing object, the default value is returned.- Specified by:
getFloat
in interfaceConfiguration
- Overrides:
getFloat
in classAbstractConfiguration
- Parameters:
key
- The configuration key.defaultValue
- The default value.- Returns:
- The associated float.
-
getFloat
public java.lang.Float getFloat(java.lang.String key, java.lang.Float defaultValue)
Description copied from interface:Configuration
Get aFloat
associated with the given configuration key. If the key doesn't map to an existing object, the default value is returned.- Specified by:
getFloat
in interfaceConfiguration
- Overrides:
getFloat
in classAbstractConfiguration
- Parameters:
key
- The configuration key.defaultValue
- The default value.- Returns:
- The associated float if key is found and has valid format, default value otherwise.
-
getFloat
public float getFloat(java.lang.String key)
Description copied from interface:Configuration
Get a float associated with the given configuration key.- Specified by:
getFloat
in interfaceConfiguration
- Overrides:
getFloat
in classAbstractConfiguration
- Parameters:
key
- The configuration key.- Returns:
- The associated float.
-
getInt
public int getInt(java.lang.String key, int defaultValue)
Description copied from interface:Configuration
Get a int associated with the given configuration key. If the key doesn't map to an existing object, the default value is returned.- Specified by:
getInt
in interfaceConfiguration
- Overrides:
getInt
in classAbstractConfiguration
- Parameters:
key
- The configuration key.defaultValue
- The default value.- Returns:
- The associated int.
-
getInt
public int getInt(java.lang.String key)
Description copied from interface:Configuration
Get a int associated with the given configuration key.- Specified by:
getInt
in interfaceConfiguration
- Overrides:
getInt
in classAbstractConfiguration
- Parameters:
key
- The configuration key.- Returns:
- The associated int.
-
getInteger
public java.lang.Integer getInteger(java.lang.String key, java.lang.Integer defaultValue)
Description copied from interface:Configuration
Get anInteger
associated with the given configuration key. If the key doesn't map to an existing object, the default value is returned.- Specified by:
getInteger
in interfaceConfiguration
- Overrides:
getInteger
in classAbstractConfiguration
- Parameters:
key
- The configuration key.defaultValue
- The default value.- Returns:
- The associated int if key is found and has valid format, default value otherwise.
-
getKeys
public java.util.Iterator<java.lang.String> getKeys()
Description copied from class:HierarchicalConfiguration
Returns an iterator with all keys defined in this configuration. Note that the keys returned by this method will not contain any indices. This means that some structure will be lost.- Specified by:
getKeys
in interfaceConfiguration
- Overrides:
getKeys
in classAbstractHierarchicalFileConfiguration
- Returns:
- an iterator with the defined keys in this configuration
-
getKeys
public java.util.Iterator<java.lang.String> getKeys(java.lang.String prefix)
Description copied from class:HierarchicalConfiguration
Returns an iterator with all keys defined in this configuration that start with the given prefix. The returned keys will not contain any indices. This implementation tries to locate a node whose key is the same as the passed in prefix. Then the subtree of this node is traversed, and the keys of all nodes encountered (including attributes) are added to the result set.- Specified by:
getKeys
in interfaceConfiguration
- Overrides:
getKeys
in classAbstractHierarchicalFileConfiguration
- Parameters:
prefix
- the prefix of the keys to start with- Returns:
- an iterator with the found keys
- See Also:
Configuration.getKeys()
-
getList
public java.util.List<java.lang.Object> getList(java.lang.String key, java.util.List<?> defaultValue)
Description copied from interface:Configuration
Get a List of strings associated with the given configuration key. If the key doesn't map to an existing object, the default value is returned.- Specified by:
getList
in interfaceConfiguration
- Overrides:
getList
in classAbstractConfiguration
- Parameters:
key
- The configuration key.defaultValue
- The default value.- Returns:
- The associated List of strings.
-
getList
public java.util.List<java.lang.Object> getList(java.lang.String key)
Description copied from class:AbstractConfiguration
Get a List of strings associated with the given configuration key. If the key doesn't map to an existing object an empty List is returned.- Specified by:
getList
in interfaceConfiguration
- Overrides:
getList
in classAbstractConfiguration
- Parameters:
key
- The configuration key.- Returns:
- The associated List.
- See Also:
AbstractConfiguration.getStringArray(String)
-
getLong
public long getLong(java.lang.String key, long defaultValue)
Description copied from interface:Configuration
Get a long associated with the given configuration key. If the key doesn't map to an existing object, the default value is returned.- Specified by:
getLong
in interfaceConfiguration
- Overrides:
getLong
in classAbstractConfiguration
- Parameters:
key
- The configuration key.defaultValue
- The default value.- Returns:
- The associated long.
-
getLong
public java.lang.Long getLong(java.lang.String key, java.lang.Long defaultValue)
Description copied from interface:Configuration
Get aLong
associated with the given configuration key. If the key doesn't map to an existing object, the default value is returned.- Specified by:
getLong
in interfaceConfiguration
- Overrides:
getLong
in classAbstractConfiguration
- Parameters:
key
- The configuration key.defaultValue
- The default value.- Returns:
- The associated long if key is found and has valid format, default value otherwise.
-
getLong
public long getLong(java.lang.String key)
Description copied from interface:Configuration
Get a long associated with the given configuration key.- Specified by:
getLong
in interfaceConfiguration
- Overrides:
getLong
in classAbstractConfiguration
- Parameters:
key
- The configuration key.- Returns:
- The associated long.
-
getProperties
public java.util.Properties getProperties(java.lang.String key)
Description copied from interface:Configuration
Get a list of properties associated with the given configuration key. This method expects the given key to have an arbitrary number of String values, each of which is of the form {code key=value}. These strings are split at the equals sign, and the key parts will become keys of the returnedProperties
object, the value parts become values.- Specified by:
getProperties
in interfaceConfiguration
- Overrides:
getProperties
in classAbstractConfiguration
- Parameters:
key
- The configuration key.- Returns:
- The associated properties if key is found.
-
getProperty
public java.lang.Object getProperty(java.lang.String key)
Description copied from class:HierarchicalConfiguration
Fetches the specified property. This task is delegated to the associated expression engine.- Specified by:
getProperty
in interfaceConfiguration
- Overrides:
getProperty
in classAbstractHierarchicalFileConfiguration
- Parameters:
key
- the key to be looked up- Returns:
- the found value
-
getShort
public short getShort(java.lang.String key, short defaultValue)
Description copied from interface:Configuration
Get a short associated with the given configuration key.- Specified by:
getShort
in interfaceConfiguration
- Overrides:
getShort
in classAbstractConfiguration
- Parameters:
key
- The configuration key.defaultValue
- The default value.- Returns:
- The associated short.
-
getShort
public java.lang.Short getShort(java.lang.String key, java.lang.Short defaultValue)
Description copied from interface:Configuration
Get aShort
associated with the given configuration key. If the key doesn't map to an existing object, the default value is returned.- Specified by:
getShort
in interfaceConfiguration
- Overrides:
getShort
in classAbstractConfiguration
- Parameters:
key
- The configuration key.defaultValue
- The default value.- Returns:
- The associated short if key is found and has valid format, default value otherwise.
-
getShort
public short getShort(java.lang.String key)
Description copied from interface:Configuration
Get a short associated with the given configuration key.- Specified by:
getShort
in interfaceConfiguration
- Overrides:
getShort
in classAbstractConfiguration
- Parameters:
key
- The configuration key.- Returns:
- The associated short.
-
getString
public java.lang.String getString(java.lang.String key, java.lang.String defaultValue)
Description copied from interface:Configuration
Get a string associated with the given configuration key. If the key doesn't map to an existing object, the default value is returned.- Specified by:
getString
in interfaceConfiguration
- Overrides:
getString
in classAbstractConfiguration
- Parameters:
key
- The configuration key.defaultValue
- The default value.- Returns:
- The associated string if key is found and has valid format, default value otherwise.
-
getString
public java.lang.String getString(java.lang.String key)
Description copied from class:AbstractConfiguration
Get a string associated with the given configuration key.- Specified by:
getString
in interfaceConfiguration
- Overrides:
getString
in classAbstractConfiguration
- Parameters:
key
- The configuration key.- Returns:
- The associated string.
- See Also:
AbstractConfiguration.setThrowExceptionOnMissing(boolean)
-
getStringArray
public java.lang.String[] getStringArray(java.lang.String key)
Description copied from class:AbstractConfiguration
Get an array of strings associated with the given configuration key. If the key doesn't map to an existing object, an empty array is returned. If a property is added to a configuration, it is checked whether it contains multiple values. This is obvious if the added object is a list or an array. For strings it is checked whether the string contains the list delimiter character that can be specified using thesetListDelimiter()
method. If this is the case, the string is split at these positions resulting in a property with multiple values.- Specified by:
getStringArray
in interfaceConfiguration
- Overrides:
getStringArray
in classAbstractConfiguration
- Parameters:
key
- The configuration key.- Returns:
- The associated string array if key is found.
- See Also:
AbstractConfiguration.setListDelimiter(char)
,AbstractConfiguration.setDelimiterParsingDisabled(boolean)
-
isEmpty
public boolean isEmpty()
Description copied from class:HierarchicalConfiguration
Checks if this configuration is empty. Empty means that there are no keys with any values, though there can be some (empty) nodes.- Specified by:
isEmpty
in interfaceConfiguration
- Overrides:
isEmpty
in classAbstractHierarchicalFileConfiguration
- Returns:
- a flag if this configuration is empty
-
setProperty
public void setProperty(java.lang.String key, java.lang.Object value)
Description copied from class:HierarchicalConfiguration
Sets the value of the specified property.- Specified by:
setProperty
in interfaceConfiguration
- Overrides:
setProperty
in classAbstractHierarchicalFileConfiguration
- Parameters:
key
- the key of the property to setvalue
- the new value of this property
-
subset
public Configuration subset(java.lang.String prefix)
Description copied from class:HierarchicalConfiguration
Creates a newConfiguration
object containing all keys that start with the specified prefix. This implementation will return aHierarchicalConfiguration
object so that the structure of the keys will be saved. The nodes selected by the prefix (it is possible that multiple nodes are selected) are mapped to the root node of the returned configuration, i.e. their children and attributes will become children and attributes of the new root node. However a value of the root node is only set if exactly one of the selected nodes contain a value (if multiple nodes have a value, there is simply no way to decide how these values are merged together). Note that the returnedConfiguration
object is not connected to its source configuration: updates on the source configuration are not reflected in the subset and vice versa.- Specified by:
subset
in interfaceConfiguration
- Overrides:
subset
in classHierarchicalConfiguration
- Parameters:
prefix
- the prefix of the keys for the subset- Returns:
- a new configuration object representing the selected subset
- See Also:
SubsetConfiguration
-
getReloadLock
public java.lang.Object getReloadLock()
Description copied from class:HierarchicalConfiguration
Returns the object to synchronize on a reload. This class is not reloadable so this object isn't important- Specified by:
getReloadLock
in interfaceReloadable
- Overrides:
getReloadLock
in classAbstractHierarchicalFileConfiguration
- Returns:
- the lock object
-
getRoot
public HierarchicalConfiguration.Node getRoot()
Description copied from class:HierarchicalConfiguration
Returns the root node of this hierarchical configuration. This method exists for backwards compatibility only. New code should use theHierarchicalConfiguration.getRootNode()
method instead, which operates on the preferred data typeConfigurationNode
.- Overrides:
getRoot
in classHierarchicalConfiguration
- Returns:
- the root node
-
setRoot
public void setRoot(HierarchicalConfiguration.Node node)
Description copied from class:HierarchicalConfiguration
Sets the root node of this hierarchical configuration. This method exists for backwards compatibility only. New code should use theHierarchicalConfiguration.setRootNode(ConfigurationNode)
method instead, which operates on the preferred data typeConfigurationNode
.- Overrides:
setRoot
in classHierarchicalConfiguration
- Parameters:
node
- the root node
-
getRootNode
public ConfigurationNode getRootNode()
Description copied from class:HierarchicalConfiguration
Returns the root node of this hierarchical configuration.- Overrides:
getRootNode
in classHierarchicalConfiguration
- Returns:
- the root node
-
setRootNode
public void setRootNode(ConfigurationNode rootNode)
Description copied from class:HierarchicalConfiguration
Sets the root node of this hierarchical configuration.- Overrides:
setRootNode
in classHierarchicalConfiguration
- Parameters:
rootNode
- the root node
-
getExpressionEngine
public ExpressionEngine getExpressionEngine()
Description copied from class:HierarchicalConfiguration
Returns the expression engine used by this configuration. This method will never return null; if no specific expression engine was set, the default expression engine will be returned.- Overrides:
getExpressionEngine
in classHierarchicalConfiguration
- Returns:
- the current expression engine
-
setExpressionEngine
public void setExpressionEngine(ExpressionEngine expressionEngine)
Description copied from class:HierarchicalConfiguration
Sets the expression engine to be used by this configuration. All property keys this configuration has to deal with will be interpreted by this engine.- Overrides:
setExpressionEngine
in classHierarchicalConfiguration
- Parameters:
expressionEngine
- the new expression engine; can be null, then the default expression engine will be used
-
addNodes
public void addNodes(java.lang.String key, java.util.Collection<? extends ConfigurationNode> nodes)
Description copied from class:AbstractHierarchicalFileConfiguration
Directly adds sub nodes to this configuration. This implementation checks whether auto save is necessary after executing the operation.- Overrides:
addNodes
in classAbstractHierarchicalFileConfiguration
- Parameters:
key
- the key where the nodes are to be addednodes
- a collection with the nodes to be added
-
configurationAt
public SubnodeConfiguration configurationAt(java.lang.String key, boolean supportUpdates)
Description copied from class:HierarchicalConfiguration
Returns a hierarchical subnode configuration object that wraps the configuration node specified by the given key. This method provides an easy means of accessing sub trees of a hierarchical configuration. In the returned configuration the sub tree can directly be accessed, it becomes the root node of this configuration. Because of this the passed in key must select exactly one configuration node; otherwise an
IllegalArgumentException
will be thrown.The difference between this method and the
HierarchicalConfiguration.subset(String)
method is thatsubset()
supports arbitrary subsets of configuration nodes whileconfigurationAt()
only returns a single sub tree. Please refer to the documentation of theSubnodeConfiguration
class to obtain further information about subnode configurations and when they should be used.With the
supportUpdate
flag the behavior of the returnedSubnodeConfiguration
regarding updates of its parent configuration can be determined. A subnode configuration operates on the same nodes as its parent, so changes at one configuration are normally directly visible for the other configuration. There are however changes of the parent configuration, which are not recognized by the subnode configuration per default. An example for this is a reload operation (for file-based configurations): Here the complete node set of the parent configuration is replaced, but the subnode configuration still references the old nodes. If such changes should be detected by the subnode configuration, thesupportUpdates
flag must be set to true. This causes the subnode configuration to reevaluate the key used for its creation each time it is accessed. This guarantees that the subnode configuration always stays in sync with its key, even if the parent configuration's data significantly changes. If such a change makes the key invalid - because it now no longer points to exactly one node -, the subnode configuration is not reconstructed, but keeps its old data. It is then quasi detached from its parent.- Overrides:
configurationAt
in classHierarchicalConfiguration
- Parameters:
key
- the key that selects the sub treesupportUpdates
- a flag whether the returned subnode configuration should be able to handle updates of its parent- Returns:
- a hierarchical configuration that contains this sub tree
- See Also:
SubnodeConfiguration
-
configurationAt
public SubnodeConfiguration configurationAt(java.lang.String key)
Description copied from class:HierarchicalConfiguration
Returns a hierarchical subnode configuration for the node specified by the given key. This is a short form forconfigurationAt(key, <b>false</b>)
.- Overrides:
configurationAt
in classHierarchicalConfiguration
- Parameters:
key
- the key that selects the sub tree- Returns:
- a hierarchical configuration that contains this sub tree
- See Also:
SubnodeConfiguration
-
configurationsAt
public java.util.List<HierarchicalConfiguration> configurationsAt(java.lang.String key)
Description copied from class:HierarchicalConfiguration
Returns a list of sub configurations for all configuration nodes selected by the given key. This method will evaluate the passed in key (using the currentExpressionEngine
) and then create a subnode configuration for each returned node (likeHierarchicalConfiguration.configurationAt(String)
}). This is especially useful when dealing with list-like structures. As an example consider the configuration that contains data about database tables and their fields. If you need access to all fields of a certain table, you can simply doList fields = config.configurationsAt("tables.table(0).fields.field"); for(Iterator it = fields.iterator(); it.hasNext();) { HierarchicalConfiguration sub = (HierarchicalConfiguration) it.next(); // now the children and attributes of the field node can be // directly accessed String fieldName = sub.getString("name"); String fieldType = sub.getString("type"); ...
- Overrides:
configurationsAt
in classHierarchicalConfiguration
- Parameters:
key
- the key for selecting the desired nodes- Returns:
- a list with hierarchical configuration objects; each configuration represents one of the nodes selected by the passed in key
-
clearTree
public void clearTree(java.lang.String key)
Description copied from class:HierarchicalConfiguration
Removes all values of the property with the given name and of keys that start with this name. So if there is a property with the key "foo" and a property with the key "foo.bar", a call ofclearTree("foo")
would remove both properties.- Overrides:
clearTree
in classAbstractHierarchicalFileConfiguration
- Parameters:
key
- the key of the property to be removed
-
getMaxIndex
public int getMaxIndex(java.lang.String key)
Description copied from class:HierarchicalConfiguration
Returns the maximum defined index for the given key. This is useful if there are multiple values for this key. They can then be addressed separately by specifying indices from 0 to the return value of this method.- Overrides:
getMaxIndex
in classHierarchicalConfiguration
- Parameters:
key
- the key to be checked- Returns:
- the maximum defined index for this key
-
interpolatedConfiguration
public Configuration interpolatedConfiguration()
Description copied from class:HierarchicalConfiguration
Returns a configuration with the same content as this configuration, but with all variables replaced by their actual values. This implementation is specific for hierarchical configurations. It clones the current configuration and runs a specialized visitor on the clone, which performs interpolation on the single configuration nodes.- Overrides:
interpolatedConfiguration
in classHierarchicalConfiguration
- Returns:
- a configuration with all variables interpolated
-
addConfigurationListener
public void addConfigurationListener(ConfigurationListener l)
Description copied from class:EventSource
Adds a configuration listener to this object.- Overrides:
addConfigurationListener
in classEventSource
- Parameters:
l
- the listener to add
-
removeConfigurationListener
public boolean removeConfigurationListener(ConfigurationListener l)
Description copied from class:EventSource
Removes the specified event listener so that it does not receive any further events caused by this object.- Overrides:
removeConfigurationListener
in classEventSource
- Parameters:
l
- the listener to be removed- Returns:
- a flag whether the event listener was found
-
getConfigurationListeners
public java.util.Collection<ConfigurationListener> getConfigurationListeners()
Description copied from class:EventSource
Returns a collection with all configuration event listeners that are currently registered at this object.- Overrides:
getConfigurationListeners
in classEventSource
- Returns:
- a collection with the registered
ConfigurationListener
s (this collection is a snapshot of the currently registered listeners; manipulating it has no effect on this event source object)
-
clearConfigurationListeners
public void clearConfigurationListeners()
Description copied from class:EventSource
Removes all registered configuration listeners.- Overrides:
clearConfigurationListeners
in classEventSource
-
addErrorListener
public void addErrorListener(ConfigurationErrorListener l)
Description copied from class:EventSource
Adds a new configuration error listener to this object. This listener will then be notified about internal problems.- Overrides:
addErrorListener
in classEventSource
- Parameters:
l
- the listener to register (must not be null)
-
removeErrorListener
public boolean removeErrorListener(ConfigurationErrorListener l)
Description copied from class:EventSource
Removes the specified error listener so that it does not receive any further events caused by this object.- Overrides:
removeErrorListener
in classEventSource
- Parameters:
l
- the listener to remove- Returns:
- a flag whether the listener could be found and removed
-
clearErrorListeners
public void clearErrorListeners()
Description copied from class:EventSource
Removes all registered error listeners.- Overrides:
clearErrorListeners
in classEventSource
-
getErrorListeners
public java.util.Collection<ConfigurationErrorListener> getErrorListeners()
Description copied from class:EventSource
Returns a collection with all configuration error listeners that are currently registered at this object.- Overrides:
getErrorListeners
in classEventSource
- Returns:
- a collection with the registered
ConfigurationErrorListener
s (this collection is a snapshot of the currently registered listeners; it cannot be manipulated)
-
save
public void save(java.io.Writer writer) throws ConfigurationException
Description copied from interface:FileConfiguration
Save the configuration to the specified writer.- Specified by:
save
in interfaceFileConfiguration
- Parameters:
writer
- the writer- Throws:
ConfigurationException
- if an error occurs during the save operation
-
load
public void load(java.io.Reader reader) throws ConfigurationException
Description copied from interface:FileConfiguration
Load the configuration from the specified reader.- Specified by:
load
in interfaceFileConfiguration
- Parameters:
reader
- the reader- Throws:
ConfigurationException
- if an error occurs during the load operation
-
load
public void load() throws ConfigurationException
Description copied from interface:FileConfiguration
Load the configuration from the underlying URL. If the URL is not specified, it attempts to locate the specified file name.- Specified by:
load
in interfaceFileConfiguration
- Overrides:
load
in classAbstractHierarchicalFileConfiguration
- Throws:
ConfigurationException
- if an error occurs during the load operation
-
load
public void load(java.lang.String fileName) throws ConfigurationException
Description copied from interface:FileConfiguration
Locate the specified file and load the configuration.- Specified by:
load
in interfaceFileConfiguration
- Overrides:
load
in classAbstractHierarchicalFileConfiguration
- Parameters:
fileName
- the name of the file loaded- Throws:
ConfigurationException
- if an error occurs during the load operation
-
load
public void load(java.io.File file) throws ConfigurationException
Description copied from interface:FileConfiguration
Load the configuration from the specified file.- Specified by:
load
in interfaceFileConfiguration
- Overrides:
load
in classAbstractHierarchicalFileConfiguration
- Parameters:
file
- the loaded file- Throws:
ConfigurationException
- if an error occurs during the load operation
-
load
public void load(java.net.URL url) throws ConfigurationException
Description copied from interface:FileConfiguration
Load the configuration from the specified URL.- Specified by:
load
in interfaceFileConfiguration
- Overrides:
load
in classAbstractHierarchicalFileConfiguration
- Parameters:
url
- the URL of the file loaded- Throws:
ConfigurationException
- if an error occurs during the load operation
-
load
public void load(java.io.InputStream in) throws ConfigurationException
Description copied from interface:FileConfiguration
Load the configuration from the specified stream, using the encoding returned byFileConfiguration.getEncoding()
.- Specified by:
load
in interfaceFileConfiguration
- Overrides:
load
in classAbstractHierarchicalFileConfiguration
- Parameters:
in
- the input stream- Throws:
ConfigurationException
- if an error occurs during the load operation
-
load
public void load(java.io.InputStream in, java.lang.String encoding) throws ConfigurationException
Description copied from interface:FileConfiguration
Load the configuration from the specified stream, using the specified encoding. If the encoding is null the default encoding is used.- Specified by:
load
in interfaceFileConfiguration
- Overrides:
load
in classAbstractHierarchicalFileConfiguration
- Parameters:
in
- the input streamencoding
- the encoding used.null
to use the default encoding- Throws:
ConfigurationException
- if an error occurs during the load operation
-
save
public void save() throws ConfigurationException
Description copied from interface:FileConfiguration
Save the configuration.- Specified by:
save
in interfaceFileConfiguration
- Overrides:
save
in classAbstractHierarchicalFileConfiguration
- Throws:
ConfigurationException
- if an error occurs during the save operation
-
save
public void save(java.lang.String fileName) throws ConfigurationException
Description copied from interface:FileConfiguration
Save the configuration to the specified file.- Specified by:
save
in interfaceFileConfiguration
- Overrides:
save
in classAbstractHierarchicalFileConfiguration
- Parameters:
fileName
- the name of the file to be saved- Throws:
ConfigurationException
- if an error occurs during the save operation
-
save
public void save(java.io.File file) throws ConfigurationException
Description copied from interface:FileConfiguration
Save the configuration to the specified file.- Specified by:
save
in interfaceFileConfiguration
- Overrides:
save
in classAbstractHierarchicalFileConfiguration
- Parameters:
file
- specifies the file to be saved- Throws:
ConfigurationException
- if an error occurs during the save operation
-
save
public void save(java.net.URL url) throws ConfigurationException
Description copied from interface:FileConfiguration
Save the configuration to the specified URL.- Specified by:
save
in interfaceFileConfiguration
- Overrides:
save
in classAbstractHierarchicalFileConfiguration
- Parameters:
url
- the URL- Throws:
ConfigurationException
- if an error occurs during the save operation
-
save
public void save(java.io.OutputStream out) throws ConfigurationException
Description copied from interface:FileConfiguration
Save the configuration to the specified stream, using the encoding returned byFileConfiguration.getEncoding()
.- Specified by:
save
in interfaceFileConfiguration
- Overrides:
save
in classAbstractHierarchicalFileConfiguration
- Parameters:
out
- the output stream- Throws:
ConfigurationException
- if an error occurs during the save operation
-
save
public void save(java.io.OutputStream out, java.lang.String encoding) throws ConfigurationException
Description copied from interface:FileConfiguration
Save the configuration to the specified stream, using the specified encoding. If the encoding is null the default encoding is used.- Specified by:
save
in interfaceFileConfiguration
- Overrides:
save
in classAbstractHierarchicalFileConfiguration
- Parameters:
out
- the output streamencoding
- the encoding to be used- Throws:
ConfigurationException
- if an error occurs during the save operation
-
configurationChanged
public void configurationChanged(ConfigurationEvent event)
Description copied from class:AbstractHierarchicalFileConfiguration
Reacts on configuration change events triggered by the delegate. These events are passed to the registered configuration listeners.- Specified by:
configurationChanged
in interfaceConfigurationListener
- Overrides:
configurationChanged
in classAbstractHierarchicalFileConfiguration
- Parameters:
event
- the triggered event
-
configurationError
public void configurationError(ConfigurationErrorEvent event)
Description copied from interface:ConfigurationErrorListener
Notifies this listener that in an observed configuration an error occurred. All information available about this error, including the causingThrowable
object, can be obtained from the passed in event object.- Specified by:
configurationError
in interfaceConfigurationErrorListener
- Overrides:
configurationError
in classAbstractHierarchicalFileConfiguration
- Parameters:
event
- the event object with information about the error
-
resolveContainerStore
protected java.lang.Object resolveContainerStore(java.lang.String key)
Description copied from class:AbstractConfiguration
Returns an object from the store described by the key. If the value is a Collection object, replace it with the first object in the collection.- Overrides:
resolveContainerStore
in classAbstractConfiguration
- Parameters:
key
- The property key.- Returns:
- value Value, transparently resolving a possible collection dependency.
-
removeConfiguration
public void removeConfiguration()
Remove the current Configuration.
-
-