public abstract class AbstractFlowParser
extends org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
DECISION_ELE |
protected static java.lang.String |
END_ELE |
protected static int |
endCounter |
protected static java.lang.String |
EXIT_CODE_ATTR |
protected static java.lang.String |
FAIL_ELE |
protected static java.lang.String |
FLOW_ELE |
protected static java.lang.String |
ID_ATTR |
protected static java.lang.String |
NEXT_ATTR |
protected static java.lang.String |
NEXT_ELE |
protected static java.lang.String |
ON_ATTR |
protected static java.lang.String |
RESTART_ATTR |
protected static java.lang.String |
SPLIT_ELE |
protected static java.lang.String |
STEP_ELE |
protected static java.lang.String |
STOP_ELE |
protected static java.lang.String |
TO_ATTR |
Constructor and Description |
---|
AbstractFlowParser() |
Modifier and Type | Method and 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 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 void |
findAllReachableElements(java.lang.String startElement,
java.util.Map<java.lang.String,java.util.Set<java.lang.String>> reachableElementMap,
java.util.Set<java.lang.String> accumulator)
Find all of the elements reachable from the startElement.
|
protected static FlowExecutionStatus |
getBatchStatusFromEndTransitionName(java.lang.String elementName) |
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,
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,
java.lang.String stepId,
org.springframework.beans.factory.config.BeanDefinition stateDef,
org.w3c.dom.Element element) |
static org.springframework.beans.factory.config.BeanDefinition |
getStateTransitionReference(org.springframework.beans.factory.xml.ParserContext parserContext,
org.springframework.beans.factory.config.BeanDefinition stateDefinition,
java.lang.String on,
java.lang.String next) |
protected void |
setJobFactoryRef(java.lang.String jobFactoryRef)
Convenience method for subclasses to set the job factory reference if it
is available (null is fine, but the quality of error reports is better if
it is available).
|
protected static void |
verifyUniquePattern(org.w3c.dom.Element transitionElement,
java.util.List<java.lang.String> patterns,
org.w3c.dom.Element element,
org.springframework.beans.factory.xml.ParserContext parserContext) |
doParse, getBeanClassName, getParentName, parseInternal
protected static final java.lang.String ID_ATTR
protected static final java.lang.String STEP_ELE
protected static final java.lang.String FLOW_ELE
protected static final java.lang.String DECISION_ELE
protected static final java.lang.String SPLIT_ELE
protected static final java.lang.String NEXT_ATTR
protected static final java.lang.String NEXT_ELE
protected static final java.lang.String END_ELE
protected static final java.lang.String FAIL_ELE
protected static final java.lang.String STOP_ELE
protected static final java.lang.String ON_ATTR
protected static final java.lang.String TO_ATTR
protected static final java.lang.String RESTART_ATTR
protected static final java.lang.String EXIT_CODE_ATTR
protected static int endCounter
protected void setJobFactoryRef(java.lang.String jobFactoryRef)
jobFactoryRef
- protected java.lang.Class<?> getBeanClass(org.w3c.dom.Element element)
getBeanClass
in class org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser
protected void doParse(org.w3c.dom.Element element, org.springframework.beans.factory.xml.ParserContext parserContext, org.springframework.beans.factory.support.BeanDefinitionBuilder builder)
doParse
in class org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser
element
- the top level element containing a flow definitionparserContext
- the ParserContext
protected void findAllReachableElements(java.lang.String startElement, java.util.Map<java.lang.String,java.util.Set<java.lang.String>> reachableElementMap, java.util.Set<java.lang.String> accumulator)
startElement
- reachableElementMap
- accumulator
- a collection of reachable element namespublic 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)
parserContext
- the parser context for the bean factorystateDef
- The bean definition for the current stateelement
- the <step/gt; element to parseStateTransition
referencespublic 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)
parserContext
- the parser context for the bean factorystepId
- the id of the current state if it is a step state, null
otherwisestateDef
- The bean definition for the current stateelement
- the <step/gt; element to parseStateTransition
referencesprotected static void verifyUniquePattern(org.w3c.dom.Element transitionElement, java.util.List<java.lang.String> patterns, org.w3c.dom.Element element, org.springframework.beans.factory.xml.ParserContext parserContext)
transitionElement
- The element to parsepatterns
- a list of patterns on state transitions for this elementelement
- parserContext
- the parser context for the bean factoryprotected static java.util.Collection<org.springframework.beans.factory.config.BeanDefinition> createTransition(FlowExecutionStatus status, java.lang.String on, java.lang.String next, java.lang.String exitCode, org.springframework.beans.factory.config.BeanDefinition stateDef, org.springframework.beans.factory.xml.ParserContext parserContext, boolean abandon)
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.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 factoryStateTransition
referencesprotected static FlowExecutionStatus getBatchStatusFromEndTransitionName(java.lang.String elementName)
elementName
- An end transition element namepublic static org.springframework.beans.factory.config.BeanDefinition getStateTransitionReference(org.springframework.beans.factory.xml.ParserContext parserContext, org.springframework.beans.factory.config.BeanDefinition stateDefinition, java.lang.String on, java.lang.String next)
parserContext
- the parser contextstateDefinition
- a reference to the state implementationon
- the pattern valuenext
- the next step idStateTransition