RESOLVED - BATCH-895: Fix XML schema so that only top-level elements are allowed at top level (i.e. job).
inlined definitions of child-only elements
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xsd:schema xmlns="http://www.springframework.org/schema/batch" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:beans="http://www.springframework.org/schema/beans" xmlns:tool="http://www.springframework.org/schema/tool"
|
||||
targetNamespace="http://www.springframework.org/schema/batch" elementFormDefault="qualified" attributeFormDefault="unqualified"
|
||||
<xsd:schema xmlns="http://www.springframework.org/schema/batch"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:beans="http://www.springframework.org/schema/beans"
|
||||
xmlns:tool="http://www.springframework.org/schema/tool"
|
||||
targetNamespace="http://www.springframework.org/schema/batch"
|
||||
elementFormDefault="qualified" attributeFormDefault="unqualified"
|
||||
version="2.0">
|
||||
|
||||
<xsd:import namespace="http://www.springframework.org/schema/beans" />
|
||||
@@ -19,16 +21,19 @@
|
||||
Defines a job composed of a set of steps and
|
||||
transitions between steps. The job will be exposed
|
||||
in
|
||||
the enclosing bean factory as a component of type Job
|
||||
the enclosing
|
||||
bean factory as a component of type Job
|
||||
that can be
|
||||
launched using a JobLauncher.
|
||||
launched using a
|
||||
JobLauncher.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType>
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="flowType">
|
||||
<xsd:attribute name="id" type="xsd:ID" use="required" />
|
||||
<xsd:attribute name="repository" type="xsd:string" use="optional">
|
||||
<xsd:attribute name="repository" type="xsd:string"
|
||||
use="optional">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
A reference to a JobRepository bean definition. Defaults to "jobRepository".
|
||||
@@ -41,143 +46,7 @@
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
|
||||
<xsd:element name="step">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
Defines a stage in job processing backed by a Step. The name
|
||||
attribute has to match the id of a
|
||||
bean definition for
|
||||
a Step. The
|
||||
next attribute is a synonym for <next on="*" .../>
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType>
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="transitionWithNextType">
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" >
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>The step name is a reference to another bean definition where business logic is specified.</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
|
||||
<xsd:element name="next">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
Defines a step transition from this step to the next one depending on the value of the exit status.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="on" type="xsd:string" use="required" >
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>A pattern to match against the exit status code. Use * and ? as wildcard characters. When a step finishes the most
|
||||
specific match will be chosen to select the next step. Hint: always include a default transition with on="*".</xsd:documentation>
|
||||
</xsd:annotation></xsd:attribute>
|
||||
<xsd:attribute name="to" type="xsd:string" use="required" >
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>The name of the step to go to next. Must resolve to one of the other steps in this job.</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
|
||||
<xsd:element name="stop">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
Declares job should be stop at this point and provides pointer where execution should continue.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="on" type="xsd:string" use="required" >
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>A pattern to match against the exit status code. Use * and ? as wildcard characters. When a step finishes the most
|
||||
specific match will be chosen to select the next step. Hint: always include a default transition with on="*".</xsd:documentation>
|
||||
</xsd:annotation></xsd:attribute>
|
||||
<xsd:attribute name="to" type="xsd:string" use="required" >
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>The name of the step to go to next.
|
||||
Must resolve to one of the other steps in this job.</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
|
||||
<xsd:element name="end">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
Declares job should be stop at this point and provides optional pointer where execution should continue.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="on" type="xsd:string" use="required" >
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>A pattern to match against the exit status code. Use * and ? as wildcard characters. When a step finishes the most
|
||||
specific match will be chosen to select the next step. Hint: always include a default transition with on="*".</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="status" use="optional" default="COMPLETED">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>The BatchStatus value to end on, defaults to COMPLETED.</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:enumeration value="COMPLETED"></xsd:enumeration>
|
||||
<xsd:enumeration value="FAILED"></xsd:enumeration>
|
||||
<xsd:enumeration value="STOPPED"></xsd:enumeration>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:attribute>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
|
||||
<xsd:element name="decision">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
Declares job should query a decider to determine where execution should go next.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType>
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="transitionType">
|
||||
<xsd:attribute name="id" type="xsd:ID" use="required" />
|
||||
<xsd:attribute name="decider" type="xsd:string" use="required" >
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
The decider is a reference to a JobExecutionDecider that can produce a status to base the next transition on.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
|
||||
<xsd:element name="split">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
Declares job should split here into two or more subflows.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType>
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="transitionWithNextType">
|
||||
<xsd:sequence minOccurs="2" maxOccurs="unbounded" >
|
||||
<xsd:element name="flow" type="flowType">
|
||||
<xsd:annotation><xsd:documentation>
|
||||
A subflow within a job, having the same format as a job, but without a separate identity.
|
||||
</xsd:documentation></xsd:annotation>
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="id" type="xsd:ID" use="required" />
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
|
||||
<xsd:element name="job-repository">
|
||||
<xsd:element name="job-repository">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
Configures a SimplJobRepository using a JobRepositoryFactoryBean.
|
||||
@@ -186,7 +55,8 @@ The decider is a reference to a JobExecutionDecider that can produce a status to
|
||||
<xsd:complexType>
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="beans:identifiedType">
|
||||
<xsd:attribute name="data-source" type="xsd:string" default="dataSource">
|
||||
<xsd:attribute name="data-source" type="xsd:string"
|
||||
default="dataSource">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation source="java:javax.sql.DataSource"><![CDATA[
|
||||
The bean name of the DataSource that is to be used. This attribute
|
||||
@@ -195,26 +65,30 @@ The decider is a reference to a JobExecutionDecider that can produce a status to
|
||||
]]></xsd:documentation>
|
||||
<xsd:appinfo>
|
||||
<tool:annotation kind="ref">
|
||||
<tool:expected-type type="javax.sql.DataSource"/>
|
||||
<tool:expected-type type="javax.sql.DataSource" />
|
||||
</tool:annotation>
|
||||
</xsd:appinfo>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="transaction-manager" type="xsd:string" default="transactionManager">
|
||||
<xsd:attribute name="transaction-manager" type="xsd:string"
|
||||
default="transactionManager">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation source="java:org.springframework.transaction.PlatformTransactionManager"><![CDATA[
|
||||
<xsd:documentation
|
||||
source="java:org.springframework.transaction.PlatformTransactionManager"><![CDATA[
|
||||
The bean name of the TransactionManager that is to be used. This attribute
|
||||
is not required, and only needs to be specified explicitly
|
||||
if the bean name of the desired TransactionManager is not 'transactionManager'.
|
||||
]]></xsd:documentation>
|
||||
<xsd:appinfo>
|
||||
<tool:annotation kind="ref">
|
||||
<tool:expected-type type="org.springframework.transaction.PlatformTransactionManager"/>
|
||||
<tool:expected-type
|
||||
type="org.springframework.transaction.PlatformTransactionManager" />
|
||||
</tool:annotation>
|
||||
</xsd:appinfo>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="isolation-level-for-create" type="xsd:string">
|
||||
<xsd:attribute name="isolation-level-for-create"
|
||||
type="xsd:string">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
The isolation level to use for creation of job execution entities.
|
||||
@@ -239,10 +113,76 @@ The decider is a reference to a JobExecutionDecider that can produce a status to
|
||||
|
||||
<xsd:complexType name="flowType">
|
||||
<xsd:sequence>
|
||||
<xsd:choice minOccurs="1" maxOccurs="unbounded" >
|
||||
<xsd:element ref="step" />
|
||||
<xsd:element ref="split" />
|
||||
<xsd:element ref="decision" />
|
||||
<xsd:choice minOccurs="1" maxOccurs="unbounded">
|
||||
<xsd:element name="step">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
Defines a stage in job processing backed by a
|
||||
Step. The name
|
||||
attribute has to match the id of a
|
||||
bean definition
|
||||
for
|
||||
a Step. The
|
||||
next attribute is a synonym for <next on="*" .../>
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType>
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="transitionWithNextType">
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" >
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
The step name is a reference to another bean definition where business logic is specified.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="split">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
Declares job should split here into two or more subflows.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType>
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="transitionWithNextType">
|
||||
<xsd:sequence minOccurs="2" maxOccurs="unbounded" >
|
||||
<xsd:element name="flow" type="flowType">
|
||||
<xsd:annotation><xsd:documentation>
|
||||
A subflow within a job, having the same format as a job, but without a separate identity.
|
||||
</xsd:documentation></xsd:annotation>
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="id" type="xsd:ID" use="required" />
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="decision">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
Declares job should query a decider to determine where execution should go next.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType>
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="transitionType">
|
||||
<xsd:attribute name="id" type="xsd:ID" use="required" />
|
||||
<xsd:attribute name="decider" type="xsd:string" use="required" >
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
The decider is a reference to a JobExecutionDecider that can produce a status to base
|
||||
the next transition on.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
@@ -253,8 +193,8 @@ The decider is a reference to a JobExecutionDecider that can produce a status to
|
||||
<xsd:attribute name="next" type="xsd:string" use="optional" >
|
||||
<xsd:annotation>
|
||||
<xsd:documentation><![CDATA[
|
||||
A shortcut for specifying the next step to execute after this one, if there is only one choice.
|
||||
If this attribute is specified, then there should be no other transition with a nested <next on="*" .../>]]>
|
||||
A shortcut for specifying the next step to execute after this one, if there is only one choice.
|
||||
If this attribute is specified, then there should be no other transition with a nested <next on="*" .../>]]>
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
@@ -265,9 +205,81 @@ The decider is a reference to a JobExecutionDecider that can produce a status to
|
||||
<xsd:complexType name="transitionType">
|
||||
<xsd:sequence>
|
||||
<xsd:choice minOccurs="0" maxOccurs="unbounded" >
|
||||
<xsd:element ref="next"/>
|
||||
<xsd:element ref="stop"/>
|
||||
<xsd:element ref="end"/>
|
||||
<xsd:element name="next">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
Defines a step transition from this step to the
|
||||
next one depending on the value of the exit status.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="on" type="xsd:string" use="required">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>A pattern to match against the exit status
|
||||
code. Use * and ? as wildcard characters. When a step finishes the
|
||||
most
|
||||
specific match will be chosen to select the next step. Hint:
|
||||
always
|
||||
include a default transition with on="*".</xsd:documentation>
|
||||
</xsd:annotation></xsd:attribute>
|
||||
<xsd:attribute name="to" type="xsd:string" use="required" >
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
The name of the step to go to next. Must resolve to one of the other steps in this job.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="stop">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
Declares job should be stop at this point and provides pointer where execution should continue.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="on" type="xsd:string" use="required" >
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>A pattern to match against the exit status code. Use * and ? as wildcard characters.
|
||||
When a step finishes the most specific match will be chosen to select the next step.
|
||||
Hint: always include a default transition with on="*".</xsd:documentation>
|
||||
</xsd:annotation></xsd:attribute>
|
||||
<xsd:attribute name="to" type="xsd:string" use="required" >
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>The name of the step to go to next.
|
||||
Must resolve to one of the other steps in this job.</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="end">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
Declares job should be stop at this point and provides optional pointer where execution should continue.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="on" type="xsd:string" use="required" >
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>A pattern to match against the exit status code. Use * and ? as wildcard characters.
|
||||
When a step finishes the most specific match will be chosen to select the next step.
|
||||
Hint: always include a default transition with on="*".</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="status" use="optional" default="COMPLETED">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>The BatchStatus value to end on, defaults to COMPLETED.</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:simpleType>
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:enumeration value="COMPLETED"></xsd:enumeration>
|
||||
<xsd:enumeration value="FAILED"></xsd:enumeration>
|
||||
<xsd:enumeration value="STOPPED"></xsd:enumeration>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
</xsd:attribute>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
Reference in New Issue
Block a user