Interface ConsumerPersistenceManager<S extends Serializable>
-
- All Known Implementing Classes:
AbstractConsumerPersistenceManagerService,ConsumerPersistenceManagerService
public interface ConsumerPersistenceManager<S extends Serializable>- Version:
- $Revision: 5776 $
- Author:
- Julien Viet
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringcreateState(ConsumerState<S> state)Create the initial state.voiddestroyState(String stateId)Destroy the state.org.gatein.pc.api.PortletStateType<S>getStateType()Returns the consumer state type.ConsumerStateContext<S>loadState(String stateId)Load the state.voidupdateState(String stateId, ConsumerState<S> propertyMap)Update the state.
-
-
-
Method Detail
-
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
String createState(ConsumerState<S> state) throws IllegalArgumentException
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
-
-