Class AbstractSnapshottingFlowExecutionRepository
java.lang.Object
org.springframework.webflow.execution.repository.support.AbstractFlowExecutionRepository
org.springframework.webflow.execution.repository.snapshot.AbstractSnapshottingFlowExecutionRepository
- All Implemented Interfaces:
FlowExecutionKeyFactory
,FlowExecutionRepository
- Direct Known Subclasses:
DefaultFlowExecutionRepository
public abstract class AbstractSnapshottingFlowExecutionRepository
extends AbstractFlowExecutionRepository
Base class for repositories that take flow execution snapshots using a
FlowExecutionSnapshotFactory
.- Author:
- Keith Donald
-
Field Summary
Fields inherited from class org.springframework.webflow.execution.repository.support.AbstractFlowExecutionRepository
logger
-
Constructor Summary
ConstructorDescriptionAbstractSnapshottingFlowExecutionRepository
(ConversationManager conversationManager, FlowExecutionSnapshotFactory snapshotFactory) Creates a new snapshotting flow execution repository. -
Method Summary
Modifier and TypeMethodDescriptionReturns the configured flow execution snapshot factory.protected Serializable
Returns the snapshotId portion of the flow execution key.protected void
putConversationScope
(FlowExecution flowExecution, Conversation conversation) Puts the value of conversation scope in the conversation object.protected FlowExecution
restoreFlowExecution
(FlowExecutionSnapshot snapshot, FlowExecutionKey key, Conversation conversation) Restore a flow execution from a snapshot.protected FlowExecutionSnapshot
snapshot
(FlowExecution flowExecution) Take a new flow execution snapshot.Methods inherited from class org.springframework.webflow.execution.repository.support.AbstractFlowExecutionRepository
assertKeySet, createConversationParameters, getAlwaysGenerateNewNextKey, getConversation, getConversation, getConversationManager, getFlowExecution, getKey, getLock, nextSnapshotId, parseFlowExecutionKey, putFlowExecution, removeFlowExecution, setAlwaysGenerateNewNextKey
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.webflow.execution.FlowExecutionKeyFactory
removeAllFlowExecutionSnapshots, removeFlowExecutionSnapshot, updateFlowExecutionSnapshot
-
Constructor Details
-
AbstractSnapshottingFlowExecutionRepository
public AbstractSnapshottingFlowExecutionRepository(ConversationManager conversationManager, FlowExecutionSnapshotFactory snapshotFactory) Creates a new snapshotting flow execution repository.- Parameters:
conversationManager
- the conversation managersnapshotFactory
- the execution snapshot factory
-
-
Method Details
-
getSnapshotFactory
Returns the configured flow execution snapshot factory.- Returns:
- the snapshot factory
-
getSnapshotId
Returns the snapshotId portion of the flow execution key.- Parameters:
key
- the execution key
-
snapshot
Take a new flow execution snapshot.- Parameters:
flowExecution
- the execution to snapshot- Returns:
- the snapshot
-
restoreFlowExecution
protected FlowExecution restoreFlowExecution(FlowExecutionSnapshot snapshot, FlowExecutionKey key, Conversation conversation) Restore a flow execution from a snapshot.- Parameters:
snapshot
- the snapshotkey
- the flow execution snapshot keyconversation
- the governing conversation- Returns:
- the restored flow execution
-
putConversationScope
Puts the value of conversation scope in the conversation object.- Parameters:
flowExecution
- the flow execution holding a reference to conversation scopeconversation
- the conversation where conversation scope is stored
-