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 Constructor Description AbstractPortletStatePersistenceManager()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description StringcloneState(String stateId)Clone an existing state.StringcloneState(String stateId, org.gatein.pc.api.state.PropertyMap propertyMap)Clone an existing state.StringcreateState(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 PortletStategetState(String stateId)protected abstract PortletStateContextgetStateContext(String stateId)PortletStateContextloadState(String stateId)Load the state.voidupdateState(String stateId, org.gatein.pc.api.state.PropertyMap propertyMap)Update the state.protected abstract voidupdateStateContext(PortletStateContext stateContext)
-
-
-
Method Detail
-
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
public String createState(String portletId, org.gatein.pc.api.state.PropertyMap propertyMap)
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
public void destroyState(String stateId) throws InvalidStateIdException, NoSuchStateException
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
protected abstract String createStateContext(String portletId, org.gatein.pc.api.state.PropertyMap propertyMap)
-
destroyStateContext
protected abstract PortletStateContext destroyStateContext(String stateId) throws InvalidStateIdException
- Throws:
InvalidStateIdException
-
updateStateContext
protected abstract void updateStateContext(PortletStateContext stateContext)
-
-