站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBOSS Portal 2.4 API 英文版文档

StateStore - JBOSS Portal 2.4 API 英文版文档


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

All Known Implementing Classes:
PersistentStateStore, StateStoreSupport

public interface StateStore

An abstraction for enabling state management on the producer side.


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

Method Detail

loadState

public State 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

public java.lang.String createState(java.lang.String portletId,
                                    ValueMap valueMap)
                             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

public 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

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

Parameters:
stateId - the id that this state refers to
valueMap - 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

public void updateState(java.lang.String stateId,
                        ValueMap valueMap)
                 throws java.lang.IllegalArgumentException,
                        NoSuchStateException,
                        InvalidStateIdException
Update the state.

Parameters:
stateId -
valueMap - 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

public 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