Class SystemPropertyConfiguration

java.lang.Object
org.pentaho.reporting.libraries.base.config.HierarchicalConfiguration
org.pentaho.reporting.libraries.base.config.SystemPropertyConfiguration
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, Configuration, ModifiableConfiguration

public class SystemPropertyConfiguration extends HierarchicalConfiguration
A property configuration based on system properties.
Author:
Thomas Morgner
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a report configuration that includes all the system properties (whether they are related to reports or not).
  • Method Summary

    Modifier and Type
    Method
    Description
    java.util.Enumeration
    Returns all defined configuration properties for the report.
    java.lang.String
    getConfigProperty(java.lang.String key, java.lang.String defaultValue)
    Returns the configuration property with the specified key (or the specified default value if there is no such property).
    boolean
    isLocallyDefined(java.lang.String key)
    Checks, whether the given key is locally defined in the system properties.
    void
    setConfigProperty(java.lang.String key, java.lang.String value)
    Sets a configuration property.

    Methods inherited from class org.pentaho.reporting.libraries.base.config.HierarchicalConfiguration

    clone, findPropertyKeys, getConfigProperty, insertConfiguration

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 a PropertyFileConfiguration.
  • Method Details

    • setConfigProperty

      public void setConfigProperty(java.lang.String key, java.lang.String value)
      Sets a configuration property.
      Specified by:
      setConfigProperty in interface ModifiableConfiguration
      Overrides:
      setConfigProperty in class HierarchicalConfiguration
      Parameters:
      key - the property key.
      value - the property value.
    • getConfigProperty

      public java.lang.String getConfigProperty(java.lang.String key, java.lang.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 interface Configuration
      Overrides:
      getConfigProperty in class HierarchicalConfiguration
      Parameters:
      key - the property key.
      defaultValue - the default value.
      Returns:
      the property value.
    • isLocallyDefined

      public boolean isLocallyDefined(java.lang.String key)
      Checks, whether the given key is locally defined in the system properties.
      Overrides:
      isLocallyDefined in class HierarchicalConfiguration
      Parameters:
      key - the key that should be checked.
      Returns:
      true, if the key is defined in the system properties, false otherwise.
      See Also:
    • getConfigProperties

      public java.util.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.
      Specified by:
      getConfigProperties in interface Configuration
      Specified by:
      getConfigProperties in interface ModifiableConfiguration
      Overrides:
      getConfigProperties in class HierarchicalConfiguration
      Returns:
      all defined configuration properties for the report.