| Builder interface used to build a flow definition. The process of building a
flow consists of the following steps:
- Initialize this builder, creating the initial flow definition, by
calling
FlowBuilder.init(String,AttributeMap) .
- Call
FlowBuilder.buildVariables() to create any variables of the flow and
add them to the flow definition.
- Call
FlowBuilder.buildInputMapper() to create and set the input mapper for
the flow.
- Call
FlowBuilder.buildStartActions() to create and add any start actions to
the flow.
- Call
FlowBuilder.buildInlineFlows() to create any inline flows
encapsulated by the flow and add them to the flow definition.
- Call
FlowBuilder.buildStates() to create the states of the flow and add
them to the flow definition.
- Call
FlowBuilder.buildGlobalTransitions() to create the any transitions
shared by all states of the flow and add them to the flow definition.
- Call
FlowBuilder.buildEndActions() to create and add any end actions to
the flow.
- Call
FlowBuilder.buildOutputMapper() to create and set the output mapper
for the flow.
- Call
FlowBuilder.buildExceptionHandlers() to create the exception
handlers of the flow and add them to the flow definition.
- Call
FlowBuilder.getFlow() to return the fully-built
Flow definition.
- Dispose this builder, releasing any resources allocated during the
building process by calling
FlowBuilder.dispose() .
Implementations should encapsulate flow construction logic, either for a
specific kind of flow, for example, an OrderFlowBuilder built
in Java code, or a generic flow builder strategy, like the
XmlFlowBuilder , for building flows from an XML-definition.
Flow builders are used by the
org.springframework.webflow.engine.builder.FlowAssembler , which acts as an
assembler (director). Flow Builders may be reused, however, exercise caution
when doing this as these objects are not thread safe. Also, for each use be
sure to call init, followed by the build* methods, getFlow, and dispose
completely in that order.
This is an example of the classic GoF builder pattern.
See Also: Flow See Also: org.springframework.webflow.engine.builder.FlowAssembler See Also: org.springframework.webflow.engine.builder.AbstractFlowBuilder See Also: org.springframework.webflow.engine.builder.xml.XmlFlowBuilder author: Keith Donald author: Erwin Vervaet |