|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.webflow.engine.builder.FlowAssembler
public class FlowAssembler
A director for assembling flows, delegating to a FlowBuilder
to construct a flow. This class encapsulates the
algorithm for using a FlowBuilder to assemble a Flow properly. It acts as the director in the classic GoF builder
pattern.
Flow assemblers may be used in a standalone, programmatic fashion as follows:
FlowBuilder builder = ...; Flow flow = new FlowAssembler("myFlow", builder).assembleFlow();
FlowBuilder
Constructor Summary | |
---|---|
FlowAssembler(java.lang.String flowId,
AttributeMap flowAttributes,
FlowBuilder flowBuilder)
Create a new flow assembler that will direct Flow assembly using the specified builder strategy. |
|
FlowAssembler(java.lang.String flowId,
FlowBuilder flowBuilder)
Create a new flow assembler that will direct Flow assembly using the specified builder strategy. |
Method Summary | |
---|---|
Flow |
assembleFlow()
Assembles the flow, directing the construction process by delegating to the configured FlowBuilder. |
protected void |
directAssembly()
Build all parts of the flow by directing flow assembly by the flow builder. |
AttributeMap |
getFlowAttributes()
Returns externally assigned attributes that can be used to affect flow construction. |
FlowBuilder |
getFlowBuilder()
Returns the flow builder strategy used to construct the flow from its component parts. |
java.lang.String |
getFlowId()
Returns the identifier to assign to the flow. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FlowAssembler(java.lang.String flowId, FlowBuilder flowBuilder)
flowId
- the flow id to assignflowBuilder
- the builder the factory will use to build flowspublic FlowAssembler(java.lang.String flowId, AttributeMap flowAttributes, FlowBuilder flowBuilder)
flowId
- the flow id to assignflowAttributes
- externally assigned flow attributes that can affect flow constructionflowBuilder
- the builder the factory will use to build flowsMethod Detail |
---|
public java.lang.String getFlowId()
public AttributeMap getFlowAttributes()
public FlowBuilder getFlowBuilder()
public Flow assembleFlow() throws FlowBuilderException
This will drive the flow construction process as described in the FlowBuilder
JavaDoc, starting with
builder initialisation using FlowBuilder.init(String, AttributeMap)
and finishing by cleaning up the
builder with a call to FlowBuilder.dispose()
.
FlowBuilderException
- when flow assembly failsprotected void directAssembly() throws FlowBuilderException
FlowBuilderException
- when flow assembly fails
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |