Class PropertyFileConfiguration
java.lang.Object
org.pentaho.reporting.libraries.base.config.HierarchicalConfiguration
org.pentaho.reporting.libraries.base.config.PropertyFileConfiguration
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
,Configuration
,ModifiableConfiguration
- Direct Known Subclasses:
PackageManager.PackageConfiguration
A report configuration that reads its values from an arbitary property file.
- Author:
- Thomas Morgner
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
load
(java.io.InputStream in) Loads the properties stored in the given file.void
load
(java.lang.String resourceName) Lods the property file from a classpath resource name.void
load
(java.lang.String resourceName, java.lang.Class resourceSource) Loads the properties stored in the given file.Methods inherited from class org.pentaho.reporting.libraries.base.config.HierarchicalConfiguration
clone, findPropertyKeys, getConfigProperties, getConfigProperty, getConfigProperty, insertConfiguration, isLocallyDefined, setConfigProperty
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
PropertyFileConfiguration
public PropertyFileConfiguration()Default constructor.
-
-
Method Details
-
load
public void load(java.lang.String resourceName) Lods the property file from a classpath resource name. The classpath resource must be loadable viaPropertyFileConfiguration.class.getResource(..)
- Parameters:
resourceName
- the resource name to be loaded.
-
load
public void load(java.lang.String resourceName, java.lang.Class resourceSource) Loads the properties stored in the given file. This method does nothing if the file does not exist or is unreadable. Appends the contents of the loaded properties to the already stored contents.- Parameters:
resourceName
- the file name of the stored properties.resourceSource
- the class to which relative resource paths are resolved.
-
load
public void load(java.io.InputStream in) Loads the properties stored in the given file. This method does nothing if the file does not exist or is unreadable. Appends the contents of the loaded properties to the already stored contents.- Parameters:
in
- the input stream used to read the properties.
-