Class MockFlowExecutionKeyFactory

java.lang.Object
org.springframework.webflow.test.MockFlowExecutionKeyFactory
All Implemented Interfaces:
FlowExecutionKeyFactory

public class MockFlowExecutionKeyFactory extends Object implements FlowExecutionKeyFactory
Trivial flow execution key factory implementation that returns a mock flow execution key each time. The mock key returned is unique: its value is the result of incrementing a sequence managed in static memory.
Author:
Keith Donald
  • Constructor Details

    • MockFlowExecutionKeyFactory

      public MockFlowExecutionKeyFactory()
  • Method Details

    • getKey

      public FlowExecutionKey getKey(FlowExecution execution)
      Description copied from interface: FlowExecutionKeyFactory
      Get the key to assign to the flow execution. This factory simply generates the key to assign, it does not actually perform the key assignment.
      Specified by:
      getKey in interface FlowExecutionKeyFactory
      Parameters:
      execution - the flow execution
      Returns:
      the key to assign to the flow execution
    • removeAllFlowExecutionSnapshots

      public void removeAllFlowExecutionSnapshots(FlowExecution execution)
      Description copied from interface: FlowExecutionKeyFactory
      Remove all snapshots associated with the flow execution from storage, invalidating all history. Does nothing if no key has been assigned or no snapshots have been taken.
      Specified by:
      removeAllFlowExecutionSnapshots in interface FlowExecutionKeyFactory
      Parameters:
      execution - the flow execution
    • removeFlowExecutionSnapshot

      public void removeFlowExecutionSnapshot(FlowExecution execution)
      Description copied from interface: FlowExecutionKeyFactory
      Remove the snapshot that was used to restore this flow execution, discarding it for future use. Does nothing if the no key been assigned or no snapshot has been taken.
      Specified by:
      removeFlowExecutionSnapshot in interface FlowExecutionKeyFactory
      Parameters:
      execution - the flow execution
    • updateFlowExecutionSnapshot

      public void updateFlowExecutionSnapshot(FlowExecution execution)
      Description copied from interface: FlowExecutionKeyFactory
      Capture the current state of the flow execution by updating its snapshot in storage. Does nothing if the no key has been assigned or no snapshot has already been taken.
      Specified by:
      updateFlowExecutionSnapshot in interface FlowExecutionKeyFactory
      Parameters:
      execution - the flow execution