Package org.gatein.pc.api.state
Interface PropertyContext
-
public interface PropertyContextExposes to the portlet the interface to deal with the personalization state.- Version:
- $Revision: 6757 $
- Author:
- Julien Viet
-
-
Field Summary
Fields Modifier and Type Field Description static StringPREFERENCES_ATTRIBUTEThe attribute name under which the preferences can be accessed.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Set<String>getKeys()Return an immutable set of keys.List<String>getValue(String key)Return for a specified key an immutable list of its values or null if the value does not exist.booleanisReadOnly()Return true if the preferences are globally read only.voidupdate(PropertyChange[] changes)Update the preferences.
-
-
-
Field Detail
-
PREFERENCES_ATTRIBUTE
static final String PREFERENCES_ATTRIBUTE
The attribute name under which the preferences can be accessed.- See Also:
- Constant Field Values
-
-
Method Detail
-
getValue
List<String> getValue(String key) throws IllegalArgumentException
Return for a specified key an immutable list of its values or null if the value does not exist.- Parameters:
key- the lookup key- Returns:
- the key value or null if it does not exist
- Throws:
IllegalArgumentException- if the key is null
-
isReadOnly
boolean isReadOnly() throws IllegalStateExceptionReturn true if the preferences are globally read only. The value returned by this method is valid only during the action request. Any call to this method during the render request will produce a non accurate value.- Returns:
- true if the preferences are read only
- Throws:
IllegalStateException- if this is called during render phase
-
update
void update(PropertyChange[] changes) throws IllegalStateException
Update the preferences.- Parameters:
changes- the list of changes- Throws:
IllegalStateException- if the preferences is not writableIllegalArgumentException- if any change is not valid
-
-