Class SystemPropertyConfiguration
- java.lang.Object
-
- org.pentaho.reporting.libraries.base.config.HierarchicalConfiguration
-
- org.pentaho.reporting.libraries.base.config.SystemPropertyConfiguration
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Configuration
,ModifiableConfiguration
public class SystemPropertyConfiguration extends HierarchicalConfiguration
A property configuration based on system properties.- Author:
- Thomas Morgner
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SystemPropertyConfiguration()
Creates a report configuration that includes all the system properties (whether they are related to reports or not).
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Enumeration<String>
getConfigProperties()
Returns all defined configuration properties for the report.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).boolean
isLocallyDefined(String key)
Checks, whether the given key is locally defined in the system properties.void
setConfigProperty(String key, String value)
Sets a configuration property.-
Methods inherited from class org.pentaho.reporting.libraries.base.config.HierarchicalConfiguration
addAll, clone, findPropertyKeys, getConfigProperty, getConfiguration, getParentConfig, insertConfiguration, reconnectConfiguration, setParentConfig
-
-
-
-
Method Detail
-
setConfigProperty
public void setConfigProperty(String key, String value)
Sets a configuration property.- Specified by:
setConfigProperty
in interfaceModifiableConfiguration
- Overrides:
setConfigProperty
in classHierarchicalConfiguration
- Parameters:
key
- the property key.value
- the property value.
-
getConfigProperty
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.- Specified by:
getConfigProperty
in interfaceConfiguration
- Overrides:
getConfigProperty
in classHierarchicalConfiguration
- Parameters:
key
- the property key.defaultValue
- the default value.- Returns:
- the property value.
-
isLocallyDefined
public boolean isLocallyDefined(String key)
Checks, whether the given key is locally defined in the system properties.- Overrides:
isLocallyDefined
in classHierarchicalConfiguration
- Parameters:
key
- the key that should be checked.- Returns:
- true, if the key is defined in the system properties, false otherwise.
- See Also:
HierarchicalConfiguration.isLocallyDefined(String)
-
getConfigProperties
public Enumeration<String> getConfigProperties()
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.- Specified by:
getConfigProperties
in interfaceConfiguration
- Overrides:
getConfigProperties
in classHierarchicalConfiguration
- Returns:
- all defined configuration properties for the report.
-
-