org.pfsw.odem
Class ObjectProperties

java.lang.Object
  extended by org.pfsw.odem.ObjectProperties
All Implemented Interfaces:
IObjectProperties

public class ObjectProperties
extends java.lang.Object
implements IObjectProperties

This is an implementation of IObjectProperties which is provided here as convenience, so that not everybody is forced create his own implementation.

Version:
1.0
Author:
M.Duchrow

Constructor Summary
ObjectProperties()
          Initialize the new instance with default values.
 
Method Summary
 java.lang.Object getProperty(java.lang.String propertyName)
          Returns the property associated with the given name.
 java.lang.String[] getPropertyNames()
          Returns all currently known properties.
 void setProperty(java.lang.String propertyName, java.lang.Object object)
          Sets the value of the property with the specified name to the given object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjectProperties

public ObjectProperties()
Initialize the new instance with default values.

Method Detail

getProperty

public java.lang.Object getProperty(java.lang.String propertyName)
Returns the property associated with the given name. A null value indicates that a property with the specified name does not exist.

Specified by:
getProperty in interface IObjectProperties
Parameters:
propertyName - A valid name (must not be null or empty string)
Returns:
The object associated with the given name or null if property unknown

setProperty

public void setProperty(java.lang.String propertyName,
                        java.lang.Object object)
Sets the value of the property with the specified name to the given object. This replaces ny object that might have been kept under the given name before.

If the given object is null, the property and any associated value will be removed.

Specified by:
setProperty in interface IObjectProperties
Parameters:
propertyName - A valid name (must not be null or empty string)
object - The object to keep under the specified property name

getPropertyNames

public java.lang.String[] getPropertyNames()
Returns all currently known properties. If no property is known an empty array will be returned (never null).

Specified by:
getPropertyNames in interface IObjectProperties
Returns:
All the names of available properties