Rename package batch.integration

This commit is contained in:
dsyer
2008-06-13 10:51:51 +00:00
parent e4ffd6a653
commit 77aaaa05ea
47 changed files with 132 additions and 134 deletions

View File

@@ -1,19 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<beansProjectDescription>
<version>1</version>
<pluginVersion><![CDATA[2.0.5.v200805211800]]></pluginVersion>
<pluginVersion><![CDATA[2.1.0.v200806081427]]></pluginVersion>
<configSuffixes>
<configSuffix><![CDATA[xml]]></configSuffix>
</configSuffixes>
<enableImports><![CDATA[false]]></enableImports>
<enableImports><![CDATA[true]]></enableImports>
<configs>
<config>src/test/resources/integration-context.xml</config>
<config>src/test/resources/job-execution-context.xml</config>
<config>src/test/resources/org/springframework/integration/batch/launch/JobLaunchingMessageHandlerIntegrationTests-context.xml</config>
<config>src/test/resources/org/springframework/integration/batch/item/MessageChannelItemWriterIntegrationTests-context.xml</config>
<config>src/test/resources/org/springframework/integration/batch/job/MessageOrientedStepIntegrationTests-context.xml</config>
<config>src/test/resources/org/springframework/integration/batch/file/ResourceSplitterIntegrationTests-context.xml</config>
<config>src/test/resources/simple-job-launcher-context.xml</config>
<config>src/test/resources/org/springframework/batch/integration/chunk/ChunkMessageItemWriterIntegrationTests-context.xml</config>
<config>src/test/resources/org/springframework/batch/integration/launch/JobLaunchingMessageHandlerIntegrationTests-context.xml</config>
<config>src/test/resources/org/springframework/batch/integration/item/MessageChannelItemWriterIntegrationTests-context.xml</config>
<config>src/test/resources/org/springframework/batch/integration/job/MessageOrientedStepIntegrationTests-context.xml</config>
<config>src/test/resources/org/springframework/batch/integration/file/ResourceSplitterIntegrationTests-context.xml</config>
</configs>
<configSets>
</configSets>

View File

@@ -1,18 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Apache Maven 2 POM generated by Apache Ivy
http://ant.apache.org/ivy/
Apache Ivy version: 2.0.0-beta2 20080225093827
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.springframework.batch</groupId>
<artifactId>spring-batch-integration</artifactId>
<packaging>jar</packaging>
<version>1.1.0.DEV-SNAPSHOT</version>
<parent>
<groupId>org.springframework.batch</groupId>
<artifactId>spring-batch</artifactId>
<version>1.1.0.DEV-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<properties>
<maven.test.failure.ignore>true</maven.test.failure.ignore>
<spring.framework.version>2.5.4.A</spring.framework.version>
<spring.integration.version>1.0.0.M4</spring.integration.version>
</properties>
@@ -29,16 +27,9 @@
<version>4.4</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>cglib</groupId>
<artifactId>cglib-nodep</artifactId>
<version>2.1_3</version>
<scope>test</scope>
</dependency>
<dependency>
@@ -86,7 +77,7 @@
<dependency>
<groupId>org.springframework.batch</groupId>
<artifactId>spring-batch-core</artifactId>
<version>1.1.0.DEV-SNAPSHOT</version>
<version>${project.version}</version>
<scope>compile</scope>
<exclusions>
<exclusion>
@@ -97,6 +88,10 @@
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-aop</artifactId>

View File

@@ -1,4 +1,4 @@
package org.springframework.integration.batch.chunk;
package org.springframework.batch.integration.chunk;
import org.springframework.batch.item.ItemWriterException;

View File

