OPEN - issue BATCH-385: Merge user attributes in StepContext with ExecutionContext
http://jira.springframework.org/browse/BATCH-385 removed delegate calls to ItemStream in favour of direct registration
This commit is contained in:
@@ -17,11 +17,8 @@
|
||||
package org.springframework.batch.item.reader;
|
||||
|
||||
import org.springframework.batch.io.Skippable;
|
||||
import org.springframework.batch.item.ExecutionContext;
|
||||
import org.springframework.batch.item.ItemReader;
|
||||
import org.springframework.batch.item.ItemStream;
|
||||
import org.springframework.batch.item.KeyedItemReader;
|
||||
import org.springframework.batch.item.exception.StreamException;
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
@@ -32,7 +29,7 @@ import org.springframework.util.Assert;
|
||||
*
|
||||
* @author Dave Syer
|
||||
*/
|
||||
public class DelegatingItemReader extends AbstractItemReader implements Skippable, InitializingBean, ItemStream, KeyedItemReader {
|
||||
public class DelegatingItemReader extends AbstractItemReader implements Skippable, InitializingBean, KeyedItemReader {
|
||||
|
||||
private ItemReader itemReader;
|
||||
|
||||
@@ -49,17 +46,6 @@ public class DelegatingItemReader extends AbstractItemReader implements Skippabl
|
||||
return itemReader.read();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see ItemStream#update(ExecutionContext)
|
||||
* @throws IllegalStateException if the parent template is not itself
|
||||
* {@link ItemStream}.
|
||||
*/
|
||||
public void update(ExecutionContext executionContext) {
|
||||
if (itemReader instanceof ItemStream) {
|
||||
((ItemStream) itemReader).update(executionContext);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for input source.
|
||||
* @param source
|
||||
@@ -81,26 +67,6 @@ public class DelegatingItemReader extends AbstractItemReader implements Skippabl
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.batch.item.ItemStream#open()
|
||||
*/
|
||||
public void open(ExecutionContext executionContext) throws StreamException {
|
||||
if (itemReader instanceof ItemStream) {
|
||||
((ItemStream) itemReader).open(executionContext);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.batch.item.ItemStream#open()
|
||||
*/
|
||||
public void close(ExecutionContext executionContext) throws StreamException {
|
||||
if (itemReader instanceof ItemStream) {
|
||||
((ItemStream) itemReader).close(null);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.batch.item.ItemStream#mark(org.springframework.batch.item.ExecutionContext)
|
||||
|
||||
Reference in New Issue
Block a user