Interface ConsumerPersistenceManager<S extends Serializable>
- All Known Implementing Classes:
AbstractConsumerPersistenceManagerService,ConsumerPersistenceManagerService
public interface ConsumerPersistenceManager<S extends Serializable>
-
Method Summary
Modifier and TypeMethodDescriptioncreateState(ConsumerState<S> state) Create the initial state.voiddestroyState(String stateId) Destroy the state.org.gatein.pc.api.PortletStateType<S> Returns the consumer state type.Load the state.voidupdateState(String stateId, ConsumerState<S> propertyMap) Update the state.
-
Method Details
-
getStateType
org.gatein.pc.api.PortletStateType<S> getStateType()Returns the consumer state type.- Returns:
- the consume state type
-
loadState
ConsumerStateContext<S> loadState(String stateId) throws IllegalArgumentException, NoSuchStateException, InvalidStateIdException Load the state.- Parameters:
stateId- the state id- Returns:
- the value map or null if it does not exist
- Throws:
IllegalArgumentException- if the state id is nullNoSuchStateException- is the specified state does not existInvalidStateIdException- if the state id is not valid
-
createState
Create the initial state.- Parameters:
state- the state- Returns:
- the id of the state created
- Throws:
IllegalArgumentException- if the portlet id is null
-
updateState
void updateState(String stateId, ConsumerState<S> propertyMap) throws IllegalArgumentException, NoSuchStateException, InvalidStateIdException Update the state.- Parameters:
stateId- the state idpropertyMap- the updated state- Throws:
IllegalArgumentException- if the state id is null or the values are nullNoSuchStateException- is the specified state does not existInvalidStateIdException- if the state id is not valid
-
destroyState
void destroyState(String stateId) throws IllegalArgumentException, NoSuchStateException, InvalidStateIdException Destroy the state.- Parameters:
stateId- the state id- Throws:
IllegalArgumentException- if the state id is nullNoSuchStateException- is the specified state does not existInvalidStateIdException- if the state id is not valid
-