org.pentaho.reporting.engine.classic.core.util
Class ReportProperties

java.lang.Object
  extended by org.pentaho.reporting.engine.classic.core.util.ReportProperties
All Implemented Interfaces:
Serializable, Cloneable

Deprecated. This is no longer valid. The properties are a weird concept and are inherently unclean. They have been replaced by the report environment and the bundle metadata.

public class ReportProperties
extends Object
implements Serializable, Cloneable

The report properties is a hashtable with string keys. ReportProperties are bound to a report as a general purpose storage. ReportProperties bound to a JFreeReport object are visible to all generated report-state chains. A ReportState will inherit all ReportProperties bound to the JFreeReport-object when the ReportState.StartState object is created. Properties bound to the report definition after the report state is created are not visible to the ReportState and its children.

ReportProperties bound to a ReportState are not visible to the report definition (the JFreeReport object), but are visible to all ReportStates of that ReportState-chain. So when you add a property at the end of a report run to a ReportState, the value of this property will be visible to all ReportStates when the report is restarted at a certain point.

ReportProperties can be seen as a stateless shared report internal storage area. All functions have access to the properties by using the ReportState.getProperty() and ReportState.setProperty() functions.

For a list of defined default properties, have a look at the MasterReport class.

Author:
Thomas Morgner
See Also:
Serialized Form

Constructor Summary
ReportProperties()
          Deprecated. Default constructor.
ReportProperties(ReportProperties props)
          Deprecated. Copy constructor.
 
Method Summary
 void clear()
          Deprecated. Removes all properties stored in this collection.
 Object clone()
          Deprecated. Clones the properties.
 boolean containsKey(String key)
          Deprecated. Checks whether the given key is stored in this collection of ReportProperties.
 boolean containsMarkedProperties()
          Deprecated. Returns true, if there is at least one marked property.
 Object get(String key)
          Deprecated. Retrieves the value stored for a key in this properties collection.
 Object get(String key, Object defaultValue)
          Deprecated. Retrieves the value stored for a key in this properties collection, and returning the default value if the key was not stored in this properties collection.
 ReportProperties getMasterProperties()
          Deprecated. Returns the fall-back property-collection.
 String[] keyArray()
          Deprecated. Returns all defined keys as string-array.
 Iterator keys()
          Deprecated. Returns all property keys as enumeration.
 void put(String key, Object value)
          Deprecated. Adds a property to this properties collection.
 void setMasterProperties(ReportProperties masterProperties)
          Deprecated. Defines the fall-back property-collection.
 int size()
          Deprecated. Returns the number of entries in this collection.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReportProperties

public ReportProperties(ReportProperties props)
Deprecated. 
Copy constructor.

Parameters:
props - an existing ReportProperties instance.

ReportProperties

public ReportProperties()
Deprecated. 
Default constructor.

Method Detail

put

public void put(String key,
                Object value)
Deprecated. 
Adds a property to this properties collection. If a property with the given name exist, the property will be replaced with the new value. If the value is null, the property will be removed.

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

get

public Object get(String key)
Deprecated. 
Retrieves the value stored for a key in this properties collection.

Parameters:
key - the property key.
Returns:
The stored value, or null if the key does not exist in this collection.

get

public Object get(String key,
                  Object defaultValue)
Deprecated. 
Retrieves the value stored for a key in this properties collection, and returning the default value if the key was not stored in this properties collection.

Parameters:
key - the property key.
defaultValue - the default value to be returned when the key is not stored in this properties collection.
Returns:
The stored value, or the default value if the key does not exist in this collection.

keys

public Iterator keys()
Deprecated. 
Returns all property keys as enumeration.

Returns:
an enumeration of the property keys.

clear

public void clear()
Deprecated. 
Removes all properties stored in this collection.


containsKey

public boolean containsKey(String key)
Deprecated. 
Checks whether the given key is stored in this collection of ReportProperties.

Parameters:
key - the property key.
Returns:
true, if the given key is known.

clone

public Object clone()
             throws CloneNotSupportedException
Deprecated. 
Clones the properties.

Overrides:
clone in class Object
Returns:
a copy of this ReportProperties object.
Throws:
CloneNotSupportedException - this should never happen.

containsMarkedProperties

public boolean containsMarkedProperties()
Deprecated. 
Returns true, if there is at least one marked property.

Returns:
true, if there are some properties marked, false otherwise.

getMasterProperties

public ReportProperties getMasterProperties()
Deprecated. 
Returns the fall-back property-collection. If defined, this collection will be used if a queried property is not defined in this collection.

Returns:
the fall-back collection.

setMasterProperties

public void setMasterProperties(ReportProperties masterProperties)
Deprecated. 
Defines the fall-back property-collection. If defined, this collection will be used if a queried property is not defined in this collection.

Parameters:
masterProperties - the fall-back collection.

keyArray

public String[] keyArray()
Deprecated. 
Returns all defined keys as string-array.

Returns:
the keys as array.

size

public int size()
Deprecated. 
Returns the number of entries in this collection.

Returns:
the number of properties defined here.