org.pentaho.reporting.libraries.base.config

Class SystemPropertyConfiguration

public class SystemPropertyConfiguration extends HierarchicalConfiguration

A property configuration based on system properties.

Author: Thomas Morgner

UNKNOWN: AccessOfSystemProperties

Constructor Summary
SystemPropertyConfiguration()
Creates a report configuration that includes all the system properties (whether they are related to reports or not).
Method Summary
EnumerationgetConfigProperties()
Returns all defined configuration properties for the report.
StringgetConfigProperty(String key, String defaultValue)
Returns the configuration property with the specified key (or the specified default value if there is no such property).
booleanisLocallyDefined(String key)
Checks, whether the given key is locally defined in the system properties.
voidsetConfigProperty(String key, String value)
Sets a configuration property.

Constructor Detail

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 a PropertyFileConfiguration.

Method Detail

getConfigProperties

public Enumeration 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.

Returns: all defined configuration properties for the report.

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.

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.

Parameters: key the key that should be checked.

Returns: true, if the key is defined in the system properties, false otherwise.

See Also: isLocallyDefined

setConfigProperty

public void setConfigProperty(String key, String value)
Sets a configuration property.

Parameters: key the property key. value the property value.