Review process. Consolidated some related support packages in infrastructure.

This commit is contained in:
dsyer
2008-03-14 10:30:18 +00:00
parent fe79a4dbe0
commit 044bc4e192
45 changed files with 58 additions and 69 deletions

View File

@@ -28,8 +28,8 @@ import org.springframework.batch.core.listener.CompositeItemReadListener;
import org.springframework.batch.core.listener.CompositeItemWriteListener;
import org.springframework.batch.item.ItemReader;
import org.springframework.batch.item.ItemWriter;
import org.springframework.batch.item.reader.DelegatingItemReader;
import org.springframework.batch.item.writer.DelegatingItemWriter;
import org.springframework.batch.item.support.DelegatingItemReader;
import org.springframework.batch.item.support.DelegatingItemWriter;
import org.springframework.batch.repeat.RepeatContext;
import org.springframework.batch.repeat.RepeatOperations;
import org.springframework.batch.repeat.listener.RepeatListenerSupport;

View File

@@ -31,7 +31,7 @@ import org.springframework.batch.core.tasklet.Tasklet;
import org.springframework.batch.item.ItemReader;
import org.springframework.batch.item.ItemStream;
import org.springframework.batch.item.ItemWriter;
import org.springframework.batch.item.stream.CompositeItemStream;
import org.springframework.batch.item.support.CompositeItemStream;
import org.springframework.batch.repeat.ExitStatus;
import org.springframework.batch.repeat.RepeatCallback;
import org.springframework.batch.repeat.RepeatContext;

View File

@@ -49,7 +49,7 @@ import org.springframework.batch.item.ItemWriter;
import org.springframework.batch.item.MarkFailedException;
import org.springframework.batch.item.ResetFailedException;
import org.springframework.batch.item.ItemStreamException;
import org.springframework.batch.item.reader.ListItemReader;
import org.springframework.batch.item.support.ListItemReader;
import org.springframework.batch.repeat.ExitStatus;
import org.springframework.batch.repeat.RepeatContext;
import org.springframework.batch.repeat.policy.SimpleCompletionPolicy;

View File

@@ -28,7 +28,7 @@ import org.springframework.batch.core.StepExecution;
import org.springframework.batch.core.job.JobSupport;
import org.springframework.batch.core.launch.EmptyItemWriter;
import org.springframework.batch.core.step.RepeatOperationsStepFactoryBean;
import org.springframework.batch.item.reader.ListItemReader;
import org.springframework.batch.item.support.ListItemReader;
import org.springframework.batch.repeat.ExitStatus;
import org.springframework.batch.repeat.RepeatCallback;
import org.springframework.batch.repeat.RepeatOperations;

View File

@@ -37,7 +37,7 @@ import org.springframework.batch.core.repository.support.dao.MapStepExecutionDao
import org.springframework.batch.item.AbstractItemWriter;
import org.springframework.batch.item.ItemReader;
import org.springframework.batch.item.ItemWriter;
import org.springframework.batch.item.reader.ListItemReader;
import org.springframework.batch.item.support.ListItemReader;
import org.springframework.batch.repeat.RepeatContext;
import org.springframework.batch.repeat.exception.ExceptionHandler;
import org.springframework.batch.repeat.support.RepeatTemplate;

View File

@@ -38,7 +38,7 @@ import org.springframework.batch.item.AbstractItemWriter;
import org.springframework.batch.item.ItemReader;
import org.springframework.batch.item.ItemRecoverer;
import org.springframework.batch.item.ItemWriter;
import org.springframework.batch.item.reader.ListItemReader;
import org.springframework.batch.item.support.ListItemReader;
import org.springframework.batch.support.transaction.ResourcelessTransactionManager;
import org.springframework.batch.support.transaction.TransactionAwareProxyFactory;
import org.springframework.transaction.support.TransactionSynchronizationManager;

View File

@@ -30,7 +30,7 @@
</bean>
<bean id="itemReader"
class="org.springframework.batch.item.reader.ListItemReader">
class="org.springframework.batch.item.support.ListItemReader">
<constructor-arg value="foo,bar,spam" />
</bean>

View File

@@ -18,7 +18,7 @@
class="org.springframework.batch.core.step.SimpleStepFactoryBean">
<property name="itemReader">
<bean
class="org.springframework.batch.item.reader.ListItemReader">
class="org.springframework.batch.item.support.ListItemReader">
<constructor-arg value="foo,bar,spam" />
</bean>
</property>

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.batch.item.reader;
package org.springframework.batch.item.jms;
import javax.jms.Destination;
import javax.jms.JMSException;

View File

@@ -1,7 +0,0 @@
<html>
<body>
<p>
Infrastructure implementations of item provider concerns.
</p>
</body>
</html>

View File

