Class FlowParser
- java.lang.Object
- org.springframework.beans.factory.xml.AbstractBeanDefinitionParser
- org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser
- org.springframework.batch.core.configuration.xml.AbstractFlowParser
- org.springframework.batch.core.jsr.configuration.xml.FlowParser
- All Implemented Interfaces:
org.springframework.beans.factory.xml.BeanDefinitionParser
public class FlowParser extends AbstractFlowParser
Parses flows as defined in JSR-352. The current state parses a flow as it is within a regular Spring Batch job/flow.- Since:
- 3.0
- Author:
- Michael Minella, Chris Schaefer
Field Summary
Fields inherited from class org.springframework.batch.core.configuration.xml.AbstractFlowParser
DECISION_ELE, END_ELE, endCounter, EXIT_CODE_ATTR, FAIL_ELE, FLOW_ELE, ID_ATTR, NEXT_ATTR, NEXT_ELE, ON_ATTR, RESTART_ATTR, SPLIT_ELE, STEP_ELE, STOP_ELE, TO_ATTR
Constructor Summary
Constructors Constructor Description FlowParser(java.lang.String flowName, java.lang.String jobFactoryRef)
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static java.util.Collection<org.springframework.beans.factory.config.BeanDefinition>
createTransition(FlowExecutionStatus status, java.lang.String on, java.lang.String next, java.lang.String restart, java.lang.String exitCode, org.springframework.beans.factory.config.BeanDefinition stateDef, org.springframework.beans.factory.xml.ParserContext parserContext, boolean abandon)
protected void
doParse(org.w3c.dom.Element element, org.springframework.beans.factory.xml.ParserContext parserContext, org.springframework.beans.factory.support.BeanDefinitionBuilder builder)
protected java.lang.Class<?>
getBeanClass(org.w3c.dom.Element element)
static java.util.Collection<org.springframework.beans.factory.config.BeanDefinition>
getNextElements(org.springframework.beans.factory.xml.ParserContext parserContext, java.lang.String stepId, org.springframework.beans.factory.config.BeanDefinition stateDef, org.w3c.dom.Element element)
static java.util.Collection<org.springframework.beans.factory.config.BeanDefinition>
getNextElements(org.springframework.beans.factory.xml.ParserContext parserContext, org.springframework.beans.factory.config.BeanDefinition stateDef, org.w3c.dom.Element element)
protected static java.util.Collection<org.springframework.beans.factory.config.BeanDefinition>
parseTransitionElement(org.w3c.dom.Element transitionElement, java.lang.String stateId, org.springframework.beans.factory.config.BeanDefinition stateDef, org.springframework.beans.factory.xml.ParserContext parserContext)
Methods inherited from class org.springframework.batch.core.configuration.xml.AbstractFlowParser
createTransition, findAllReachableElements, getBatchStatusFromEndTransitionName, getStateTransitionReference, setJobFactoryRef, verifyUniquePattern
Methods inherited from class org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser
doParse, getBeanClassName, getParentName, parseInternal
Method Detail
getBeanClass
protected java.lang.Class<?> getBeanClass(org.w3c.dom.Element element)
- Overrides:
getBeanClass
in classAbstractFlowParser
doParse
protected void doParse(org.w3c.dom.Element element, org.springframework.beans.factory.xml.ParserContext parserContext, org.springframework.beans.factory.support.BeanDefinitionBuilder builder)
- Overrides:
doParse
in classAbstractFlowParser
- Parameters:
element
- the top level element containing a flow definitionparserContext
- theParserContext
getNextElements
public static java.util.Collection<org.springframework.beans.factory.config.BeanDefinition> getNextElements(org.springframework.beans.factory.xml.ParserContext parserContext, org.springframework.beans.factory.config.BeanDefinition stateDef, org.w3c.dom.Element element)
getNextElements
public static java.util.Collection<org.springframework.beans.factory.config.BeanDefinition> getNextElements(org.springframework.beans.factory.xml.ParserContext parserContext, java.lang.String stepId, org.springframework.beans.factory.config.BeanDefinition stateDef, org.w3c.dom.Element element)
parseTransitionElement
protected static java.util.Collection<org.springframework.beans.factory.config.BeanDefinition> parseTransitionElement(org.w3c.dom.Element transitionElement, java.lang.String stateId, org.springframework.beans.factory.config.BeanDefinition stateDef, org.springframework.beans.factory.xml.ParserContext parserContext)
createTransition
protected static java.util.Collection<org.springframework.beans.factory.config.BeanDefinition> createTransition(FlowExecutionStatus status, java.lang.String on, java.lang.String next, java.lang.String restart, java.lang.String exitCode, org.springframework.beans.factory.config.BeanDefinition stateDef, org.springframework.beans.factory.xml.ParserContext parserContext, boolean abandon)
- Parameters:
status
- The batch status that this transition will set. Use BatchStatus.UNKNOWN if not applicable.on
- The pattern that this transition should match. Use null for "no restriction" (same as "*").next
- The state to which this transition should go. Use null if not applicable.restart
- The restart attribute this transition will set.exitCode
- The exit code that this transition will set. Use null to default to batchStatus.stateDef
- The bean definition for the current stateparserContext
- the parser context for the bean factoryabandon
- the abandon state this transition will set.- Returns:
- a collection of
StateTransition
references