|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.springframework.webflow.execution.repository.support.AbstractFlowExecutionRepository
org.springframework.webflow.execution.repository.support.AbstractConversationFlowExecutionRepository
org.springframework.webflow.execution.repository.continuation.ContinuationFlowExecutionRepository
public class ContinuationFlowExecutionRepository
Stores one to many flow execution continuations (snapshots) per conversation, where each continuation represents a paused, restorable view-state of a flow execution snapshotted at a point in time.
The set of active user conversations are managed by a
ConversationManager implementation, which this repository delegates
to.
This repository is responsible for:
FlowExecutionContinuation to a continuation group.This repository implementation also provides support for conversation invalidation after completion, where once a logical conversation completes (by one of its FlowExecution's reaching an end state), the entire conversation (including all continuations) is invalidated. This prevents the possibility of duplicate submission after completion.
This repository implementation should be considered when you do have to support browser navigational button use, e.g. you cannot lock down the browser and require that all navigational events to be routed explicitly through Spring Web Flow.
| Constructor Summary | |
|---|---|
ContinuationFlowExecutionRepository(FlowExecutionStateRestorer executionStateRestorer,
ConversationManager conversationManager)
Create a new continuation based flow execution repository using given state restorer and conversation manager. |
|
| Method Summary | |
|---|---|
protected java.io.Serializable |
generateContinuationId(FlowExecution flowExecution)
Template method used to generate a new continuation id for given flow execution. |
protected FlowExecutionContinuation |
getContinuation(FlowExecutionKey key)
Returns the continuation in the group with the specified key. |
FlowExecutionContinuationFactory |
getContinuationFactory()
Returns the continuation factory that encapsulates the construction of continuations stored in this repository. |
UidGenerator |
getContinuationIdGenerator()
Returns the uid generation strategy used to generate continuation identifiers. |
FlowExecution |
getFlowExecution(FlowExecutionKey key)
Return the FlowExecution indexed by the provided key. |
int |
getMaxContinuations()
Returns the maximum number of continuations allowed per conversation in this repository. |
protected void |
onBegin(Conversation conversation)
An "on begin conversation" callback, allowing for insertion of custom logic after a new conversation has begun. |
protected java.io.Serializable |
parseContinuationId(java.lang.String encodedId)
Template method to parse the continuation id from the encoded string. |
void |
putFlowExecution(FlowExecutionKey key,
FlowExecution flowExecution)
Place the FlowExecution in this repository under the
provided key. |
void |
setContinuationFactory(FlowExecutionContinuationFactory continuationFactory)
Sets the continuation factory that encapsulates the construction of continuations stored in this repository. |
void |
setContinuationIdGenerator(UidGenerator continuationIdGenerator)
Sets the uid generation strategy used to generate unique continuation identifiers for flow execution keys. |
void |
setMaxContinuations(int maxContinuations)
Sets the maximum number of continuations allowed per conversation in this repository. |
| Methods inherited from class org.springframework.webflow.execution.repository.support.AbstractConversationFlowExecutionRepository |
|---|
createConversationParameters, generateKey, getContinuationId, getConversation, getConversationId, getConversationManager, getConversationScope, getLock, getNextKey, onEnd, parseFlowExecutionKey, putConversationScope, removeFlowExecution |
| Methods inherited from class org.springframework.webflow.execution.repository.support.AbstractFlowExecutionRepository |
|---|
getExecutionStateRestorer |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ContinuationFlowExecutionRepository(FlowExecutionStateRestorer executionStateRestorer,
ConversationManager conversationManager)
executionStateRestorer - the state restoration strategy to useconversationManager - the conversation manager to use| Method Detail |
|---|
public FlowExecutionContinuationFactory getContinuationFactory()
SerializedFlowExecutionContinuationFactory.
public void setContinuationFactory(FlowExecutionContinuationFactory continuationFactory)
public UidGenerator getContinuationIdGenerator()
RandomGuidUidGenerator.
public void setContinuationIdGenerator(UidGenerator continuationIdGenerator)
flow execution keys.
public int getMaxContinuations()
public void setMaxContinuations(int maxContinuations)
public FlowExecution getFlowExecution(FlowExecutionKey key)
FlowExecutionRepositoryFlowExecution indexed by the provided key. The
returned flow execution represents the restored state of an executing
flow from a point in time. This should be called to resume a persistent
flow execution.
getFlowExecution in interface FlowExecutionRepositorygetFlowExecution in class AbstractConversationFlowExecutionRepositorykey - the flow execution key
public void putFlowExecution(FlowExecutionKey key,
FlowExecution flowExecution)
FlowExecutionRepositoryFlowExecution in this repository under the
provided key. This should be called to save or update the persistent
state of an active (but paused) flow execution.
putFlowExecution in interface FlowExecutionRepositoryputFlowExecution in class AbstractConversationFlowExecutionRepositorykey - the flow execution keyflowExecution - the flow executionprotected void onBegin(Conversation conversation)
AbstractConversationFlowExecutionRepository
onBegin in class AbstractConversationFlowExecutionRepositoryconversation - the conversation that has begunprotected java.io.Serializable generateContinuationId(FlowExecution flowExecution)
AbstractConversationFlowExecutionRepository
generateContinuationId in class AbstractConversationFlowExecutionRepositoryflowExecution - the flow execution
protected java.io.Serializable parseContinuationId(java.lang.String encodedId)
AbstractConversationFlowExecutionRepository
parseContinuationId in class AbstractConversationFlowExecutionRepositoryencodedId - the string identifier
protected FlowExecutionContinuation getContinuation(FlowExecutionKey key)
throws FlowExecutionRestorationFailureException
key - the flow execution key
FlowExecutionRestorationFailureException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||