org.szegedi.spring.web.jsflow
Interface FlowStateStorage

All Known Implementing Classes:
AbstractFlowStateStorage, ClientSideFlowStateStorage, HttpSessionFlowStateStorage, JdbcFlowStateStorage

public interface FlowStateStorage

A storage for interim flow states. It is sufficient (and recommended) to have exactly one flow state storage per application context, although you can have exotic scenarios with several controllers, each with a different storage if you really have to. If you have a single storage in the application context, then all flow controllers that don't have their own storage set will use it.

Version:
$Id: FlowStateStorage.java 104 2009-12-01 18:44:14Z szegedia $
Author:
Attila Szegedi

Method Summary
 org.mozilla.javascript.NativeContinuation getState(javax.servlet.http.HttpServletRequest request, java.lang.String id)
          Retrieves the state associated with a request
 java.lang.String storeState(javax.servlet.http.HttpServletRequest request, org.mozilla.javascript.NativeContinuation state)
          Stores the state associated with the current request
 

Method Detail

storeState

java.lang.String storeState(javax.servlet.http.HttpServletRequest request,
                            org.mozilla.javascript.NativeContinuation state)
Stores the state associated with the current request

Parameters:
request - the HTTP request
state - the state
Returns:
an identifier for the state. The identifier is unique at least in the scope of the current HTTP request's session.

getState

org.mozilla.javascript.NativeContinuation getState(javax.servlet.http.HttpServletRequest request,
                                                   java.lang.String id)
Retrieves the state associated with a request

Parameters:
request - the HTTP request
id - the unique identifier for the flow state
Returns:
the flow state, or null if it couldn't be resolved