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
  • Constructor Details

    • AbstractSnapshottingFlowExecutionRepository

      public AbstractSnapshottingFlowExecutionRepository(ConversationManager conversationManager, FlowExecutionSnapshotFactory snapshotFactory)
      Creates a new snapshotting flow execution repository.
      Parameters:
      conversationManager - the conversation manager
      snapshotFactory - the execution snapshot factory
  • Method Details

    • getSnapshotFactory

      public FlowExecutionSnapshotFactory getSnapshotFactory()
      Returns the configured flow execution snapshot factory.
      Returns:
      the snapshot factory
    • getSnapshotId

      protected Serializable getSnapshotId(FlowExecutionKey key)
      Returns the snapshotId portion of the flow execution key.
      Parameters:
      key - the execution key
    • snapshot

      protected FlowExecutionSnapshot snapshot(FlowExecution flowExecution)
      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 snapshot
      key - the flow execution snapshot key
      conversation - the governing conversation
      Returns:
      the restored flow execution
    • putConversationScope

      protected void putConversationScope(FlowExecution flowExecution, Conversation conversation)
      Puts the value of conversation scope in the conversation object.
      Parameters:
      flowExecution - the flow execution holding a reference to conversation scope
      conversation - the conversation where conversation scope is stored