Package org.springframework.webflow.test
Class MockFlowExecutionKeyFactory
java.lang.Object
org.springframework.webflow.test.MockFlowExecutionKeyFactory
- All Implemented Interfaces:
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetKey(FlowExecution execution) Get the key to assign to the flow execution.voidremoveAllFlowExecutionSnapshots(FlowExecution execution) Remove all snapshots associated with the flow execution from storage, invalidating all history.voidremoveFlowExecutionSnapshot(FlowExecution execution) Remove the snapshot that was used to restore this flow execution, discarding it for future use.voidupdateFlowExecutionSnapshot(FlowExecution execution) Capture the current state of the flow execution by updating its snapshot in storage.
-
Constructor Details
-
MockFlowExecutionKeyFactory
public MockFlowExecutionKeyFactory()
-
-
Method Details
-
getKey
Description copied from interface:FlowExecutionKeyFactoryGet 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:
getKeyin interfaceFlowExecutionKeyFactory- Parameters:
execution- the flow execution- Returns:
- the key to assign to the flow execution
-
removeAllFlowExecutionSnapshots
Description copied from interface:FlowExecutionKeyFactoryRemove 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:
removeAllFlowExecutionSnapshotsin interfaceFlowExecutionKeyFactory- Parameters:
execution- the flow execution
-
removeFlowExecutionSnapshot
Description copied from interface:FlowExecutionKeyFactoryRemove 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:
removeFlowExecutionSnapshotin interfaceFlowExecutionKeyFactory- Parameters:
execution- the flow execution
-
updateFlowExecutionSnapshot
Description copied from interface:FlowExecutionKeyFactoryCapture 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:
updateFlowExecutionSnapshotin interfaceFlowExecutionKeyFactory- Parameters:
execution- the flow execution
-