org.jfree.report.util
Class SystemPropertyConfiguration

java.lang.Object
  extended byorg.jfree.report.util.ReportConfiguration
      extended byorg.jfree.report.util.SystemPropertyConfiguration
All Implemented Interfaces:
org.jfree.util.Configuration, java.io.Serializable

public class SystemPropertyConfiguration
extends ReportConfiguration

A property configuration based on system properties.

Author:
Thomas Morgner
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.jfree.report.util.ReportConfiguration
DISABLE_LOGGING, DISABLE_LOGGING_DEFAULT, FONTRENDERER_ISBUGGY_FRC, FONTRENDERER_ISBUGGY_FRC_DEFAULT, FONTRENDERER_USEALIASING, FONTRENDERER_USEALIASING_DEFAULT, LOGLEVEL, LOGLEVEL_DEFAULT, LOGTARGET, LOGTARGET_DEFAULT, NO_PRINTER_AVAILABLE, PRINT_OPERATION_COMMENT, PRINT_OPERATION_COMMENT_DEFAULT, REPORT_RESOURCE_BUNDLE_KEY, STRICT_ERRORHANDLING, STRICT_ERRORHANDLING_DEFAULT, WARN_INVALID_COLUMNS, WARN_INVALID_COLUMNS_DEFAULT
 
Constructor Summary
SystemPropertyConfiguration()
          Creates a report configuration that includes all the system properties (whether they are related to reports or not).
 
Method Summary
 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.report.util.ReportConfiguration
findPropertyKeys, getConfigProperty, getConfiguration, getGlobalConfig, getLogLevel, getLogTarget, getParentConfig, getPlatformDefaultEncoding, insertConfiguration, isDisableLogging, isFontRendererBuggy, isFontRendererUseAliasing, isPrintOperationComment, isStrictErrorHandling, isWarnInvalidColumns, setDisableLogging, setFontRendererBuggy, setFontRendererUseAliasing, setLogLevel, setLogTarget, setParentConfig, setPrintOperationComment, setStrictErrorHandling, setWarnInvalidColumns
 
Methods inherited from class java.lang.Object
clone, 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 PropertyFileReportConfiguration.

Method Detail

setConfigProperty

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

Overrides:
setConfigProperty in class ReportConfiguration
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 org.jfree.util.Configuration
Overrides:
getConfigProperty in class ReportConfiguration
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 ReportConfiguration
Parameters:
key - the key that should be checked.
Returns:
true, if the key is defined in the system properties, false otherwise.
See Also:
ReportConfiguration.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.

Overrides:
getConfigProperties in class ReportConfiguration
Returns:
all defined configuration properties for the report.