org.jboss.portal.portlet.state
Class PropertyChange

java.lang.Object
  extended by org.jboss.portal.portlet.state.PropertyChange

public class PropertyChange
extends java.lang.Object

A property change. The class is immutable

Version:
$Revision: 5776 $
Author:
Julien Viet

Field Summary
static int PREF_RESET
          The change is a reset of the property value.
static int PREF_UPDATE
          The change is an update of the property value.
 
Method Summary
 java.lang.String getKey()
          Return the property key
 int getType()
          Return the property change type.
 Value getValue()
          Return the new value or null in case of a property reset.
static PropertyChange newReset(java.lang.String key)
          Create a new property reset.
static PropertyChange newUpdate(java.lang.String key, Value value)
          Create a new property update.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PREF_UPDATE

public static final int PREF_UPDATE
The change is an update of the property value.

See Also:
Constant Field Values

PREF_RESET

public static final int PREF_RESET
The change is a reset of the property value.

See Also:
Constant Field Values
Method Detail

newUpdate

public static PropertyChange newUpdate(java.lang.String key,
                                       Value value)
Create a new property update.

Parameters:
key - the property key
value - the property value
Returns:
an instance representing a property update

newReset

public static PropertyChange newReset(java.lang.String key)
Create a new property reset.

Parameters:
key - the property key
Returns:
an instance representing a property reset

getType

public int getType()
Return the property change type.

Returns:
the proeprty change type

getKey

public java.lang.String getKey()
Return the property key

Returns:
the property key

getValue

public Value getValue()
Return the new value or null in case of a property reset.

Returns:
the property value