public class HierarchicalConfiguration extends Object implements ModifiableConfiguration, PublicCloneable
| Constructor and Description |
|---|
HierarchicalConfiguration()
Creates a new configuration.
|
HierarchicalConfiguration(Configuration parentConfiguration)
Creates a new configuration.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
clone()
Returns a clone of this instance.
|
protected void |
configurationLoaded()
A callback method to reconnect this configuration with the global
configuration after deserialization.
|
Iterator |
findPropertyKeys(String prefix)
Searches all property keys that start with a given prefix.
|
Enumeration |
getConfigProperties()
Returns all defined configuration properties for the report.
|
String |
getConfigProperty(String key)
Returns the configuration property with the specified key.
|
String |
getConfigProperty(String key,
String defaultValue)
Returns the configuration property with the specified key (or the
specified default value if there is no such property).
|
protected Properties |
getConfiguration()
Returns the collection of properties for the configuration.
|
protected Configuration |
getParentConfig()
Returns the parent configuration.
|
void |
insertConfiguration(HierarchicalConfiguration config)
The new configuartion will be inserted into the list of report
configuration, so that this configuration has the given report
configuration instance as parent.
|
boolean |
isLocallyDefined(String key)
Checks, whether the given key is localy defined in this instance or
whether the key's value is inherited.
|
protected boolean |
isParentSaved()
Checks, whether the parent configuration can be serialized.
|
void |
setConfigProperty(String key,
String value)
Sets a configuration property.
|
protected void |
setParentConfig(Configuration config)
Set the parent configuration.
|
public HierarchicalConfiguration()
public HierarchicalConfiguration(Configuration parentConfiguration)
parentConfiguration - the parent configuration.public String getConfigProperty(String key)
getConfigProperty in interface Configurationkey - the property key.public String getConfigProperty(String key, String defaultValue)
getConfigProperty in interface Configurationkey - the property key.defaultValue - the default value.public void setConfigProperty(String key, String value)
setConfigProperty in interface ModifiableConfigurationkey - the property key.value - the property value.public boolean isLocallyDefined(String key)
key - the key that should be checked.protected Properties getConfiguration()
public void insertConfiguration(HierarchicalConfiguration config)
config - the new report configuration.protected void setParentConfig(Configuration config)
config - the parent configuration.protected Configuration getParentConfig()
public Enumeration getConfigProperties()
getConfigProperties in interface ModifiableConfigurationgetConfigProperties in interface Configurationpublic Iterator findPropertyKeys(String prefix)
findPropertyKeys in interface ModifiableConfigurationfindPropertyKeys in interface Configurationprefix - the prefix that all selected property keys should shareprotected boolean isParentSaved()
protected void configurationLoaded()
public Object clone() throws CloneNotSupportedException
clone in interface Configurationclone in interface PublicCloneableclone in class ObjectCloneNotSupportedException - if there is a problem cloning.Copyright © 2009-2012 jtstand.com. All Rights Reserved.