Package org.gatein.pc.api.state
Class PropertyChange
- java.lang.Object
-
- org.gatein.pc.api.state.PropertyChange
-
public class PropertyChange extends Object
A property change. The class is immutable- Version:
- $Revision: 5776 $
- Author:
- Julien Viet
-
-
Field Summary
Fields Modifier and Type Field Description static intPREF_RESETThe change is a reset of the property value.static intPREF_UPDATEThe change is an update of the property value.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetKey()Return the property keyintgetType()Return the property change type.List<String>getValue()Return the new value or null in case of a property reset.static PropertyChangenewReset(String key)Create a new property reset.static PropertyChangenewUpdate(String key, String value)Create a new property update, the list of values will be clone for safety.static PropertyChangenewUpdate(String key, String[] value)Create a new property update, the list of values will be clone for safety.static PropertyChangenewUpdate(String key, List<String> value)Create a new property update, the list of values will be clone for safety.
-
-
-
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(String key, String value)
Create a new property update, the list of values will be clone for safety.- Parameters:
key- the property keyvalue- the property value- Returns:
- an instance representing a property update
-
newUpdate
public static PropertyChange newUpdate(String key, String[] value)
Create a new property update, the list of values will be clone for safety.- Parameters:
key- the property keyvalue- the property value- Returns:
- an instance representing a property update
-
newUpdate
public static PropertyChange newUpdate(String key, List<String> value)
Create a new property update, the list of values will be clone for safety.- Parameters:
key- the property keyvalue- the property value- Returns:
- an instance representing a property update
-
newReset
public static PropertyChange newReset(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 property change type
-
getKey
public String getKey()
Return the property key- Returns:
- the property key
-
-