spring-webflow

org.springframework.webflow.config
Class FlowExecutorBuilder

java.lang.Object
  extended by org.springframework.webflow.config.FlowExecutorBuilder

public class FlowExecutorBuilder
extends java.lang.Object

A builder for FlowExecutor instances designed for programmatic use in @Bean factory methods. For XML configuration consider using the webflow-config XML namespace.

Since:
2.4
Author:
Rossen Stoyanchev

Constructor Summary
FlowExecutorBuilder(FlowDefinitionLocator flowRegistry, org.springframework.context.ApplicationContext applicationContext)
          Create a new instance with the given flow registry and ApplicationContext.
 
Method Summary
 FlowExecutorBuilder addFlowExecutionAttribute(java.lang.String name, java.lang.Object value)
          Add a single flow execution meta attribute.
 FlowExecutorBuilder addFlowExecutionListener(FlowExecutionListener listener)
          Register a FlowExecutionListener that observes the lifecycle of all flow executions launched by this executor.
 FlowExecutorBuilder addFlowExecutionListener(FlowExecutionListener listener, java.lang.String criteria)
          Register a FlowExecutionListener that observes the lifecycle of flow executions launched by this executor.
 FlowExecutor build()
          Create and return a FlowExecutor instance.
 FlowExecutorBuilder setAlwaysRedirectOnPause(boolean redirectOnPause)
          Whether flow executions should redirect after they pause before rendering.
 FlowExecutorBuilder setConversationManager(ConversationManager conversationManager)
          Set the ConversationManager implementation to use for storing conversations in the session effectively controlling how state is stored physically when a flow execution is paused..
 FlowExecutorBuilder setMaxFlowExecutions(int maxFlowExecutions)
          Set the maximum number of allowed flow executions per user.
 FlowExecutorBuilder setMaxFlowExecutionSnapshots(int maxFlowExecutionSnapshots)
          Set the maximum number of history snapshots allowed per flow execution.
 FlowExecutorBuilder setRedirectInSameState(boolean redirectInSameState)
          Whether flow executions redirect after they pause for transitions that remain in the same view state.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FlowExecutorBuilder

public FlowExecutorBuilder(FlowDefinitionLocator flowRegistry,
                           org.springframework.context.ApplicationContext applicationContext)
Create a new instance with the given flow registry and ApplicationContext.

Parameters:
flowRegistry - the flow registry that will locate flow definitions
applicationContext - the Spring ApplicationContext to use for initializing an instance of MvcEnvironment
Method Detail

setMaxFlowExecutions

public FlowExecutorBuilder setMaxFlowExecutions(int maxFlowExecutions)
Set the maximum number of allowed flow executions per user.

Parameters:
maxFlowExecutions - the max flow executions

setMaxFlowExecutionSnapshots

public FlowExecutorBuilder setMaxFlowExecutionSnapshots(int maxFlowExecutionSnapshots)
Set the maximum number of history snapshots allowed per flow execution.

Parameters:
maxFlowExecutionSnapshots - the max flow execution snapshots

setAlwaysRedirectOnPause

public FlowExecutorBuilder setAlwaysRedirectOnPause(boolean redirectOnPause)
Whether flow executions should redirect after they pause before rendering.

Parameters:
redirectOnPause - whether to redirect or not

setRedirectInSameState

public FlowExecutorBuilder setRedirectInSameState(boolean redirectInSameState)
Whether flow executions redirect after they pause for transitions that remain in the same view state. This attribute effectively overrides the value of the "always-redirect-on-pause" attribute in same state transitions.

Parameters:
redirectInSameState - whether to redirect or not

addFlowExecutionAttribute

public FlowExecutorBuilder addFlowExecutionAttribute(java.lang.String name,
                                                     java.lang.Object value)
Add a single flow execution meta attribute.

Parameters:
name - the attribute name
value - the attribute value

addFlowExecutionListener

public FlowExecutorBuilder addFlowExecutionListener(FlowExecutionListener listener)
Register a FlowExecutionListener that observes the lifecycle of all flow executions launched by this executor.

Parameters:
listener - the listener to be registered

addFlowExecutionListener

public FlowExecutorBuilder addFlowExecutionListener(FlowExecutionListener listener,
                                                    java.lang.String criteria)
Register a FlowExecutionListener that observes the lifecycle of flow executions launched by this executor.

Parameters:
listener - the listener to be registered
criteria - the criteria that determines the flow definitions a listener should observe, delimited by commas or '*' for "all". Example: 'flow1,flow2,flow3'.

setConversationManager

public FlowExecutorBuilder setConversationManager(ConversationManager conversationManager)
Set the ConversationManager implementation to use for storing conversations in the session effectively controlling how state is stored physically when a flow execution is paused.. Note that when this attribute is provided, the "max-execution-snapshots" attribute is meaningless.

Parameters:
conversationManager - the ConversationManager instance to use

build

public FlowExecutor build()
Create and return a FlowExecutor instance.


spring-webflow