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
Fields -
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.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.protected org.springframework.context.support.GenericApplicationContextBuild aGenericApplicationContextfor the flow definition being build.protected voidShutdown the builder, releasing any resources it holds.protected voiddoInit()Initialize this builder.protected FlowModelprotected FlowModelHolderReturn theFlowModelHolderthat 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.LocalFlowBuilderContextbooleanAs the underlying flow managed by this builder changed since the last build occurred?protected voidregisterFlowBeans(org.springframework.beans.factory.config.ConfigurableBeanFactory beanFactory) Register beans in the bean factory local to the flow definition being built.protected voidsetLocalContext(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:
doInitin classAbstractFlowBuilder- Throws:
FlowBuilderException- an exception occurred building the flow
-
createFlow
Description copied from class:AbstractFlowBuilderFactory method that initially creates the flow implementation during flow builder initialization. Simply delegates to the configured flow artifact factory by default.- Overrides:
createFlowin classAbstractFlowBuilder- Returns:
- the flow instance, initially created but not yet built
-
buildVariables
Builds any variables initialized by the flow when it starts.- Specified by:
buildVariablesin interfaceFlowBuilder- Overrides:
buildVariablesin classAbstractFlowBuilder- Throws:
FlowBuilderException- an exception occurred building the flow
-
buildInputMapper
Builds the input mapper responsible for mapping flow input on start.- Specified by:
buildInputMapperin interfaceFlowBuilder- Overrides:
buildInputMapperin classAbstractFlowBuilder- Throws:
FlowBuilderException- an exception occurred building the flow
-
buildStartActions
Builds any start actions to execute when the flow starts.- Specified by:
buildStartActionsin interfaceFlowBuilder- Overrides:
buildStartActionsin classAbstractFlowBuilder- Throws:
FlowBuilderException- an exception occurred building the flow
-
buildStates
Builds the states of the flow.- Specified by:
buildStatesin interfaceFlowBuilder- Specified by:
buildStatesin classAbstractFlowBuilder- Throws:
FlowBuilderException- an exception occurred building the flow
-
buildGlobalTransitions
Builds any transitions shared by all states of the flow.- Specified by:
buildGlobalTransitionsin interfaceFlowBuilder- Overrides:
buildGlobalTransitionsin classAbstractFlowBuilder- Throws:
FlowBuilderException- an exception occurred building the flow
-
buildEndActions
Builds any end actions to execute when the flow ends.- Specified by:
buildEndActionsin interfaceFlowBuilder- Overrides:
buildEndActionsin classAbstractFlowBuilder- Throws:
FlowBuilderException- an exception occurred building the flow
-
buildOutputMapper
Builds the output mapper responsible for mapping flow output on end.- Specified by:
buildOutputMapperin interfaceFlowBuilder- Overrides:
buildOutputMapperin 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:
buildExceptionHandlersin interfaceFlowBuilder- Overrides:
buildExceptionHandlersin classAbstractFlowBuilder- 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- Overrides:
hasFlowChangedin classAbstractFlowBuilder- 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- Overrides:
getFlowResourceStringin 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:
doDisposein classAbstractFlowBuilder- Throws:
FlowBuilderException- an exception occurred building this flow
-
getFlowModel
-
getFlowModelHolder
Return theFlowModelHolderthat 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 aGenericApplicationContextfor 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
-