Class AbstractPortletStatePersistenceManager
java.lang.Object
org.gatein.pc.portlet.state.producer.AbstractPortletStatePersistenceManager
- All Implemented Interfaces:
PortletStatePersistenceManager
- Direct Known Subclasses:
PortletStatePersistenceManagerService
public abstract class AbstractPortletStatePersistenceManager
extends Object
implements PortletStatePersistenceManager
- Version:
- $Revision$
- Author:
- Chris Laprun
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncloneState(String stateId) Clone an existing state.cloneState(String stateId, org.gatein.pc.api.state.PropertyMap propertyMap) Clone an existing state.createState(String portletId, org.gatein.pc.api.state.PropertyMap propertyMap) Create the initial state.protected abstract StringcreateStateContext(String portletId, org.gatein.pc.api.state.PropertyMap propertyMap) voiddestroyState(String stateId) Destroy the state.protected abstract PortletStateContextdestroyStateContext(String stateId) protected PortletStateprotected abstract PortletStateContextgetStateContext(String stateId) Load the state.voidupdateState(String stateId, org.gatein.pc.api.state.PropertyMap propertyMap) Update the state.protected abstract voidupdateStateContext(PortletStateContext stateContext)
-
Constructor Details
-
AbstractPortletStatePersistenceManager
public AbstractPortletStatePersistenceManager()
-
-
Method Details
-
loadState
public PortletStateContext loadState(String stateId) throws IllegalArgumentException, NoSuchStateException, InvalidStateIdException Description copied from interface:PortletStatePersistenceManagerLoad the state.- Specified by:
loadStatein interfacePortletStatePersistenceManager- 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
-
getState
protected PortletState getState(String stateId) throws NoSuchStateException, InvalidStateIdException -
createState
Description copied from interface:PortletStatePersistenceManagerCreate the initial state.- Specified by:
createStatein interfacePortletStatePersistenceManager- Parameters:
portletId- the id that this state refers to- Returns:
- the id of the state created
-
cloneState
public String cloneState(String stateId, org.gatein.pc.api.state.PropertyMap propertyMap) throws NoSuchStateException, InvalidStateIdException Description copied from interface:PortletStatePersistenceManagerClone an existing state.- Specified by:
cloneStatein interfacePortletStatePersistenceManager- Parameters:
stateId- the id that this state refers topropertyMap- the values of the cloned state- Returns:
- the state id
- Throws:
NoSuchStateException- is the specified state does not existInvalidStateIdException- if the state id is not valid
-
cloneState
public String cloneState(String stateId) throws IllegalArgumentException, NoSuchStateException, InvalidStateIdException Description copied from interface:PortletStatePersistenceManagerClone an existing state.- Specified by:
cloneStatein interfacePortletStatePersistenceManager- Parameters:
stateId- the id that this state refers to- Returns:
- 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
-
updateState
public void updateState(String stateId, org.gatein.pc.api.state.PropertyMap propertyMap) throws NoSuchStateException, InvalidStateIdException Description copied from interface:PortletStatePersistenceManagerUpdate the state.- Specified by:
updateStatein interfacePortletStatePersistenceManagerpropertyMap- the updated state- Throws:
NoSuchStateException- is the specified state does not existInvalidStateIdException- if the state id is not valid
-
destroyState
Description copied from interface:PortletStatePersistenceManagerDestroy the state.- Specified by:
destroyStatein interfacePortletStatePersistenceManager- Throws:
InvalidStateIdException- if the state id is not validNoSuchStateException- is the specified state does not exist
-
getStateContext
protected abstract PortletStateContext getStateContext(String stateId) throws InvalidStateIdException - Throws:
InvalidStateIdException
-
createStateContext
-
destroyStateContext
protected abstract PortletStateContext destroyStateContext(String stateId) throws InvalidStateIdException - Throws:
InvalidStateIdException
-
updateStateContext
-