Class AbstractConsumerPersistenceManagerService<S extends Serializable>
- java.lang.Object
-
- org.gatein.pc.portlet.impl.state.consumer.AbstractConsumerPersistenceManagerService<S>
-
- All Implemented Interfaces:
ConsumerPersistenceManager<S>
- Direct Known Subclasses:
ConsumerPersistenceManagerService
public abstract class AbstractConsumerPersistenceManagerService<S extends Serializable> extends Object implements ConsumerPersistenceManager<S>
- Version:
- $Revision: 1.1 $
- Author:
- Julien Viet
-
-
Constructor Summary
Constructors Constructor Description AbstractConsumerPersistenceManagerService()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description StringcreateState(ConsumerState<S> state)Create the initial state.voiddestroyState(String stateId)Destroy the state.protected abstract ConsumerStateContext<S>get(String stateId)intgetSize()ConsumerStateContext<S>loadState(String stateId)Load the state.protected abstract voidput(String stateId, ConsumerStateContext<S> state)protected abstract voidremove(String stateId)protected abstract intsize()voidupdateState(String stateId, ConsumerState<S> state)Update the state.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.gatein.pc.portlet.state.consumer.ConsumerPersistenceManager
getStateType
-
-
-
-
Method Detail
-
get
protected abstract ConsumerStateContext<S> get(String stateId)
-
put
protected abstract void put(String stateId, ConsumerStateContext<S> state)
-
remove
protected abstract void remove(String stateId)
-
size
protected abstract int size()
-
loadState
public ConsumerStateContext<S> loadState(String stateId) throws IllegalArgumentException, NoSuchStateException, InvalidStateIdException
Description copied from interface:ConsumerPersistenceManagerLoad the state.- Specified by:
loadStatein interfaceConsumerPersistenceManager<S extends Serializable>- 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
public String createState(ConsumerState<S> state) throws IllegalArgumentException
Description copied from interface:ConsumerPersistenceManagerCreate the initial state.- Specified by:
createStatein interfaceConsumerPersistenceManager<S extends Serializable>- Parameters:
state- the state- Returns:
- the id of the state created
- Throws:
IllegalArgumentException- if the portlet id is null
-
updateState
public void updateState(String stateId, ConsumerState<S> state) throws IllegalArgumentException, NoSuchStateException, InvalidStateIdException
Description copied from interface:ConsumerPersistenceManagerUpdate the state.- Specified by:
updateStatein interfaceConsumerPersistenceManager<S extends Serializable>- Parameters:
stateId- the state idstate- 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
public void destroyState(String stateId) throws IllegalArgumentException, NoSuchStateException, InvalidStateIdException
Description copied from interface:ConsumerPersistenceManagerDestroy the state.- Specified by:
destroyStatein interfaceConsumerPersistenceManager<S extends Serializable>- 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
-
getSize
public int getSize()
-
-