org.jboss.portal.portlet.state.producer
Interface PortletStatePersistenceManager

All Known Implementing Classes:
PersistentPortletStatePersistenceManager, PortletStatePersistenceManagerService

public interface PortletStatePersistenceManager

An abstraction for enabling state management on the producer side.

Version:
$Revision: 5873 $
Author:
Julien Viet

Method Summary
 java.lang.String cloneState(java.lang.String stateId)
          Clone an existing state.
 java.lang.String cloneState(java.lang.String stateId, PropertyMap propertyMap)
          Clone an existing state.
 java.lang.String createState(java.lang.String portletId, PropertyMap propertyMap)
          Create the initial state.
 void destroyState(java.lang.String stateId)
          Destroy the state.
 PortletStateContext loadState(java.lang.String stateId)
          Load the state.
 void updateState(java.lang.String stateId, PropertyMap propertyMap)
          Update the state.
 

Method Detail

loadState

PortletStateContext loadState(java.lang.String stateId)
                              throws java.lang.IllegalArgumentException,
                                     NoSuchStateException,
                                     InvalidStateIdException
Load the state.

Parameters:
stateId - the state id
Returns:
the value map or null if it does not exist
Throws:
java.lang.IllegalArgumentException - if the state id is null
NoSuchStateException - is the specified state does not exist
InvalidStateIdException - if the state id is not valid

createState

java.lang.String createState(java.lang.String portletId,
                             PropertyMap propertyMap)
                             throws java.lang.IllegalArgumentException
Create the initial state.

Parameters:
portletId - the id that this state refers to
Returns:
the id of the state created
Throws:
java.lang.IllegalArgumentException - if the portlet id is null

cloneState

java.lang.String cloneState(java.lang.String stateId)
                            throws java.lang.IllegalArgumentException,
                                   NoSuchStateException,
                                   InvalidStateIdException
Clone an existing state.

Parameters:
stateId - the id that this state refers to
Returns:
the state id
Throws:
java.lang.IllegalArgumentException - if the state id is null
NoSuchStateException - is the specified state does not exist
InvalidStateIdException - if the state id is not valid

cloneState

java.lang.String cloneState(java.lang.String stateId,
                            PropertyMap propertyMap)
                            throws java.lang.IllegalArgumentException,
                                   NoSuchStateException,
                                   InvalidStateIdException
Clone an existing state.

Parameters:
stateId - the id that this state refers to
propertyMap - the values of the cloned state
Returns:
the state id
Throws:
java.lang.IllegalArgumentException - if the state id is null or the value is nul
NoSuchStateException - is the specified state does not exist
InvalidStateIdException - if the state id is not valid

updateState

void updateState(java.lang.String stateId,
                 PropertyMap propertyMap)
                 throws java.lang.IllegalArgumentException,
                        NoSuchStateException,
                        InvalidStateIdException
Update the state.

Parameters:
stateId -
propertyMap - the updated state
Throws:
java.lang.IllegalArgumentException - if the state id is null or the values are null
NoSuchStateException - is the specified state does not exist
InvalidStateIdException - if the state id is not valid

destroyState

void destroyState(java.lang.String stateId)
                  throws java.lang.IllegalArgumentException,
                         NoSuchStateException,
                         InvalidStateIdException
Destroy the state.

Parameters:
stateId -
Throws:
java.lang.IllegalArgumentException - if the state id is null
NoSuchStateException - is the specified state does not exist
InvalidStateIdException - if the state id is not valid