org.springframework.webflow.engine.builder |
The flow builder subsystem for building and assembling executable flow definitions.
You construct a Flow using a {@link org.springframework.webflow.engine.builder.FlowBuilder}.
This package defines the following flow builder implementations:
-
{@link org.springframework.webflow.engine.builder.AbstractFlowBuilder} - A
convenience superclass to use when you want to assemble the web flow
in Java code.
-
{@link org.springframework.webflow.engine.builder.xml.XmlFlowBuilder} - A flow
builder that reads an XML file containing a web flow definition and
constructs the flow accordingly.
During flow construction, a flow builder may need to access externally
managed flow artifacts referenced by the flow definition.
The {@link org.springframework.webflow.engine.builder.FlowServiceLocator} fulfills
this need, acting as a facade or gateway to an external registry of
flow artifacts (such as a Spring Bean Factory).
To direct flow construction, use the
{@link org.springframework.webflow.engine.builder.FlowAssembler}.
This package is based on the classic GoF Builder design pattern.
|
Java Source File Name | Type | Comment |
AbstractFlowBuilder.java | Class | Base class for flow builders that programmatically build flows in Java
configuration code.
To give you an example of what a simple Java-based web flow builder
definition might look like, the following example defines the 'dynamic' web
flow roughly equivalent to the work flow statically implemented in Spring
MVC's simple form controller:
public class CustomerDetailFlowBuilder extends AbstractFlowBuilder {
public void buildStates() {
// get customer information
addActionState("getDetails", action("customerAction"), transition(on(success()), to("displayDetails")));
// view customer information
addViewState("displayDetails", "customerDetails", transition(on(submit()), to("bindAndValidate")));
// bind and validate customer information updates
addActionState("bindAndValidate", action("customerAction"), new Transition[] {
transition(on(error()), to("displayDetails")), transition(on(success()), to("finish")) });
// finish
addEndState("finish");
}
}
What this Java-based FlowBuilder implementation does is add four states to a
flow. |
AbstractFlowBuilderFlowRegistryFactoryBean.java | Class | Base class for factory beans that create flow definition registries containing
flows built using Java based
AbstractFlowBuilder flow builders . |
AbstractFlowBuildingFlowRegistryFactoryBean.java | Class | A base class for factory beans that create populated registries of flow
definitions built using a
FlowBuilder , typically a
BaseFlowBuilder subclass. |
BaseFlowBuilder.java | Class | Abstract base implementation of a flow builder defining common functionality
needed by most concrete flow builder implementations. |
BaseFlowServiceLocator.java | Class | Base implementation that implements a minimal set of the
FlowServiceLocator interface, throwing unsupported operation
exceptions for some operations. |
DefaultFlowServiceLocator.java | Class | The default flow service locator implementation that obtains subflow
definitions from a dedicated
FlowDefinitionRegistry and obtains the
remaining services from a generic Spring
BeanFactory . |
FlowArtifactFactory.java | Class | A factory for core web flow elements such as
Flow flows ,
State states , and
Transition transitions .
This factory encapsulates the construction of each Flow implementation as
well as each core artifact type. |
FlowArtifactLookupException.java | Class | A flow artifact lookup exception is thrown when an artifact (such as a flow, state,
action, etc.) required by the webflow system cannot be obtained.
Flow artifact lookup exceptions indicate unrecoverable problems with the flow
definition, e.g. |
FlowAssembler.java | Class | A director for assembling flows, delegating to a
FlowBuilder to
construct a flow. |
FlowBuilder.java | Interface | Builder interface used to build a flow definition. |
FlowBuilderException.java | Class | Exception thrown to indicate a problem while building a flow. |
FlowServiceLocator.java | Interface | A support interface used by flow builders at configuration time. |
RefreshableFlowDefinitionHolder.java | Class | A flow definition holder that can detect changes on an underlying flow
definition resource and refresh that resource automatically. |
TextToTargetStateResolver.java | Class | Converter that takes an encoded string representation and produces a
corresponding
TargetStateResolver object.
This converter supports the following encoded forms:
- "stateId" - will result in a TargetStateResolver that always resolves
the same state.
|
TextToTransitionCriteria.java | Class | Converter that takes an encoded string representation and produces a
corresponding TransitionCriteria object. |
TextToViewSelector.java | Class | Converter that converts an encoded string representation of a view selector
into a
ViewSelector object that will make selections at runtime. |