Class AbstractFlowBuilder
java.lang.Object
org.springframework.webflow.engine.builder.support.AbstractFlowBuilder
- All Implemented Interfaces:
FlowBuilder
- Direct Known Subclasses:
FlowModelFlowBuilder
Abstract base implementation of a flow builder defining common functionality needed by most concrete flow builder
implementations. This class implements all optional parts of the FlowBuilder process as no-op methods. Subclasses are
only required to implement
buildStates().- Author:
- Keith Donald, Erwin Vervaet
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidBuilds any end actions to execute when the flow ends.voidCreates and adds all exception handlers to the flow built by this builder.voidBuilds any transitions shared by all states of the flow.voidBuilds the input mapper responsible for mapping flow input on start.voidBuilds the output mapper responsible for mapping flow output on end.voidBuilds any start actions to execute when the flow starts.abstract voidBuilds the states of the flow.voidBuilds any variables initialized by the flow when it starts.protected FlowFactory method that initially creates the flow implementation during flow builder initialization.voiddispose()Shutdown the builder, releasing any resources it holds.protected voidFlow builder destruction hook.protected voiddoInit()Flow builder initialization hook.protected FlowBuilderContextReturns this flow builder's context.getFlow()Get the fully constructed and configured Flow object.Returns a string describing the location of the flow resource; the logical location where the source code can be found.booleanAs the underlying flow managed by this builder changed since the last build occurred?voidinit(FlowBuilderContext context) Initialize this builder.
-
Constructor Details
-
AbstractFlowBuilder
public AbstractFlowBuilder()
-
-
Method Details
-
init
Description copied from interface:FlowBuilderInitialize this builder. This could cause the builder to open a stream to an externalized resource representing the flow definition, for example.- Specified by:
initin interfaceFlowBuilder- Parameters:
context- the flow builder context- Throws:
FlowBuilderException- an exception occurred building the flow
-
doInit
protected void doInit()Flow builder initialization hook. Does nothing by default. May be overridden by subclasses. -
createFlow
Factory method that initially creates the flow implementation during flow builder initialization. Simply delegates to the configured flow artifact factory by default.- Returns:
- the flow instance, initially created but not yet built
-
getContext
Returns this flow builder's context.- Returns:
- the flow builder context
-
buildVariables
Description copied from interface:FlowBuilderBuilds any variables initialized by the flow when it starts.- Specified by:
buildVariablesin interfaceFlowBuilder- Throws:
FlowBuilderException- an exception occurred building the flow
-
buildInputMapper
Description copied from interface:FlowBuilderBuilds the input mapper responsible for mapping flow input on start.- Specified by:
buildInputMapperin interfaceFlowBuilder- Throws:
FlowBuilderException- an exception occurred building the flow
-
buildStartActions
Description copied from interface:FlowBuilderBuilds any start actions to execute when the flow starts.- Specified by:
buildStartActionsin interfaceFlowBuilder- Throws:
FlowBuilderException- an exception occurred building the flow
-
buildStates
Description copied from interface:FlowBuilderBuilds the states of the flow.- Specified by:
buildStatesin interfaceFlowBuilder- Throws:
FlowBuilderException- an exception occurred building the flow
-
buildGlobalTransitions
Description copied from interface:FlowBuilderBuilds any transitions shared by all states of the flow.- Specified by:
buildGlobalTransitionsin interfaceFlowBuilder- Throws:
FlowBuilderException- an exception occurred building the flow
-
buildEndActions
Description copied from interface:FlowBuilderBuilds any end actions to execute when the flow ends.- Specified by:
buildEndActionsin interfaceFlowBuilder- Throws:
FlowBuilderException- an exception occurred building the flow
-
buildOutputMapper
Description copied from interface:FlowBuilderBuilds the output mapper responsible for mapping flow output on end.- Specified by:
buildOutputMapperin interfaceFlowBuilder- Throws:
FlowBuilderException- an exception occurred building the flow
-
buildExceptionHandlers
Description copied from interface:FlowBuilderCreates and adds all exception handlers to the flow built by this builder.- Specified by:
buildExceptionHandlersin interfaceFlowBuilder- Throws:
FlowBuilderException- an exception occurred building this flow
-
getFlow
Description copied from interface:FlowBuilderGet the fully constructed and configured Flow object. Called by the builder's assembler (director) after assembly. When this method is called by the assembler, it is expected flow construction has completed and the returned flow is fully configured and ready for use.- Specified by:
getFlowin interfaceFlowBuilder- Throws:
FlowBuilderException- an exception occurred building this flow
-
dispose
Description copied from interface:FlowBuilderShutdown the builder, releasing any resources it holds. A new flow construction process should start with another call to theFlowBuilder.init(FlowBuilderContext)method.- Specified by:
disposein interfaceFlowBuilder- Throws:
FlowBuilderException- an exception occurred building this flow
-
hasFlowChanged
public boolean hasFlowChanged()Description copied from interface:FlowBuilderAs the underlying flow managed by this builder changed since the last build occurred?- Specified by:
hasFlowChangedin interfaceFlowBuilder- Returns:
- true if changed, false if not
-
getFlowResourceString
Description copied from interface:FlowBuilderReturns a string describing the location of the flow resource; the logical location where the source code can be found. Used for informational purposes.- Specified by:
getFlowResourceStringin interfaceFlowBuilder- Returns:
- the flow resource string
-
doDispose
protected void doDispose()Flow builder destruction hook. Does nothing by default. May be overridden by subclasses.
-