@@ -1,4 +1,4 @@
package org.springframework.integration.batch.chunk;
package org.springframework.batch.integration.chunk;
public interface ChunkHandler {

View File

@@ -1,4 +1,4 @@
package org.springframework.integration.batch.chunk;
package org.springframework.batch.integration.chunk;
import java.util.ArrayList;
import java.util.List;

View File

@@ -1,4 +1,4 @@
package org.springframework.integration.batch.chunk;
package org.springframework.batch.integration.chunk;
import java.io.Serializable;
import java.util.Collection;

View File

@@ -1,4 +1,4 @@
package org.springframework.integration.batch.chunk;
package org.springframework.batch.integration.chunk;
import java.io.Serializable;

View File

@@ -1,4 +1,4 @@
package org.springframework.integration.batch.chunk;
package org.springframework.batch.integration.chunk;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.integration.batch.file;
package org.springframework.batch.integration.file;
import org.springframework.batch.core.Job;
import org.springframework.batch.core.JobParameters;
@@ -23,6 +23,8 @@ import org.springframework.batch.core.job.SimpleJob;
import org.springframework.batch.core.repository.JobRepository;
import org.springframework.batch.core.resource.StepExecutionResourceProxy;
import org.springframework.batch.core.step.item.SimpleStepFactoryBean;
import org.springframework.batch.integration.item.MessageChannelItemWriter;
import org.springframework.batch.integration.launch.JobLaunchingMessageHandler;
import org.springframework.batch.item.ItemReader;
import org.springframework.batch.item.file.FlatFileItemReader;
import org.springframework.batch.item.xml.StaxEventItemReader;
@@ -30,8 +32,6 @@ import org.springframework.beans.factory.BeanNameAware;
import org.springframework.beans.factory.FactoryBean;
import org.springframework.beans.factory.annotation.Required;
import org.springframework.core.io.Resource;
import org.springframework.integration.batch.item.MessageChannelItemWriter;
import org.springframework.integration.batch.launch.JobLaunchingMessageHandler;
import org.springframework.integration.channel.MessageChannel;
import org.springframework.integration.dispatcher.DirectChannel;
import org.springframework.transaction.PlatformTransactionManager;
@@ -40,7 +40,7 @@ import org.springframework.util.Assert;
/**
* A FactoryBean for a {@link Job} with a single step which just pumps messages
* from a file into a channel. The channel has to be a
* {@link SynchronousChannel} to ensure that failures propagate up to the step
* {@link DirectChannel} to ensure that failures propagate up to the step
* and fail the job execution. Normally this job will be used in conjunction
* with a {@link JobLaunchingMessageHandler} and a
* {@link ResourcePayloadAsJobParameterStrategy}, so that the user can just

View File

@@ -13,15 +13,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.integration.batch.file;
package org.springframework.batch.integration.file;
import java.io.IOException;
import org.springframework.batch.core.JobParameters;
import org.springframework.batch.core.JobParametersBuilder;
import org.springframework.batch.integration.launch.MessageToJobParametersStrategy;
import org.springframework.batch.item.ItemStreamException;
import org.springframework.core.io.Resource;
import org.springframework.integration.batch.launch.MessageToJobParametersStrategy;
import org.springframework.integration.message.Message;
/**
@@ -39,7 +39,7 @@ public class ResourcePayloadAsJobParameterStrategy implements MessageToJobParame
* Convert a message payload which is a {@link Resource} to its URL
* representation and load that into a job parameter.
*
* @see org.springframework.integration.batch.launch.MessageToJobParametersStrategy#getJobParameters(org.springframework.integration.message.Message)
* @see org.springframework.batch.integration.launch.MessageToJobParametersStrategy#getJobParameters(org.springframework.integration.message.Message)
*/
public JobParameters getJobParameters(Message<?> message) {
JobParametersBuilder builder = new JobParametersBuilder();

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.integration.batch.item;
package org.springframework.batch.integration.item;
import org.springframework.batch.item.AbstractItemWriter;
import org.springframework.beans.factory.annotation.Required;

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.integration.batch.job;
package org.springframework.batch.integration.job;
/**
* @author dsyer

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.integration.batch.job;
package org.springframework.batch.integration.job;
import org.springframework.batch.core.BatchStatus;
import org.springframework.batch.core.JobExecution;
@@ -52,14 +52,14 @@ public class JobExecutionRequest extends AttributeAccessorSupport {
}
/**
* @return
* @return the current job execution id
*/
public Long getJobId() {
return this.jobExecution.getJobId();
}
/**
* @return
* @return the current {@link BatchStatus}
*/
public BatchStatus getStatus() {
return status;
@@ -74,7 +74,7 @@ public class JobExecutionRequest extends AttributeAccessorSupport {
}
/**
* @return
* @return true if there are errors
*/
public boolean hasErrors() {
return throwable != null;

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.integration.batch.job;
package org.springframework.batch.integration.job;
import org.springframework.batch.core.BatchStatus;
import org.springframework.batch.core.JobInterruptedException;

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.integration.batch.job;
package org.springframework.batch.integration.job;
import org.springframework.batch.core.BatchStatus;
import org.springframework.batch.core.JobExecution;

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.integration.batch.job;
package org.springframework.batch.integration.job;
import org.springframework.batch.core.UnexpectedJobExecutionException;

View File

@@ -1,4 +1,4 @@
package org.springframework.integration.batch.launch;
package org.springframework.batch.integration.launch;
import org.springframework.batch.core.Job;
import org.springframework.batch.core.JobExecution;
@@ -6,7 +6,6 @@ import org.springframework.batch.core.JobExecutionException;
import org.springframework.batch.core.JobParameters;
import org.springframework.batch.core.launch.JobLauncher;
import org.springframework.integration.annotation.Handler;
import org.springframework.integration.annotation.MessageEndpoint;
import org.springframework.integration.message.Message;
import org.springframework.integration.message.MessageHandlingException;

View File

@@ -1,4 +1,4 @@
package org.springframework.integration.batch.launch;
package org.springframework.batch.integration.launch;
import org.springframework.batch.core.Job;
import org.springframework.batch.core.JobExecutionException;
@@ -27,7 +27,6 @@ public class JobLaunchingPostReceiveChannelInterceptor extends ChannelIntercepto
*
* @param job The job to launch
* @param jobLauncher
* @param errorHandler
*/
public JobLaunchingPostReceiveChannelInterceptor(Job job, JobLauncher jobLauncher) {
super();

View File

@@ -1,4 +1,4 @@
package org.springframework.integration.batch.launch;
package org.springframework.batch.integration.launch;
import org.springframework.batch.core.JobParameters;
import org.springframework.integration.message.Message;

View File

@@ -1,4 +1,4 @@
package org.springframework.integration.batch.launch;
package org.springframework.batch.integration.launch;
import org.springframework.batch.core.Job;
import org.springframework.integration.message.Message;

View File

@@ -1,4 +1,4 @@
package org.springframework.integration.batch.launch;
package org.springframework.batch.integration.launch;
import org.springframework.batch.core.Job;
import org.springframework.batch.core.configuration.JobLocator;

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.integration.batch;
package org.springframework.batch.integration;
import org.springframework.batch.core.Job;
import org.springframework.batch.core.JobExecution;

View File

@@ -1,4 +1,4 @@
package org.springframework.integration.batch;
package org.springframework.batch.integration;
import java.util.List;

View File

@@ -1,4 +1,4 @@
package org.springframework.integration.batch;
package org.springframework.batch.integration;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.integration.batch;
package org.springframework.batch.integration;
import org.springframework.batch.core.JobInterruptedException;
import org.springframework.batch.core.Step;

View File

@@ -1,4 +1,4 @@
package org.springframework.integration.batch.chunk;
package org.springframework.batch.integration.chunk;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
@@ -25,6 +25,9 @@ import org.springframework.batch.core.repository.dao.MapJobInstanceDao;
import org.springframework.batch.core.repository.dao.MapStepExecutionDao;
import org.springframework.batch.core.repository.support.SimpleJobRepository;
import org.springframework.batch.core.step.item.SimpleStepFactoryBean;
import org.springframework.batch.integration.chunk.AsynchronousFailureException;
import org.springframework.batch.integration.chunk.ChunkMessageChannelItemWriter;
import org.springframework.batch.integration.chunk.ChunkRequest;
import org.springframework.batch.item.ExecutionContext;
import org.springframework.batch.item.support.ListItemReader;
import org.springframework.batch.repeat.ExitStatus;

View File

@@ -1,4 +1,4 @@
package org.springframework.integration.batch.chunk;
package org.springframework.batch.integration.chunk;
import static org.junit.Assert.assertEquals;
@@ -6,6 +6,9 @@ import org.junit.Test;
import org.springframework.batch.core.SkipListener;
import org.springframework.batch.core.listener.SkipListenerSupport;
import org.springframework.batch.core.step.skip.AlwaysSkipItemSkipPolicy;
import org.springframework.batch.integration.chunk.ChunkRequest;
import org.springframework.batch.integration.chunk.ChunkResponse;
import org.springframework.batch.integration.chunk.ItemWriterChunkHandler;
import org.springframework.batch.item.AbstractItemWriter;
import org.springframework.batch.repeat.ExitStatus;
import org.springframework.util.StringUtils;

View File

@@ -1,4 +1,4 @@
package org.springframework.integration.batch.chunk;
package org.springframework.batch.integration.chunk;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.integration.batch.file;
package org.springframework.batch.integration.file;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
@@ -30,6 +30,9 @@ import org.springframework.batch.core.JobExecution;
import org.springframework.batch.core.JobParameters;
import org.springframework.batch.core.JobParametersBuilder;
import org.springframework.batch.core.repository.JobRepository;
import org.springframework.batch.integration.JobRepositorySupport;
import org.springframework.batch.integration.file.FileToMessagesJobFactoryBean;
import org.springframework.batch.integration.file.ResourcePayloadAsJobParameterStrategy;
import org.springframework.batch.item.ItemReader;
import org.springframework.batch.item.file.FlatFileItemReader;
import org.springframework.batch.item.file.mapping.FieldSet;
@@ -37,7 +40,6 @@ import org.springframework.batch.item.file.mapping.PassThroughFieldSetMapper;
import org.springframework.batch.support.transaction.ResourcelessTransactionManager;
import org.springframework.beans.factory.annotation.Required;
import org.springframework.core.annotation.AnnotationUtils;
import org.springframework.integration.batch.JobRepositorySupport;
import org.springframework.integration.channel.MessageChannel;
import org.springframework.integration.channel.ThreadLocalChannel;
import org.springframework.integration.dispatcher.DirectChannel;
@@ -76,7 +78,7 @@ public class FileToMessagesJobFactoryBeanTests {
/**
* Test method for
* {@link org.springframework.integration.batch.file.FileToMessagesJobFactoryBean#setBeanName(java.lang.String)}.
* {@link org.springframework.batch.integration.file.FileToMessagesJobFactoryBean#setBeanName(java.lang.String)}.
* @throws Exception
*/
@Test
@@ -86,7 +88,7 @@ public class FileToMessagesJobFactoryBeanTests {
/**
* Test method for
* {@link org.springframework.integration.batch.file.FileToMessagesJobFactoryBean#setItemReader(org.springframework.batch.item.ItemReader)}.
* {@link org.springframework.batch.integration.file.FileToMessagesJobFactoryBean#setItemReader(org.springframework.batch.item.ItemReader)}.
*/
@Test
public void testSetItemReader() {
@@ -100,7 +102,7 @@ public class FileToMessagesJobFactoryBeanTests {
/**
* Test method for
* {@link org.springframework.integration.batch.file.FileToMessagesJobFactoryBean#setChannel(org.springframework.integration.channel.MessageChannel)}.
* {@link org.springframework.batch.integration.file.FileToMessagesJobFactoryBean#setChannel(org.springframework.integration.channel.MessageChannel)}.
*/
@Test
public void testSetChannel() {
@@ -114,7 +116,7 @@ public class FileToMessagesJobFactoryBeanTests {
/**
* Test method for
* {@link org.springframework.integration.batch.file.FileToMessagesJobFactoryBean#setJobRepository(org.springframework.batch.core.repository.JobRepository)}.
* {@link org.springframework.batch.integration.file.FileToMessagesJobFactoryBean#setJobRepository(org.springframework.batch.core.repository.JobRepository)}.
*/
@Test
public void testSetJobRepository() {
@@ -128,7 +130,7 @@ public class FileToMessagesJobFactoryBeanTests {
/**
* Test method for
* {@link org.springframework.integration.batch.file.FileToMessagesJobFactoryBean#setTransactionManager(org.springframework.transaction.PlatformTransactionManager)}.
* {@link org.springframework.batch.integration.file.FileToMessagesJobFactoryBean#setTransactionManager(org.springframework.transaction.PlatformTransactionManager)}.
*/
@Test
public void testSetTransactionManager() {
@@ -142,7 +144,7 @@ public class FileToMessagesJobFactoryBeanTests {
/**
* Test method for
* {@link org.springframework.integration.batch.file.FileToMessagesJobFactoryBean#getObject()}.
* {@link org.springframework.batch.integration.file.FileToMessagesJobFactoryBean#getObject()}.
* @throws Exception
*/
@Test
@@ -152,7 +154,7 @@ public class FileToMessagesJobFactoryBeanTests {
/**
* Test method for
* {@link org.springframework.integration.batch.file.FileToMessagesJobFactoryBean#getObjectType()}.
* {@link org.springframework.batch.integration.file.FileToMessagesJobFactoryBean#getObjectType()}.
*/
@Test
public void testGetObjectType() {
@@ -162,7 +164,7 @@ public class FileToMessagesJobFactoryBeanTests {
/**
* Test method for
* {@link org.springframework.integration.batch.file.FileToMessagesJobFactoryBean#isSingleton()}.
* {@link org.springframework.batch.integration.file.FileToMessagesJobFactoryBean#isSingleton()}.
*/
@Test
public void testIsSingleton() {

View File

@@ -13,15 +13,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.integration.batch.file;
package org.springframework.batch.integration.file;
import static org.junit.Assert.*;
import org.junit.Test;
import org.springframework.batch.core.JobParameters;
import org.springframework.batch.integration.file.ResourcePayloadAsJobParameterStrategy;
import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.Resource;
import org.springframework.integration.batch.file.ResourcePayloadAsJobParameterStrategy;
import org.springframework.integration.message.GenericMessage;
/**
@@ -36,7 +36,7 @@ public class ResourcePayloadAsJobParameterStrategyTests {
private static final String INPUT_FILE_PATH = ResourcePayloadAsJobParameterStrategy.FILE_INPUT_PATH;
/**
* Test method for {@link org.springframework.integration.batch.file.ResourcePayloadAsJobParameterStrategy#getJobParameters(org.springframework.integration.message.Message)}.
* Test method for {@link org.springframework.batch.integration.file.ResourcePayloadAsJobParameterStrategy#getJobParameters(org.springframework.integration.message.Message)}.
*/
@Test
public void testGetJobParameters() {
@@ -46,7 +46,7 @@ public class ResourcePayloadAsJobParameterStrategyTests {
}
/**
* Test method for {@link org.springframework.integration.batch.file.ResourcePayloadAsJobParameterStrategy#getJobParameters(org.springframework.integration.message.Message)}.
* Test method for {@link org.springframework.batch.integration.file.ResourcePayloadAsJobParameterStrategy#getJobParameters(org.springframework.integration.message.Message)}.
*/
@Test
public void testGetJobParametersWithWrongPayload() {

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.integration.batch.file;
package org.springframework.batch.integration.file;
import static org.junit.Assert.assertNotNull;

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.integration.batch.item;
package org.springframework.batch.integration.item;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.integration.batch.item;
package org.springframework.batch.integration.item;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
@@ -23,6 +23,7 @@ import java.lang.annotation.Annotation;
import java.lang.reflect.Method;
import org.junit.Test;
import org.springframework.batch.integration.item.MessageChannelItemWriter;
import org.springframework.beans.factory.annotation.Required;
import org.springframework.core.annotation.AnnotationUtils;
import org.springframework.integration.channel.MessageChannel;
@@ -42,7 +43,7 @@ import org.springframework.util.ReflectionUtils;
public class MessageChannelItemWriterTests {
/**
* Test method for {@link org.springframework.integration.batch.item.MessageChannelItemWriter#setChannel(org.springframework.integration.channel.MessageChannel)}.
* Test method for {@link org.springframework.batch.integration.item.MessageChannelItemWriter#setChannel(org.springframework.integration.channel.MessageChannel)}.
*/
@Test
public void testSetChannel() {
@@ -54,7 +55,7 @@ public class MessageChannelItemWriterTests {
}
/**
* Test method for {@link org.springframework.integration.batch.item.MessageChannelItemWriter#write(java.lang.Object)}.
* Test method for {@link org.springframework.batch.integration.item.MessageChannelItemWriter#write(java.lang.Object)}.
* @throws Exception
*/
@Test
@@ -71,7 +72,7 @@ public class MessageChannelItemWriterTests {
}
/**
* Test method for {@link org.springframework.integration.batch.item.MessageChannelItemWriter#write(java.lang.Object)}.
* Test method for {@link org.springframework.batch.integration.item.MessageChannelItemWriter#write(java.lang.Object)}.
* @throws Exception
*/
@Test
@@ -94,7 +95,7 @@ public class MessageChannelItemWriterTests {
}
/**
* Test method for {@link org.springframework.integration.batch.item.MessageChannelItemWriter#write(java.lang.Object)}.
* Test method for {@link org.springframework.batch.integration.item.MessageChannelItemWriter#write(java.lang.Object)}.
* @throws Exception
*/
@Test

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.integration.batch.job;
package org.springframework.batch.integration.job;
import static org.junit.Assert.assertEquals;

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.integration.batch.job;
package org.springframework.batch.integration.job;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
@@ -30,9 +30,12 @@ import org.springframework.batch.core.JobExecution;
import org.springframework.batch.core.JobInstance;
import org.springframework.batch.core.JobParameters;
import org.springframework.batch.core.StepExecution;
import org.springframework.batch.integration.JobRepositorySupport;
import org.springframework.batch.integration.job.JobExecutionRequest;
import org.springframework.batch.integration.job.MessageOrientedStep;
import org.springframework.batch.integration.job.StepExecutionTimeoutException;
import org.springframework.beans.factory.annotation.Required;
import org.springframework.core.annotation.AnnotationUtils;
import org.springframework.integration.batch.JobRepositorySupport;
import org.springframework.integration.channel.MessageChannel;
import org.springframework.integration.channel.ThreadLocalChannel;
import org.springframework.integration.dispatcher.DirectChannel;
@@ -55,9 +58,6 @@ public class MessageOrientedStepTests {
private MessageChannel replyChannel;
/**
* @return
*/
@Before
public void createStep() {
replyChannel = new ThreadLocalChannel();
@@ -73,7 +73,7 @@ public class MessageOrientedStepTests {
/**
* Test method for
* {@link org.springframework.integration.batch.job.MessageOrientedStep#setRequestChannel(org.springframework.integration.channel.MessageChannel)}.
* {@link org.springframework.batch.integration.job.MessageOrientedStep#setRequestChannel(org.springframework.integration.channel.MessageChannel)}.
*/
@Test
public void testSetRequestChannel() {
@@ -87,7 +87,7 @@ public class MessageOrientedStepTests {
/**
* Test method for
* {@link org.springframework.integration.batch.job.MessageOrientedStep#setReplyChannel(org.springframework.integration.channel.MessageChannel)}.
* {@link org.springframework.batch.integration.job.MessageOrientedStep#setReplyChannel(org.springframework.integration.channel.MessageChannel)}.
*/
@Test
public void testSetReplyChannel() {
@@ -101,9 +101,8 @@ public class MessageOrientedStepTests {
/**
* Test method for
* {@link org.springframework.integration.batch.job.MessageOrientedStep#execute(org.springframework.batch.core.StepExecution)}.
* {@link org.springframework.batch.integration.job.MessageOrientedStep#execute(org.springframework.batch.core.StepExecution)}.
* @throws Exception
* @throws
*/
@Test
public void testExecuteWithTimeout() throws Exception {

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.integration.batch.job;
package org.springframework.batch.integration.job;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
@@ -32,16 +32,16 @@ import org.springframework.batch.core.JobParameters;
import org.springframework.batch.core.StartLimitExceededException;
import org.springframework.batch.core.Step;
import org.springframework.batch.core.StepExecution;
import org.springframework.batch.core.repository.JobExecutionAlreadyRunningException;
import org.springframework.batch.core.repository.JobRepository;
import org.springframework.batch.core.repository.JobRestartException;
import org.springframework.batch.integration.JobRepositorySupport;
import org.springframework.batch.integration.JobSupport;
import org.springframework.batch.integration.StepSupport;
import org.springframework.batch.integration.job.JobExecutionRequest;
import org.springframework.batch.integration.job.StepExecutionMessageHandler;
import org.springframework.batch.item.ExecutionContext;
import org.springframework.batch.support.PropertiesConverter;
import org.springframework.beans.factory.annotation.Required;
import org.springframework.core.annotation.AnnotationUtils;
import org.springframework.integration.batch.JobRepositorySupport;
import org.springframework.integration.batch.JobSupport;
import org.springframework.integration.batch.StepSupport;
import org.springframework.util.ReflectionUtils;
/**
@@ -52,7 +52,7 @@ public class StepExecutionMessageHandlerTests {
/**
* Test method for
* {@link org.springframework.integration.batch.job.StepExecutionMessageHandler#setStep(org.springframework.batch.core.Step)}.
* {@link org.springframework.batch.integration.job.StepExecutionMessageHandler#setStep(org.springframework.batch.core.Step)}.
*/
@Test
public void testSetStep() {
@@ -66,7 +66,7 @@ public class StepExecutionMessageHandlerTests {
/**
* Test method for
* {@link org.springframework.integration.batch.job.StepExecutionMessageHandler#setJobRepository(org.springframework.batch.core.repository.JobRepository)}.
* {@link org.springframework.batch.integration.job.StepExecutionMessageHandler#setJobRepository(org.springframework.batch.core.repository.JobRepository)}.
*/
@Test
public void testSetJobRepository() {
@@ -78,13 +78,6 @@ public class StepExecutionMessageHandlerTests {
assertEquals(Required.class, annotations[0].annotationType());
}
/**
* Test method for
* {@link org.springframework.integration.batch.job.StepExecutionMessageHandler#handle(org.springframework.integration.message.Message)}.
* @throws Exception
* @throws JobRestartException
* @throws JobExecutionAlreadyRunningException
*/
@SuppressWarnings("unchecked")
@Test
public void testVanillaHandle() throws Exception {
@@ -232,7 +225,7 @@ public class StepExecutionMessageHandlerTests {
/**
* @param jobRepository
* @return
* @return a handler for step executions
*
*/
public StepExecutionMessageHandler createHandler(JobRepositorySupport jobRepository) {

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.integration.batch.job;
package org.springframework.batch.integration.job;
import org.springframework.batch.core.step.tasklet.Tasklet;
import org.springframework.batch.repeat.ExitStatus;

View File

@@ -1,4 +1,4 @@
package org.springframework.integration.batch.launch;
package org.springframework.batch.integration.launch;
import static org.junit.Assert.assertEquals;
@@ -13,8 +13,10 @@ import org.springframework.batch.core.JobExecution;
import org.springframework.batch.core.JobInstance;
import org.springframework.batch.core.JobParameters;
import org.springframework.batch.core.launch.JobLauncher;
import org.springframework.batch.integration.JobSupport;
import org.springframework.batch.integration.launch.JobLaunchingMessageHandler;
import org.springframework.batch.integration.launch.MessageToJobStrategy;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.integration.batch.JobSupport;
import org.springframework.integration.bus.MessageBus;
import org.springframework.integration.channel.AbstractMessageChannel;
import org.springframework.integration.message.Message;

View File

@@ -1,4 +1,4 @@
package org.springframework.integration.batch.launch;
package org.springframework.batch.integration.launch;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
@@ -13,7 +13,8 @@ import org.springframework.batch.core.Job;
import org.springframework.batch.core.JobExecution;
import org.springframework.batch.core.JobParameters;
import org.springframework.batch.core.launch.JobLauncher;
import org.springframework.integration.batch.JobSupport;
import org.springframework.batch.integration.JobSupport;
import org.springframework.batch.integration.launch.JobLaunchingPostReceiveChannelInterceptor;
import org.springframework.integration.channel.AbstractMessageChannel;
import org.springframework.integration.message.StringMessage;
import org.springframework.test.context.ContextConfiguration;

View File

@@ -1,4 +1,4 @@
package org.springframework.integration.batch.retry;
package org.springframework.batch.integration.retry;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;

View File

@@ -2,29 +2,29 @@
<beans:beans xmlns="http://www.springframework.org/schema/integration"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans"
xmlns:context="http://www.springframework.org/schema/context" xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/integration
http://www.springframework.org/schema/integration/spring-integration-1.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-2.5.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-2.5.xsd">
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/integration
http://www.springframework.org/schema/integration/spring-integration-1.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-2.5.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-2.5.xsd">
<message-bus auto-create-channels="true" />
<message-bus auto-create-channels="true" />
<annotation-driven />
<annotation-driven />
<channel id="requests" />
<channel id="replies" />
<channel id="requests" />
<channel id="replies" />
<beans:bean id="transactionManager"
class="org.springframework.batch.support.transaction.ResourcelessTransactionManager" />
<tx:annotation-driven />
<beans:bean id="chunkHandler" class="org.springframework.integration.batch.chunk.ItemWriterChunkHandler">
<beans:bean id="chunkHandler" class="org.springframework.batch.integration.chunk.ItemWriterChunkHandler">
<beans:property name="itemWriter">
<beans:bean class="org.springframework.integration.batch.chunk.TestItemWriter"></beans:bean>
<beans:bean class="org.springframework.batch.integration.chunk.TestItemWriter"></beans:bean>
</beans:property>
</beans:bean>

View File

@@ -13,7 +13,7 @@
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd">
<integration:message-bus auto-create-channels="true" />
<integration:channel id="requests" />
<bean id="itemWriter" class="org.springframework.integration.batch.item.MessageChannelItemWriter">
<bean id="itemWriter" class="org.springframework.batch.integration.item.MessageChannelItemWriter">
<property name="channel" ref="requests"/>
</bean>
</beans>

View File

@@ -21,7 +21,7 @@
<bean id="job" parent="simpleJob">
<property name="steps">
<bean
class="org.springframework.integration.batch.job.MessageOrientedStep">
class="org.springframework.batch.integration.job.MessageOrientedStep">
<property name="name" value="TODO: I shouldn't have to set this"/>
<property name="requestChannel" ref="requests" />
<property name="replyChannel" ref="replies" />
@@ -31,12 +31,12 @@
<property name="jobRepository" ref="jobRepository" />
</bean>
<bean id="step"
class="org.springframework.integration.batch.job.StepExecutionMessageHandler">
class="org.springframework.batch.integration.job.StepExecutionMessageHandler">
<property name="step">
<bean parent="taskletStep">
<property name="tasklet">
<bean
class="org.springframework.integration.batch.job.TestTasklet" />
class="org.springframework.batch.integration.job.TestTasklet" />
</property>
</bean>
</property>

View File

@@ -21,12 +21,12 @@
<integration:handler-endpoint input-channel="requests" handler="jobLaunchingHandler" method="handle"/>
<bean id="jobLaunchingHandler" class="org.springframework.integration.batch.launch.JobLaunchingMessageHandler">
<bean id="jobLaunchingHandler" class="org.springframework.batch.integration.launch.JobLaunchingMessageHandler">
<constructor-arg ref="jobLauncher"/>
<constructor-arg ref="messageToJobStrategy"/>
</bean>
<bean id="messageToJobStrategy" class="org.springframework.integration.batch.launch.StringPayloadAsJobNameStrategy">
<bean id="messageToJobStrategy" class="org.springframework.batch.integration.launch.StringPayloadAsJobNameStrategy">
<constructor-arg ref="jobRegistry" />
</bean>
@@ -36,7 +36,7 @@
<bean id="step" class="org.springframework.batch.core.step.tasklet.TaskletStep">
<property name="tasklet">
<bean class="org.springframework.integration.batch.job.TestTasklet"/>
<bean class="org.springframework.batch.integration.job.TestTasklet"/>
</property>
<property name="jobRepository" ref="jobRepository"/>
</bean>