BATCH-1181: Changed <chunk-tasklet/> to <chunk/>

This commit is contained in:
dhgarrette
2009-03-26 13:01:59 +00:00
parent 93b2754b7c
commit 85fa0c7d7a
35 changed files with 117 additions and 116 deletions

View File

@@ -53,7 +53,7 @@ public abstract class AbstractStepParser {
private static final String TASKLET_ELE = "tasklet";
private static final String CHUNK_TASKLET_ELE = "chunk-tasklet";
private static final String CHUNK_ELE = "chunk";
private static final String LISTENERS_ELE = "listeners";
@@ -63,7 +63,7 @@ public abstract class AbstractStepParser {
private static final String JOB_REPO_ATTR = "job-repository";
private static final ChunkTaskletParser chunkTaskletParser = new ChunkTaskletParser();
private static final ChunkElementParser chunkTaskletParser = new ChunkElementParser();
private static final StepListenerParser stepListenerParser = new StepListenerParser();
@@ -109,11 +109,11 @@ public abstract class AbstractStepParser {
String taskletRef = taskletElement.getAttribute(TASKLET_REF_ATTR);
@SuppressWarnings("unchecked")
List<Element> chunkTaskletElements = (List<Element>) DomUtils.getChildElementsByTagName(taskletElement,
CHUNK_TASKLET_ELE);
CHUNK_ELE);
if (StringUtils.hasText(taskletRef)) {
if (chunkTaskletElements.size() > 0) {
parserContext.getReaderContext().error(
"The <" + CHUNK_TASKLET_ELE + "/> element can't be combined with the '" + TASKLET_REF_ATTR
"The <" + CHUNK_ELE + "/> element can't be combined with the '" + TASKLET_REF_ATTR
+ "=\"" + taskletRef + "\"' attribute specification for <"
+ taskletElement.getNodeName() + "/>", taskletElement);
}
@@ -124,12 +124,12 @@ public abstract class AbstractStepParser {
}
else if (chunkTaskletElements.size() > 1) {
parserContext.getReaderContext().error(
"The '<" + CHUNK_TASKLET_ELE + "/>' element may not appear more than once in a single <"
"The '<" + CHUNK_ELE + "/>' element may not appear more than once in a single <"
+ taskletElement.getNodeName() + "/>.", taskletElement);
}
else if (!stepUnderspecified) {
parserContext.getReaderContext().error(
"Step [" + taskletElement.getAttribute(ID_ATTR) + "] has neither a <" + CHUNK_TASKLET_ELE
"Step [" + taskletElement.getAttribute(ID_ATTR) + "] has neither a <" + CHUNK_ELE
+ "/> element nor a '" + TASKLET_REF_ATTR + "' attribute.", taskletElement);
}

View File

@@ -33,12 +33,12 @@ import org.w3c.dom.Element;
import org.w3c.dom.NamedNodeMap;
/**
* Internal parser for the &lt;chunk-tasklet/&gt; element either inside a step.
* Internal parser for the &lt;chunk/&gt; element inside a step.
*
* @author Thomas Risberg
* @since 2.0
*/
public class ChunkTaskletParser {
public class ChunkElementParser {
private static final String ID_ATTR = "id";

View File

@@ -137,7 +137,7 @@ class StepParserStepFactoryBean<I, O> implements FactoryBean, BeanNameAware {
public final Object getObject() throws Exception {
if (hasChunkTaskletElement) {
Assert.isNull(tasklet, "Step [" + name
+ "] has both a <chunk-tasklet/> element and a 'ref' attribute referencing a Tasklet.");
+ "] has both a <chunk/> element and a 'ref' attribute referencing a Tasklet.");
if (isFaultTolerant()) {
FaultTolerantStepFactoryBean<I, O> fb = new FaultTolerantStepFactoryBean<I, O>();
@@ -159,7 +159,7 @@ class StepParserStepFactoryBean<I, O> implements FactoryBean, BeanNameAware {
}
else {
throw new IllegalStateException("Step [" + name
+ "] has neither a <chunk-tasklet/> element nor a 'ref' attribute referencing a Tasklet.");
+ "] has neither a <chunk/> element nor a 'ref' attribute referencing a Tasklet.");
}
}

View File

@@ -184,7 +184,7 @@
<xsd:documentation>
Defines a stage in job processing backed by a
Step. The id attribute must be specified. The
step requires either a chunk-tasklet definition,
step requires either a chunk definition,
a tasklet reference, or a reference to a
(possibly abstract) parent step.
</xsd:documentation>
@@ -265,7 +265,7 @@
<xsd:complexType name="taskletType">
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element name="chunk-tasklet" type="chunkTaskletType" />
<xsd:element name="chunk" type="chunkTaskletType" />
<xsd:element name="transaction-attributes" type="transaction-attributesType" />
<xsd:element name="no-rollback-exception-classes">
<xsd:annotation>