diff --git a/spring-integration-sftp/src/main/java/org/springframework/integration/sftp/config/SftpInboundChannelAdapterParser.java b/spring-integration-sftp/src/main/java/org/springframework/integration/sftp/config/SftpInboundChannelAdapterParser.java index c9057fa8f1..4378950222 100644 --- a/spring-integration-sftp/src/main/java/org/springframework/integration/sftp/config/SftpInboundChannelAdapterParser.java +++ b/spring-integration-sftp/src/main/java/org/springframework/integration/sftp/config/SftpInboundChannelAdapterParser.java @@ -54,13 +54,13 @@ public class SftpInboundChannelAdapterParser extends AbstractPollingInboundChann String sessionPollName = BeanDefinitionReaderUtils.registerWithGeneratedName( sessionFactoryBuilder.getBeanDefinition(), parserContext.getRegistry()); BeanDefinitionBuilder synchronizerBuilder = BeanDefinitionBuilder.genericBeanDefinition( - "org.springframework.integration.sftp.inbound.SftpInboundSynchronizer"); + "org.springframework.integration.sftp.inbound.SftpInboundFileSynchronizer"); synchronizerBuilder.addConstructorArgReference(sessionPollName); IntegrationNamespaceUtils.setValueIfAttributeDefined(synchronizerBuilder, element, "remote-directory", "remotePath"); IntegrationNamespaceUtils.setValueIfAttributeDefined(synchronizerBuilder, element, "auto-delete-remote-files-on-sync", "shouldDeleteSourceFile"); IntegrationNamespaceUtils.setReferenceIfAttributeDefined(synchronizerBuilder, element, "filter"); BeanDefinitionBuilder messageSourceBuilder = BeanDefinitionBuilder.rootBeanDefinition( - "org.springframework.integration.sftp.inbound.SftpInboundSynchronizingMessageSource"); + "org.springframework.integration.sftp.inbound.SftpInboundFileSynchronizingMessageSource"); messageSourceBuilder.addPropertyValue("synchronizer", synchronizerBuilder.getBeanDefinition()); if (hasFileNamePattern) { if (parserContext.getRegistry().containsBeanDefinition(fileNamePattern)) { diff --git a/spring-integration-sftp/src/main/java/org/springframework/integration/sftp/inbound/SftpInboundSynchronizer.java b/spring-integration-sftp/src/main/java/org/springframework/integration/sftp/inbound/SftpInboundFileSynchronizer.java similarity index 96% rename from spring-integration-sftp/src/main/java/org/springframework/integration/sftp/inbound/SftpInboundSynchronizer.java rename to spring-integration-sftp/src/main/java/org/springframework/integration/sftp/inbound/SftpInboundFileSynchronizer.java index 91fb5f4a52..cf040a7769 100644 --- a/spring-integration-sftp/src/main/java/org/springframework/integration/sftp/inbound/SftpInboundSynchronizer.java +++ b/spring-integration-sftp/src/main/java/org/springframework/integration/sftp/inbound/SftpInboundFileSynchronizer.java @@ -40,7 +40,7 @@ import com.jcraft.jsch.ChannelSftp; * @author Oleg Zhurakousky * @since 2.0 */ -public class SftpInboundSynchronizer extends AbstractInboundFileSynchronizer { +public class SftpInboundFileSynchronizer extends AbstractInboundFileSynchronizer { /** * the path on the remote mount @@ -53,7 +53,7 @@ public class SftpInboundSynchronizer extends AbstractInboundFileSynchronizer { +public class SftpInboundFileSynchronizingMessageSource extends AbstractInboundFileSynchronizingMessageSource { private volatile Pattern filenamePattern; diff --git a/spring-integration-sftp/src/test/java/org/springframework/integration/sftp/config/InboundChannelAdapaterParserTests.java b/spring-integration-sftp/src/test/java/org/springframework/integration/sftp/config/InboundChannelAdapaterParserTests.java index 299f8dca09..1d6904914f 100644 --- a/spring-integration-sftp/src/test/java/org/springframework/integration/sftp/config/InboundChannelAdapaterParserTests.java +++ b/spring-integration-sftp/src/test/java/org/springframework/integration/sftp/config/InboundChannelAdapaterParserTests.java @@ -32,7 +32,7 @@ import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; import org.springframework.integration.core.PollableChannel; import org.springframework.integration.endpoint.SourcePollingChannelAdapter; -import org.springframework.integration.sftp.inbound.SftpInboundSynchronizingMessageSource; +import org.springframework.integration.sftp.inbound.SftpInboundFileSynchronizingMessageSource; import org.springframework.integration.test.util.TestUtils; /** @@ -53,8 +53,8 @@ public class InboundChannelAdapaterParserTests { Object adapter = context.getBean("sftpAdapterAutoCreate"); assertTrue(adapter instanceof SourcePollingChannelAdapter); - SftpInboundSynchronizingMessageSource source = - (SftpInboundSynchronizingMessageSource) TestUtils.getPropertyValue(adapter, "source"); + SftpInboundFileSynchronizingMessageSource source = + (SftpInboundFileSynchronizingMessageSource) TestUtils.getPropertyValue(adapter, "source"); assertNotNull(source); PollableChannel requestChannel = context.getBean("requestChannel", PollableChannel.class); assertNotNull(requestChannel.receive(2000)); diff --git a/spring-integration-sftp/src/test/java/org/springframework/integration/sftp/impl/SftpInboundRemoteFileSystemSynchronizerTests.java b/spring-integration-sftp/src/test/java/org/springframework/integration/sftp/impl/SftpInboundRemoteFileSystemSynchronizerTests.java index 376326d06c..06dab8eb18 100644 --- a/spring-integration-sftp/src/test/java/org/springframework/integration/sftp/impl/SftpInboundRemoteFileSystemSynchronizerTests.java +++ b/spring-integration-sftp/src/test/java/org/springframework/integration/sftp/impl/SftpInboundRemoteFileSystemSynchronizerTests.java @@ -28,7 +28,7 @@ import org.junit.Test; import org.springframework.core.io.FileSystemResource; import org.springframework.core.io.Resource; import org.springframework.integration.file.synchronizer.AbstractInboundFileSynchronizer.EntryAcknowledgmentStrategy; -import org.springframework.integration.sftp.inbound.SftpInboundSynchronizer; +import org.springframework.integration.sftp.inbound.SftpInboundFileSynchronizer; import org.springframework.integration.sftp.session.SftpSession; import org.springframework.integration.sftp.session.SftpSessionFactory; import org.springframework.util.ReflectionUtils; @@ -65,7 +65,7 @@ public class SftpInboundRemoteFileSystemSynchronizerTests { */ @Test public void testCopyAndRenameWhenLocalFileExists() throws Exception { - SftpInboundSynchronizer synchronizer = new SftpInboundSynchronizer(mock(SftpSessionFactory.class)); + SftpInboundFileSynchronizer synchronizer = new SftpInboundFileSynchronizer(mock(SftpSessionFactory.class)); Method method = ReflectionUtils.findMethod(synchronizer.getClass(), "copyFromRemoteToLocalDirectory", SftpSession.class, LsEntry.class, Resource.class); method.setAccessible(true); @@ -87,7 +87,7 @@ public class SftpInboundRemoteFileSystemSynchronizerTests { @org.junit.Ignore @Test public void testCopyAndRenameWhenLocalFileDoesntExist() throws Exception { - SftpInboundSynchronizer synchronizer = new SftpInboundSynchronizer(mock(SftpSessionFactory.class)); + SftpInboundFileSynchronizer synchronizer = new SftpInboundFileSynchronizer(mock(SftpSessionFactory.class)); synchronizer.setEntryAcknowledgmentStrategy(mock(EntryAcknowledgmentStrategy.class)); Method method = ReflectionUtils.findMethod(synchronizer.getClass(), "copyFromRemoteToLocalDirectory", SftpSession.class, LsEntry.class, Resource.class); diff --git a/spring-integration-sftp/src/test/java/org/springframework/integration/sftp/inbound/SftpInboundRemoteFileSystemSynchronizerTests.java b/spring-integration-sftp/src/test/java/org/springframework/integration/sftp/inbound/SftpInboundRemoteFileSystemSynchronizerTests.java index 20b9c9911a..5cd053f156 100644 --- a/spring-integration-sftp/src/test/java/org/springframework/integration/sftp/inbound/SftpInboundRemoteFileSystemSynchronizerTests.java +++ b/spring-integration-sftp/src/test/java/org/springframework/integration/sftp/inbound/SftpInboundRemoteFileSystemSynchronizerTests.java @@ -58,7 +58,7 @@ public class SftpInboundRemoteFileSystemSynchronizerTests { file.delete(); } SftpSessionFactory sessionFactory = mock(SftpSessionFactory.class); - SftpInboundSynchronizer syncronizer = new SftpInboundSynchronizer(sessionFactory); + SftpInboundFileSynchronizer syncronizer = new SftpInboundFileSynchronizer(sessionFactory); syncronizer.setRemotePath("foo/bar"); FileListFilter filter = mock(FileListFilter.class);