Class FlowModelFlowBuilder
java.lang.Object
org.springframework.webflow.engine.builder.support.AbstractFlowBuilder
org.springframework.webflow.engine.builder.model.FlowModelFlowBuilder
- All Implemented Interfaces:
FlowBuilder
- Author:
- Keith Donald
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Builds any end actions to execute when the flow ends.void
Creates and adds all exception handlers to the flow built by this builder.void
Builds any transitions shared by all states of the flow.void
Builds the input mapper responsible for mapping flow input on start.void
Builds the output mapper responsible for mapping flow output on end.void
Builds any start actions to execute when the flow starts.void
Builds the states of the flow.void
Builds any variables initialized by the flow when it starts.protected Flow
Factory method that initially creates the flow implementation during flow builder initialization.protected org.springframework.context.support.GenericApplicationContext
Build aGenericApplicationContext
for the flow definition being build.protected void
Shutdown the builder, releasing any resources it holds.protected void
doInit()
Initialize this builder.protected FlowModel
protected FlowModelHolder
Return theFlowModelHolder
that holds the Flow model.Returns a string describing the location of the flow resource; the logical location where the source code can be found.protected org.springframework.webflow.engine.builder.model.LocalFlowBuilderContext
boolean
As the underlying flow managed by this builder changed since the last build occurred?protected void
registerFlowBeans
(org.springframework.beans.factory.config.ConfigurableBeanFactory beanFactory) Register beans in the bean factory local to the flow definition being built.protected void
setLocalContext
(org.springframework.webflow.engine.builder.model.LocalFlowBuilderContext localFlowBuilderContext) toString()
Methods inherited from class org.springframework.webflow.engine.builder.support.AbstractFlowBuilder
dispose, getContext, getFlow, init
-
Field Details
-
VALIDATOR_FLOW_ATTR
-
VALIDATION_HINT_RESOLVER_FLOW_ATTR
-
-
Constructor Details
-
FlowModelFlowBuilder
- Parameters:
flowModelHolder
- the flow model holder
-
-
Method Details
-
doInit
Initialize this builder. This could cause the builder to open a stream to an externalized resource representing the flow definition, for example.- Overrides:
doInit
in classAbstractFlowBuilder
- Throws:
FlowBuilderException
- an exception occurred building the flow
-
createFlow
Description copied from class:AbstractFlowBuilder
Factory method that initially creates the flow implementation during flow builder initialization. Simply delegates to the configured flow artifact factory by default.- Overrides:
createFlow
in classAbstractFlowBuilder
- Returns:
- the flow instance, initially created but not yet built
-
buildVariables
Builds any variables initialized by the flow when it starts.- Specified by:
buildVariables
in interfaceFlowBuilder
- Overrides:
buildVariables
in classAbstractFlowBuilder
- Throws:
FlowBuilderException
- an exception occurred building the flow
-
buildInputMapper
Builds the input mapper responsible for mapping flow input on start.- Specified by:
buildInputMapper
in interfaceFlowBuilder
- Overrides:
buildInputMapper
in classAbstractFlowBuilder
- Throws:
FlowBuilderException
- an exception occurred building the flow
-
buildStartActions
Builds any start actions to execute when the flow starts.- Specified by:
buildStartActions
in interfaceFlowBuilder
- Overrides:
buildStartActions
in classAbstractFlowBuilder
- Throws:
FlowBuilderException
- an exception occurred building the flow
-
buildStates
Builds the states of the flow.- Specified by:
buildStates
in interfaceFlowBuilder
- Specified by:
buildStates
in classAbstractFlowBuilder
- Throws:
FlowBuilderException
- an exception occurred building the flow
-
buildGlobalTransitions
Builds any transitions shared by all states of the flow.- Specified by:
buildGlobalTransitions
in interfaceFlowBuilder
- Overrides:
buildGlobalTransitions
in classAbstractFlowBuilder
- Throws:
FlowBuilderException
- an exception occurred building the flow
-
buildEndActions
Builds any end actions to execute when the flow ends.- Specified by:
buildEndActions
in interfaceFlowBuilder
- Overrides:
buildEndActions
in classAbstractFlowBuilder
- Throws:
FlowBuilderException
- an exception occurred building the flow
-
buildOutputMapper
Builds the output mapper responsible for mapping flow output on end.- Specified by:
buildOutputMapper
in interfaceFlowBuilder
- Overrides:
buildOutputMapper
in classAbstractFlowBuilder
- Throws:
FlowBuilderException
- an exception occurred building the flow
-
buildExceptionHandlers
Creates and adds all exception handlers to the flow built by this builder.- Specified by:
buildExceptionHandlers
in interfaceFlowBuilder
- Overrides:
buildExceptionHandlers
in classAbstractFlowBuilder
- Throws:
FlowBuilderException
- an exception occurred building this flow
-
hasFlowChanged
public boolean hasFlowChanged()Description copied from interface:FlowBuilder
As the underlying flow managed by this builder changed since the last build occurred?- Specified by:
hasFlowChanged
in interfaceFlowBuilder
- Overrides:
hasFlowChanged
in classAbstractFlowBuilder
- Returns:
- true if changed, false if not
-
getFlowResourceString
Description copied from interface:FlowBuilder
Returns 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:
getFlowResourceString
in interfaceFlowBuilder
- Overrides:
getFlowResourceString
in classAbstractFlowBuilder
- Returns:
- the flow resource string
-
doDispose
Shutdown the builder, releasing any resources it holds. A new flow construction process should start with another call to theAbstractFlowBuilder.init(FlowBuilderContext)
method.- Overrides:
doDispose
in classAbstractFlowBuilder
- Throws:
FlowBuilderException
- an exception occurred building this flow
-
getFlowModel
-
getFlowModelHolder
Return theFlowModelHolder
that holds the Flow model.- Since:
- 3.0
-
getLocalContext
protected org.springframework.webflow.engine.builder.model.LocalFlowBuilderContext getLocalContext() -
setLocalContext
protected void setLocalContext(org.springframework.webflow.engine.builder.model.LocalFlowBuilderContext localFlowBuilderContext) -
registerFlowBeans
protected void registerFlowBeans(org.springframework.beans.factory.config.ConfigurableBeanFactory beanFactory) Register beans in the bean factory local to the flow definition being built.Subclasses may override this method to customize the population of the bean factory local to the flow definition being built; for example, to register mock implementations of services in a test environment.
- Parameters:
beanFactory
- the bean factory; register local beans with it usingSingletonBeanRegistry.registerSingleton(String, Object)
-
createFlowApplicationContext
protected org.springframework.context.support.GenericApplicationContext createFlowApplicationContext()Build aGenericApplicationContext
for the flow definition being build.Subclasses may override this method to fully control the nature and behavior of the Spring context for the flow.
- Returns:
- the built and refreshed context
- Since:
- 3.0
-
toString
-