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
A property configuration based on system properties.
- Author:
- Thomas Morgner
- See Also:
-
Constructor Summary
ConstructorDescriptionCreates a report configuration that includes all the system properties (whether they are related to reports or not). -
Method Summary
Modifier and TypeMethodDescriptionReturns all defined configuration properties for the report.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
-
Constructor Details
-
SystemPropertyConfiguration
public SystemPropertyConfiguration()Creates a report configuration that includes all the system properties (whether they are related to reports or not). The parent configuration is aPropertyFileConfiguration
.
-
-
Method Details
-
setConfigProperty
Sets a configuration property.- Specified by:
setConfigProperty
in interfaceModifiableConfiguration
- Overrides:
setConfigProperty
in classHierarchicalConfiguration
- Parameters:
key
- the property key.value
- the property value.
-
getConfigProperty
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
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:
-
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.
-