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
-
Method Summary
Modifier and TypeMethodDescriptiongetKey
(FlowExecution execution) Get the key to assign to the flow execution.void
removeAllFlowExecutionSnapshots
(FlowExecution execution) Remove all snapshots associated with the flow execution from storage, invalidating all history.void
removeFlowExecutionSnapshot
(FlowExecution execution) Remove the snapshot that was used to restore this flow execution, discarding it for future use.void
updateFlowExecutionSnapshot
(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: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 interfaceFlowExecutionKeyFactory
- Parameters:
execution
- the flow execution- Returns:
- the key to assign to the flow execution
-
removeAllFlowExecutionSnapshots
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 interfaceFlowExecutionKeyFactory
- Parameters:
execution
- the flow execution
-
removeFlowExecutionSnapshot
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 interfaceFlowExecutionKeyFactory
- Parameters:
execution
- the flow execution
-
updateFlowExecutionSnapshot
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 interfaceFlowExecutionKeyFactory
- Parameters:
execution
- the flow execution
-