Overview | Package | Class | Tree | Deprecated | Index | Help
| Spring Web Flow
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.springframework.webflow.engine.builder
Class FlowAssembler

    java.lang.Object
      org.springframework.webflow.engine.builder.FlowAssembler

    public class FlowAssembler

extends java.lang.Object

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 = ...;
         FlowBuilder context = ...;
         Flow flow = new FlowAssembler(builder, builderContext).assembleFlow();

Author:
  Keith Donald, Erwin Vervaet
See Also:
  `FlowBuilder`

Constructor Summary
`FlowAssembler(FlowBuilder flowBuilder, FlowBuilderContext flowBuilderContext)` 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.
`FlowBuilder` | `getFlowBuilder()` Returns the flow builder strategy used to construct the flow from its component parts.
`FlowBuilderContext` | `getFlowBuilderContext()` Returns the flow builder context.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### FlowAssembler

    public FlowAssembler(FlowBuilder flowBuilder,
                         FlowBuilderContext flowBuilderContext)

  Create a new flow assembler that will direct Flow assembly using the specified builder strategy.

  Parameters:
    `flowBuilder` - the builder the factory will use to build flows
    `flowBuilderContext` - context to influence the build process

Method Detail

### getFlowBuilder

    public FlowBuilder getFlowBuilder()

  Returns the flow builder strategy used to construct the flow from its component parts.

### getFlowBuilderContext

    public FlowBuilderContext getFlowBuilderContext()

  Returns the flow builder context.

  Returns:
    flow builder context

### assembleFlow

    public Flow assembleFlow()
                      throws FlowBuilderException

  Assembles the flow, directing the construction process by delegating to the configured FlowBuilder. Every call to this method will assemble the Flow instance.

  This will drive the flow construction process as described in the `FlowBuilder` JavaDoc, starting with builder initialization using `FlowBuilder.init(FlowBuilderContext)` and finishing by cleaning up the builder with a call to `FlowBuilder.dispose()`.

  Returns:
    the constructed flow
  Throws:
    `FlowBuilderException` - when flow assembly fails

### directAssembly

    protected void directAssembly()
                           throws FlowBuilderException

  Build all parts of the flow by directing flow assembly by the flow builder.

  Throws:
    `FlowBuilderException` - when flow assembly fails

Overview | Package | Class | Tree | Deprecated | Index | Help
| Spring Web Flow
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD