Spring Web Flow

org.springframework.webflow.execution.repository.snapshot
Interface FlowExecutionSnapshotFactory

All Known Implementing Classes:
SerializedFlowExecutionSnapshotFactory, SimpleFlowExecutionSnapshotFactory

public interface FlowExecutionSnapshotFactory

A factory for creating different FlowExecutionSnapshot implementations.

Author:
Keith Donald, Erwin Vervaet

Method Summary
 FlowExecutionSnapshot createSnapshot(FlowExecution flowExecution)
          Takes a snapshot of the flow execution.
 FlowExecution restoreExecution(FlowExecutionSnapshot snapshot, java.lang.String flowId, FlowExecutionKey key, MutableAttributeMap<java.lang.Object> conversationScope, FlowExecutionKeyFactory keyFactory)
          Restores a flow execution from a previously taken snapshot.
 

Method Detail

createSnapshot

FlowExecutionSnapshot createSnapshot(FlowExecution flowExecution)
                                     throws SnapshotCreationException
Takes a snapshot of the flow execution.

Parameters:
flowExecution - the flow execution
Returns:
the new snapshot
Throws:
SnapshotCreationException - if the snapshot could not be created

restoreExecution

FlowExecution restoreExecution(FlowExecutionSnapshot snapshot,
                               java.lang.String flowId,
                               FlowExecutionKey key,
                               MutableAttributeMap<java.lang.Object> conversationScope,
                               FlowExecutionKeyFactory keyFactory)
                               throws FlowExecutionRestorationFailureException
Restores a flow execution from a previously taken snapshot.

Parameters:
snapshot - the previously taken snapshot
flowId - the id of the root flow definition
key - the flow execution key
conversationScope - conversation scope
keyFactory - factory for creating new snapshot keys
Returns:
the restored flow execution
Throws:
FlowExecutionRestorationFailureException - if flow execution restoration fails

Spring Web Flow