org.jfree.base.config

## Class SystemPropertyConfiguration

- java.lang.Object
- - org.jfree.base.config.HierarchicalConfiguration
  - - org.jfree.base.config.SystemPropertyConfiguration

- All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, ModifiableConfiguration, Configuration, PublicCloneable

      public class SystemPropertyConfiguration
      extends HierarchicalConfiguration

  A property configuration based on system properties.
  Author:
    Thomas Morgner
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and 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 and Description
    --- | ---
    `java.util.Enumeration` | `getConfigProperties()` 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.jfree.base.config.HierarchicalConfiguration

      `clone, configurationLoaded, findPropertyKeys, getConfigProperty, getConfiguration, getParentConfig, insertConfiguration, isParentSaved, setParentConfig`

    - ### Methods inherited from class java.lang.Object

      `equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### 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

    - #### 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:
        `HierarchicalConfiguration.isLocallyDefined(java.lang.String)`

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