OPEN - issue BATCH-320: Refactor ItemWriter as primary collaborator (with wrapper for processor)

http://jira.springframework.org/browse/BATCH-320

Remove some references to "processor".  Rename some XML files.
This commit is contained in:
dsyer
2008-01-29 09:35:11 +00:00
parent a98f0e566c
commit bc9afc4ce1
11 changed files with 39 additions and 39 deletions

View File

@@ -31,7 +31,7 @@ public interface ItemWriter {
* larger batch operation. Will not be called with null data in normal
* operation.
*
* @throws Exception if there are errors. If the processor is used inside a
* @throws Exception if there are errors. If the writer is used inside a
* retry or a batch the framework will catch the exception and convert or
* rethrow it as appropriate.
*/

View File

@@ -105,9 +105,9 @@ public class CompositeItemWriter implements ItemWriter, Restartable {
Properties stats = new Properties();
int index = 0;
for (Iterator iterator = delegates.listIterator(); iterator.hasNext();) {
Properties processorStats = extractor.extractProperties(iterator.next());
if (processorStats != null) {
for (Iterator iterator2 = processorStats.entrySet().iterator(); iterator2.hasNext();) {
Properties writerStats = extractor.extractProperties(iterator.next());
if (writerStats != null) {
for (Iterator iterator2 = writerStats.entrySet().iterator(); iterator2.hasNext();) {
Map.Entry entry = (Map.Entry) iterator2.next();
stats.setProperty("" + index + SEPARATOR + entry.getKey(), (String) entry.getValue());
}

View File

@@ -42,7 +42,7 @@ public class ItemReaderRepeatCallback implements RepeatCallback {
}
/**
* Default processor is null, in which case we do nothing - subclasses can
* Default writer is null, in which case we do nothing - subclasses can
* extend this behaviour, but must be careful to actually exhaust the
* provider by calling next().
* @param provider

View File

@@ -4,7 +4,7 @@ import java.util.List;
import org.springframework.batch.io.sample.domain.Foo;
import org.springframework.batch.io.sample.domain.FooService;
import org.springframework.batch.item.writer.ItemWriterAdapter;
import org.springframework.batch.item.ItemWriter;
import org.springframework.test.AbstractDependencyInjectionSpringContextTests;
/**
@@ -14,13 +14,13 @@ import org.springframework.test.AbstractDependencyInjectionSpringContextTests;
*/
public class ItemWriterAdapterIntegrationTests extends AbstractDependencyInjectionSpringContextTests {
private ItemWriterAdapter processor;
private ItemWriter processor;
private FooService fooService;
protected String getConfigPath() {
return "delegating-item-processor.xml";
return "delegating-item-writer.xml";
}
/**
@@ -45,7 +45,7 @@ public class ItemWriterAdapterIntegrationTests extends AbstractDependencyInjecti
}
//setter for auto-injection
public void setProcessor(ItemWriterAdapter processor) {
public void setProcessor(ItemWriter processor) {
this.processor = processor;
}

View File

@@ -20,7 +20,7 @@ public class PropertyExtractingDelegatingItemProccessorIntegrationTests
private FooService fooService;
protected String getConfigPath() {
return "pe-delegating-item-processor.xml";
return "pe-delegating-item-writer.xml";
}
/**