Class SimpleFlowFactoryBean
java.lang.Object
org.springframework.batch.core.configuration.xml.SimpleFlowFactoryBean
- All Implemented Interfaces:
org.springframework.beans.factory.FactoryBean<SimpleFlow>
,org.springframework.beans.factory.InitializingBean
public class SimpleFlowFactoryBean
extends Object
implements org.springframework.beans.factory.FactoryBean<SimpleFlow>, org.springframework.beans.factory.InitializingBean
Convenience factory for
SimpleFlow
instances for use in the XML namespace. It
replaces the states in the input with proxies that have a unique name formed from the
flow name and the original state name (unless the name is already in that form -- in
that case, it is not modified).- Author:
- Dave Syer, Michael Minella
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
A State that proxies a delegate and changes its name but leaves its behavior unchanged. -
Field Summary
Fields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Check mandatory properties (name).protected State
createNewStepState
(State state, String oldName, String stateName) Provides an extension point to provide alternativeStepState
implementations within aSimpleFlow
.Class<?>
boolean
void
setFlowType
(Class<SimpleFlow> flowType) void
The name of the flow that is created by this factory.void
setStateTransitionComparator
(Comparator<StateTransition> stateTransitionComparator) void
setStateTransitions
(List<StateTransition> stateTransitions) The raw state transitions for the flow.
-
Constructor Details
-
SimpleFlowFactoryBean
public SimpleFlowFactoryBean()
-
-
Method Details
-
setStateTransitionComparator
- Parameters:
stateTransitionComparator
-Comparator
implementation that addresses the ordering of state evaluation.
-
setFlowType
- Parameters:
flowType
- Used to inject the type of flow (regular Spring Batch or JSR-352).
-
setName
The name of the flow that is created by this factory.- Parameters:
name
- the value of the name
-
setStateTransitions
The raw state transitions for the flow. They are transformed into proxies that have the same behavior but unique names prefixed with the flow name.- Parameters:
stateTransitions
- the list of transitions
-
afterPropertiesSet
Check mandatory properties (name).- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
- Throws:
Exception
- thrown if error occurs.
-
getObject
- Specified by:
getObject
in interfaceorg.springframework.beans.factory.FactoryBean<SimpleFlow>
- Throws:
Exception
-
createNewStepState
Provides an extension point to provide alternativeStepState
implementations within aSimpleFlow
.- Parameters:
state
- The state that is used to create theStepState
.oldName
- The name to be replaced.stateName
- The name for the new State.- Returns:
- a state for the requested data.
-
getObjectType
- Specified by:
getObjectType
in interfaceorg.springframework.beans.factory.FactoryBean<SimpleFlow>
-
isSingleton
public boolean isSingleton()- Specified by:
isSingleton
in interfaceorg.springframework.beans.factory.FactoryBean<SimpleFlow>
-