@@ -1,7 +0,0 @@
<html>
<body>
<p>
Generic implementations of ItemStream
</p>
</body>
</html>

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.batch.item.reader;
package org.springframework.batch.item.support;
import java.util.ArrayList;
import java.util.Collection;

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.batch.item.stream;
package org.springframework.batch.item.support;
import java.util.ArrayList;
import java.util.Arrays;

View File

@@ -1,4 +1,4 @@
package org.springframework.batch.item.writer;
package org.springframework.batch.item.support;
import java.util.Iterator;
import java.util.List;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.batch.item.reader;
package org.springframework.batch.item.support;
import org.springframework.batch.item.AbstractItemReader;
import org.springframework.batch.item.ItemReader;

View File

@@ -1,4 +1,4 @@
package org.springframework.batch.item.writer;
package org.springframework.batch.item.support;
import org.springframework.batch.item.ClearFailedException;
import org.springframework.batch.item.FlushFailedException;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.batch.item.reader;
package org.springframework.batch.item.support;
import java.util.ArrayList;
import java.util.List;

View File

@@ -1,7 +1,7 @@
package org.springframework.batch.item.transform;
import org.springframework.batch.item.ItemWriter;
import org.springframework.batch.item.writer.DelegatingItemWriter;
import org.springframework.batch.item.support.DelegatingItemWriter;
import org.springframework.util.Assert;
/**

View File

@@ -1,4 +1,4 @@
package org.springframework.batch.item.support;
package org.springframework.batch.item.util;
import java.io.File;
import java.io.IOException;

View File

@@ -15,7 +15,7 @@
*/
package org.springframework.batch.item.validator;
import org.springframework.batch.item.reader.DelegatingItemReader;
import org.springframework.batch.item.support.DelegatingItemReader;
import org.springframework.util.Assert;
/**

View File

@@ -1,7 +0,0 @@
<html>
<body>
<p>
Specific implementations of item processing concerns.
</p>
</body>
</html>

View File

@@ -21,7 +21,7 @@ import org.springframework.batch.item.ExecutionContextUserSupport;
import org.springframework.batch.item.FlushFailedException;
import org.springframework.batch.item.ItemStream;
import org.springframework.batch.item.ItemWriter;
import org.springframework.batch.item.support.FileUtils;
import org.springframework.batch.item.util.FileUtils;
import org.springframework.batch.item.xml.stax.NoStartEndDocumentStreamWriter;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.core.io.Resource;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.batch.item.reader;
package org.springframework.batch.item.jms;
import java.util.Date;
@@ -25,6 +25,7 @@ import javax.jms.Queue;
import junit.framework.TestCase;
import org.easymock.MockControl;
import org.springframework.batch.item.jms.JmsItemReader;
import org.springframework.jms.core.JmsOperations;
public class JmsItemReaderTests extends TestCase {

View File

@@ -1,4 +1,4 @@
package org.springframework.batch.item.reader;
package org.springframework.batch.item.support;
import java.util.Collection;
import java.util.Iterator;
@@ -7,6 +7,7 @@ import junit.framework.TestCase;
import org.easymock.MockControl;
import org.springframework.batch.item.ItemReader;
import org.springframework.batch.item.support.AggregateItemReader;
public class AggregateItemReaderTests extends TestCase {

View File

@@ -1,4 +1,4 @@
package org.springframework.batch.item.writer;
package org.springframework.batch.item.support;
import java.util.ArrayList;
import java.util.Iterator;
@@ -8,6 +8,7 @@ import junit.framework.TestCase;
import org.easymock.MockControl;
import org.springframework.batch.item.ItemWriter;
import org.springframework.batch.item.support.CompositeItemWriter;
/**
* Tests for {@link CompositeItemWriter}

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.batch.item.reader;
package org.springframework.batch.item.support;
import junit.framework.TestCase;
@@ -23,6 +23,7 @@ import org.springframework.batch.item.ExecutionContext;
import org.springframework.batch.item.ItemReader;
import org.springframework.batch.item.ItemStream;
import org.springframework.batch.item.Skippable;
import org.springframework.batch.item.support.DelegatingItemReader;
/**
* Unit test for {@link DelegatingItemReader}

View File

@@ -13,12 +13,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.batch.item.writer;
package org.springframework.batch.item.support;
import junit.framework.TestCase;
import org.easymock.MockControl;
import org.springframework.batch.item.ItemWriter;
import org.springframework.batch.item.support.DelegatingItemWriter;
/**
* @author Lucas Ward

View File

@@ -14,12 +14,14 @@
* limitations under the License.
*/
package org.springframework.batch.item.reader;
package org.springframework.batch.item.support;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import org.springframework.batch.item.support.ListItemReader;
import junit.framework.TestCase;
public class ListItemReaderTests extends TestCase {

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.batch.item.stream;
package org.springframework.batch.item.support;
import java.util.ArrayList;
import java.util.List;
@@ -24,6 +24,7 @@ import org.springframework.batch.item.ExecutionContext;
import org.springframework.batch.item.ItemStream;
import org.springframework.batch.item.ItemStreamException;
import org.springframework.batch.item.ItemStreamSupport;
import org.springframework.batch.item.support.CompositeItemStream;
/**
* @author Dave Syer
@@ -37,7 +38,7 @@ public class SimpleStreamManagerTests extends TestCase {
/**
* Test method for
* {@link org.springframework.batch.item.stream.CompositeItemStream#commit(org.springframework.transaction.TransactionStatus)}.
* {@link org.springframework.batch.item.support.CompositeItemStream#commit(org.springframework.transaction.TransactionStatus)}.
*/
public void testRegisterAndOpen() {
ItemStreamSupport stream = new ItemStreamSupport() {
@@ -52,7 +53,7 @@ public class SimpleStreamManagerTests extends TestCase {
/**
* Test method for
* {@link org.springframework.batch.item.stream.CompositeItemStream#commit(org.springframework.transaction.TransactionStatus)}.
* {@link org.springframework.batch.item.support.CompositeItemStream#commit(org.springframework.transaction.TransactionStatus)}.
*/
public void testRegisterTwice() {
ItemStreamSupport stream = new ItemStreamSupport() {
@@ -68,7 +69,7 @@ public class SimpleStreamManagerTests extends TestCase {
/**
* Test method for
* {@link org.springframework.batch.item.stream.CompositeItemStream#commit(org.springframework.transaction.TransactionStatus)}.
* {@link org.springframework.batch.item.support.CompositeItemStream#commit(org.springframework.transaction.TransactionStatus)}.
*/
public void testMark() {
manager.register(new ItemStreamSupport() {
@@ -82,7 +83,7 @@ public class SimpleStreamManagerTests extends TestCase {
/**
* Test method for
* {@link org.springframework.batch.item.stream.CompositeItemStream#commit(org.springframework.transaction.TransactionStatus)}.
* {@link org.springframework.batch.item.support.CompositeItemStream#commit(org.springframework.transaction.TransactionStatus)}.
*/
public void testClose() {
manager.register(new ItemStreamSupport() {
@@ -96,7 +97,7 @@ public class SimpleStreamManagerTests extends TestCase {
/**
* Test method for
* {@link org.springframework.batch.item.stream.CompositeItemStream#commit(org.springframework.transaction.TransactionStatus)}.
* {@link org.springframework.batch.item.support.CompositeItemStream#commit(org.springframework.transaction.TransactionStatus)}.
*/
public void testCloseDoesNotUnregister() {
manager.setStreams(new ItemStream[] { new ItemStreamSupport() {

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.batch.item.reader;
package org.springframework.batch.item.support;
import java.util.ArrayList;
import java.util.Arrays;
@@ -22,6 +22,7 @@ import java.util.List;
import junit.framework.TestCase;
import org.springframework.batch.item.support.ListItemReader;
import org.springframework.batch.support.transaction.ResourcelessTransactionManager;
import org.springframework.batch.support.transaction.TransactionAwareProxyFactory;
import org.springframework.transaction.PlatformTransactionManager;

View File

@@ -1,4 +1,4 @@
package org.springframework.batch.item.support;
package org.springframework.batch.item.util;
import java.io.BufferedWriter;
import java.io.File;
@@ -7,6 +7,7 @@ import java.io.IOException;
import junit.framework.TestCase;
import org.springframework.batch.item.util.FileUtils;
import org.springframework.dao.DataAccessResourceFailureException;
import org.springframework.util.Assert;

View File

@@ -23,7 +23,7 @@ import java.util.List;
import junit.framework.TestCase;
import org.springframework.batch.item.AbstractItemWriter;
import org.springframework.batch.item.reader.ListItemReader;
import org.springframework.batch.item.support.ListItemReader;
public class ItemReaderRepeatCallbackTests extends TestCase {

View File

@@ -20,7 +20,7 @@ import java.util.List;
import org.springframework.batch.item.ItemKeyGenerator;
import org.springframework.batch.item.ItemRecoverer;
import org.springframework.batch.item.reader.ListItemReader;
import org.springframework.batch.item.support.ListItemReader;
public class ListItemReaderRecoverer extends ListItemReader implements ItemRecoverer, ItemKeyGenerator {

View File

@@ -27,7 +27,7 @@ import org.springframework.batch.item.AbstractItemWriter;
import org.springframework.batch.item.FailedItemIdentifier;
import org.springframework.batch.item.ItemKeyGenerator;
import org.springframework.batch.item.ItemReader;
import org.springframework.batch.item.reader.ListItemReader;
import org.springframework.batch.item.support.ListItemReader;
import org.springframework.batch.repeat.RepeatContext;
import org.springframework.batch.repeat.context.RepeatContextSupport;
import org.springframework.batch.repeat.synch.RepeatSynchronizationManager;

View File

@@ -20,7 +20,7 @@ import java.util.ArrayList;
import java.util.List;
import org.springframework.batch.item.AbstractItemWriter;
import org.springframework.batch.item.reader.JmsItemReader;
import org.springframework.batch.item.jms.JmsItemReader;
import org.springframework.batch.retry.RetryCallback;
import org.springframework.batch.retry.RetryContext;
import org.springframework.batch.retry.callback.ItemReaderRetryCallback;

View File

@@ -20,7 +20,7 @@ import java.util.ArrayList;
import java.util.List;
import org.springframework.batch.item.AbstractItemWriter;
import org.springframework.batch.item.reader.JmsItemReader;
import org.springframework.batch.item.jms.JmsItemReader;
import org.springframework.batch.retry.RetryCallback;
import org.springframework.batch.retry.RetryContext;
import org.springframework.batch.retry.callback.ItemReaderRetryCallback;

View File

@@ -16,8 +16,8 @@
package org.springframework.batch.sample.dao;
import org.springframework.batch.item.support.DelegatingItemWriter;
import org.springframework.batch.item.transform.ItemTransformer;
import org.springframework.batch.item.writer.DelegatingItemWriter;
import org.springframework.batch.sample.item.writer.OrderWriter;

View File

@@ -23,7 +23,7 @@ import org.apache.commons.logging.LogFactory;
import org.springframework.batch.core.StepExecution;
import org.springframework.batch.item.file.mapping.FieldSet;
import org.springframework.batch.item.file.mapping.FieldSetMapper;
import org.springframework.batch.item.reader.DelegatingItemReader;
import org.springframework.batch.item.support.DelegatingItemReader;
import org.springframework.batch.sample.domain.Address;
import org.springframework.batch.sample.domain.BillingInfo;
import org.springframework.batch.sample.domain.Customer;

View File

@@ -17,7 +17,7 @@
package org.springframework.batch.sample.item.writer;
import org.springframework.batch.core.UnexpectedJobExecutionException;
import org.springframework.batch.item.writer.DelegatingItemWriter;
import org.springframework.batch.item.support.DelegatingItemWriter;
import org.springframework.batch.sample.domain.Order;

View File

@@ -18,7 +18,7 @@ package org.springframework.batch.sample.mapping;
import org.springframework.batch.item.file.mapping.FieldSet;
import org.springframework.batch.item.file.mapping.FieldSetMapper;
import org.springframework.batch.item.reader.AggregateItemReader;
import org.springframework.batch.item.support.AggregateItemReader;
import org.springframework.batch.sample.domain.Trade;

View File

@@ -19,7 +19,7 @@ package org.springframework.batch.sample.tasklet;
import org.springframework.batch.core.UnexpectedJobExecutionException;
import org.springframework.batch.item.ItemReader;
import org.springframework.batch.item.reader.DelegatingItemReader;
import org.springframework.batch.item.support.DelegatingItemReader;
/**
* Hacked {@link ItemReader} that throws exception on a given record number

View File

@@ -23,7 +23,7 @@
</property>
<property name="itemWriter">
<bean
class="org.springframework.batch.item.writer.CompositeItemWriter">
class="org.springframework.batch.item.support.CompositeItemWriter">
<property name="delegates">
<list>
<bean

View File

@@ -13,7 +13,7 @@
<property name="streams" ref="fileItemReader"/>
<property name="itemReader">
<bean
class="org.springframework.batch.item.reader.AggregateItemReader">
class="org.springframework.batch.item.support.AggregateItemReader">
<property name="itemReader"
ref="fileItemReader" />
</bean>

View File

@@ -5,7 +5,7 @@ import java.math.BigDecimal;
import org.springframework.batch.item.file.mapping.DefaultFieldSet;
import org.springframework.batch.item.file.mapping.FieldSet;
import org.springframework.batch.item.file.mapping.FieldSetMapper;
import org.springframework.batch.item.reader.AggregateItemReader;
import org.springframework.batch.item.support.AggregateItemReader;
import org.springframework.batch.sample.domain.Trade;
import org.springframework.batch.sample.mapping.TradeFieldSetMapper;

View File

@@ -5,7 +5,7 @@ import java.util.ArrayList;
import junit.framework.TestCase;
import org.springframework.batch.core.UnexpectedJobExecutionException;
import org.springframework.batch.item.reader.ListItemReader;
import org.springframework.batch.item.support.ListItemReader;
import org.springframework.batch.repeat.context.RepeatContextSupport;
import org.springframework.batch.repeat.synch.RepeatSynchronizationManager;