Class FlowModelFlowBuilder
java.lang.Object
org.springframework.webflow.engine.builder.support.AbstractFlowBuilder
net.shibboleth.idp.profile.spring.factory.FlowModelFlowBuilder
- All Implemented Interfaces:
FlowBuilder
This code is extended from
FlowModelFlowBuilder
in order to customize the Spring ApplicationContext
used for flow configuration.
The only method changed is createFlowApplicationContext(String[])
(parameter changed
from Resource
, but it's private and there are too many threads pulled by anything
but a wholesale duplication of this class).
Builds a runtime Flow
definition object from a FlowModel
.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate FlowModel
private FlowModelHolder
private static final boolean
private LocalFlowBuilderContext
static final String
static final String
-
Constructor Summary
Constructors -
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.private BinderConfiguration
createBinderConfiguration
(BinderModel binderModel) protected Flow
private GenericApplicationContext
createFlowApplicationContext
(String[] resources) private ViewFactory
createViewFactory
(Expression viewId, BinderModel binderModel) protected void
Shutdown the builder, releasing any resources it holds.protected void
doInit()
Initialize this builder.private ConversionExecutor
fromStringTo
(Class<?> targetType) protected FlowModel
protected LocalFlowBuilderContext
boolean
private void
private boolean
private Action[]
parseActions
(List<AbstractActionModel> actionModels) private void
parseAndAddActionState
(ActionStateModel state, Flow flow) private void
parseAndAddDecisionState
(DecisionStateModel state, Flow flow) private void
parseAndAddEndState
(EndStateModel state, Flow flow) private void
parseAndAddSubflowState
(SubflowStateModel state, Flow flow) private void
parseAndAddViewState
(ViewStateModel state, Flow flow) private void
parseAndPutMetaAttribute
(AttributeModel attribute, MutableAttributeMap<Object> attributes) private void
parseAndPutPersistenceContext
(PersistenceContextModel persistenceContext, MutableAttributeMap<Object> attributes) private void
parseAndPutSecured
(SecuredModel secured, MutableAttributeMap<Object> attributes) private void
parseAndSetMappingConversionExecutor
(AbstractMappingModel mappingModel, DefaultMapping mapping) private void
parseAndSetMappingRequired
(AbstractMappingModel mappingModel, DefaultMapping mapping) private Object
parseAttributeValueIfNecessary
(AttributeModel attribute, String stringValue) private String[]
parseContextResources
(List<BeanImportModel> beanImports) private FlowExecutionExceptionHandler
parseCustomExceptionHandler
(ExceptionHandlerModel exceptionHandler) private FlowExecutionExceptionHandler[]
parseCustomExceptionHandlers
(List<ExceptionHandlerModel> exceptionHandlerModels) private Transition
private Action
parseEvaluateAction
(EvaluateModel evaluate) private FlowExecutionExceptionHandler[]
parseExceptionHandlers
(List<ExceptionHandlerModel> modelExceptionHandlers, List<TransitionModel> modelTransitions) private Mapper
parseFlowInputMapper
(List<InputModel> inputs) private DefaultMapping
parseFlowInputMapping
(InputModel input) private AttributeMap<Object>
private Mapper
parseFlowOutputMapper
(List<OutputModel> outputs) private DefaultMapping
parseFlowOutputMapping
(OutputModel output) private FlowVariable
private Transition[]
private Transition[]
private MutableAttributeMap<Object>
parseMetaAttributes
(List<AttributeModel> attributeModels) private Action
parseRenderAction
(RenderModel render) private Action
parseSetAction
(SetModel set) private SubflowAttributeMapper
private Expression
parseSubflowExpression
(String subflow) private Mapper
parseSubflowInputMapper
(List<InputModel> inputs) private DefaultMapping
private Mapper
parseSubflowOutputMapper
(List<OutputModel> outputs) private DefaultMapping
parseSubflowOutputMapping
(OutputModel output) private Transition
private Transition
parseTransition
(TransitionModel transition) private FlowExecutionExceptionHandler
private FlowExecutionExceptionHandler[]
parseTransitionExecutingExceptionHandlers
(List<TransitionModel> transitionModels) private Transition[]
parseTransitions
(List<TransitionModel> transitionModels) private ViewFactory
parseViewFactory
(String view, String stateId, boolean endState, BinderModel binderModel) private ViewVariable
private ViewVariable[]
parseViewVariables
(List<VarModel> vars) protected void
registerFlowBeans
(ConfigurableBeanFactory beanFactory) Register beans in the bean factory local to the flow definition being built.private void
registerMessageSource
(GenericApplicationContext flowContext, Resource flowResource) protected void
setLocalContext
(LocalFlowBuilderContext localFlowBuilderContext) private Class<?>
private <T> Class<T>
toString()
Methods inherited from class org.springframework.webflow.engine.builder.support.AbstractFlowBuilder
dispose, getContext, getFlow, init
-
Field Details
-
IS_SPRING_FACES_PRESENT
private static final boolean IS_SPRING_FACES_PRESENT -
VALIDATOR_FLOW_ATTR
-
VALIDATION_HINT_RESOLVER_FLOW_ATTR
-
flowModelHolder
-
flowModel
-
localFlowBuilderContext
-
-
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
- Overrides:
createFlow
in classAbstractFlowBuilder
-
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()- Specified by:
hasFlowChanged
in interfaceFlowBuilder
- Overrides:
hasFlowChanged
in classAbstractFlowBuilder
-
getFlowResourceString
- Specified by:
getFlowResourceString
in interfaceFlowBuilder
- Overrides:
getFlowResourceString
in classAbstractFlowBuilder
-
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
-
getLocalContext
-
setLocalContext
-
registerFlowBeans
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)
-
initLocalFlowContext
private void initLocalFlowContext() -
parseContextResources
-
createFlowApplicationContext
-
isFlowInDevelopment
private boolean isFlowInDevelopment() -
registerMessageSource
-
parseFlowMetaAttributes
-
parseFlowVariable
-
parseFlowInputMapper
-
parseFlowInputMapping
-
parseSubflowInputMapper
-
parseSubflowInputMapping
-
parseFlowOutputMapper
-
parseFlowOutputMapping
-
parseSubflowOutputMapper
-
parseSubflowOutputMapping
-
parseAndSetMappingConversionExecutor
private void parseAndSetMappingConversionExecutor(AbstractMappingModel mappingModel, DefaultMapping mapping) -
parseAndSetMappingRequired
-
parseAndAddViewState
-
parseAndAddActionState
-
parseAndAddDecisionState
-
parseAndAddSubflowState
-
parseAndAddEndState
-
parseViewFactory
private ViewFactory parseViewFactory(String view, String stateId, boolean endState, BinderModel binderModel) -
createViewFactory
-
createBinderConfiguration
-
parseViewVariables
-
parseViewVariable
-
parseIfs
-
parseIf
-
parseThen
-
parseElse
-
parseSubflowExpression
-
parseSubflowAttributeMapper
-
parseExceptionHandlers
private FlowExecutionExceptionHandler[] parseExceptionHandlers(List<ExceptionHandlerModel> modelExceptionHandlers, List<TransitionModel> modelTransitions) -
parseTransitionExecutingExceptionHandlers
private FlowExecutionExceptionHandler[] parseTransitionExecutingExceptionHandlers(List<TransitionModel> transitionModels) -
parseTransitionExecutingExceptionHandler
private FlowExecutionExceptionHandler parseTransitionExecutingExceptionHandler(TransitionModel transition) -
parseCustomExceptionHandlers
private FlowExecutionExceptionHandler[] parseCustomExceptionHandlers(List<ExceptionHandlerModel> exceptionHandlerModels) -
parseCustomExceptionHandler
private FlowExecutionExceptionHandler parseCustomExceptionHandler(ExceptionHandlerModel exceptionHandler) -
parseTransitions
-
parseTransition
-
parseActions
-
parseEvaluateAction
-
parseRenderAction
-
parseSetAction
-
parseMetaAttributes
-
parseAndPutMetaAttribute
private void parseAndPutMetaAttribute(AttributeModel attribute, MutableAttributeMap<Object> attributes) -
parseAttributeValueIfNecessary
-
parseAndPutPersistenceContext
private void parseAndPutPersistenceContext(PersistenceContextModel persistenceContext, MutableAttributeMap<Object> attributes) -
parseAndPutSecured
-
fromStringTo
- Throws:
ConversionExecutionException
-
toClass
-
toClass
-
toString
-