| java.lang.Object org.jfree.base.config.HierarchicalConfiguration
All known Subclasses: org.jfree.base.config.PropertyFileConfiguration, org.jfree.base.config.SystemPropertyConfiguration,
HierarchicalConfiguration | public class HierarchicalConfiguration implements ModifiableConfiguration,PublicCloneable(Code) | | A hierarchical configuration. Such a configuration can have one or more
parent configurations providing usefull default values.
author: Thomas Morgner |
Method Summary | |
public Object | clone() | protected void | configurationLoaded() A callback method to reconnect this configuration with the global
configuration after deserialization. | public Iterator | findPropertyKeys(String prefix) Searches all property keys that start with a given prefix. | public Enumeration | getConfigProperties() Returns all defined configuration properties for the report. | public String | getConfigProperty(String key) Returns the configuration property with the specified key.
Parameters: key - the property key. | public 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).
If the property is not defined in this configuration, the code will
lookup the property in the parent configuration.
Parameters: key - the property key. Parameters: defaultValue - the default value. | protected Properties | getConfiguration() Returns the collection of properties for the configuration. | protected Configuration | getParentConfig() Returns the parent configuration. | public 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. | public boolean | isLocallyDefined(String key) Checks, whether the given key is localy defined in this instance or
whether the key's value is inherited.
Parameters: key - the key that should be checked. | protected boolean | isParentSaved() Checks, whether the parent configuration can be serialized. | public void | setConfigProperty(String key, String value) Sets a configuration property. | protected void | setParentConfig(Configuration config) Set the parent configuration. |
HierarchicalConfiguration | public HierarchicalConfiguration()(Code) | | Creates a new configuration.
|
HierarchicalConfiguration | public HierarchicalConfiguration(Configuration parentConfiguration)(Code) | | Creates a new configuration.
Parameters: parentConfiguration - the parent configuration. |
configurationLoaded | protected void configurationLoaded()(Code) | | A callback method to reconnect this configuration with the global
configuration after deserialization.
|
findPropertyKeys | public Iterator findPropertyKeys(String prefix)(Code) | | Searches all property keys that start with a given prefix.
Parameters: prefix - the prefix that all selected property keys should share the properties as iterator. |
getConfigProperties | public Enumeration getConfigProperties()(Code) | | Returns all defined configuration properties for the report. The
enumeration contains all keys of the changed properties, properties set
from files or the system properties are not included.
all defined configuration properties for the report. |
getConfigProperty | public String getConfigProperty(String key)(Code) | | Returns the configuration property with the specified key.
Parameters: key - the property key. the property value. |
getConfigProperty | public String getConfigProperty(String key, String defaultValue)(Code) | | Returns the configuration property with the specified key (or the
specified default value if there is no such property).
If the property is not defined in this configuration, the code will
lookup the property in the parent configuration.
Parameters: key - the property key. Parameters: defaultValue - the default value. the property value. |
getConfiguration | protected Properties getConfiguration()(Code) | | Returns the collection of properties for the configuration.
the properties. |
getParentConfig | protected Configuration getParentConfig()(Code) | | Returns the parent configuration. The parent configuration is queried, if
the requested configuration values was not found in this report
configuration.
the parent configuration. |
insertConfiguration | public void insertConfiguration(HierarchicalConfiguration config)(Code) | | The new configuartion will be inserted into the list of report
configuration, so that this configuration has the given report
configuration instance as parent.
Parameters: config - the new report configuration. |
isLocallyDefined | public boolean isLocallyDefined(String key)(Code) | | Checks, whether the given key is localy defined in this instance or
whether the key's value is inherited.
Parameters: key - the key that should be checked. true, if the key is defined locally, false otherwise. |
isParentSaved | protected boolean isParentSaved()(Code) | | Checks, whether the parent configuration can be serialized. Usually the
global configuration is not serialized and should return false here.
true, if the parent config can be serialized, false otherwise. |
setConfigProperty | public void setConfigProperty(String key, String value)(Code) | | Sets a configuration property.
Parameters: key - the property key. Parameters: value - the property value. |
setParentConfig | protected void setParentConfig(Configuration config)(Code) | | Set the parent configuration. The parent configuration is queried, if the
requested configuration values was not found in this report
configuration.
Parameters: config - the parent configuration. |
|
|