INT-1703 added support for configuring 'remote-file-separator' for FTP/SFTP

This commit is contained in:
Oleg Zhurakousky
2011-01-06 13:35:37 -05:00
parent c979dd63e7
commit f0d446617d
10 changed files with 42 additions and 0 deletions

View File

@@ -47,6 +47,7 @@ public abstract class AbstractRemoteFileInboundChannelAdapterParser extends Abst
synchronizerBuilder.addConstructorArgValue(sessionFactoryBuilder.getBeanDefinition());
IntegrationNamespaceUtils.setValueIfAttributeDefined(synchronizerBuilder, element, "remote-directory");
IntegrationNamespaceUtils.setValueIfAttributeDefined(synchronizerBuilder, element, "delete-remote-files");
IntegrationNamespaceUtils.setValueIfAttributeDefined(synchronizerBuilder, element, "remote-file-separator");
this.configureFilter(synchronizerBuilder, element, parserContext);
// build the MessageSource

View File

@@ -88,6 +88,7 @@ public class RemoteFileOutboundChannelAdapterParser extends AbstractOutboundChan
}
}
IntegrationNamespaceUtils.setValueIfAttributeDefined(handlerBuilder, element, "charset");
IntegrationNamespaceUtils.setValueIfAttributeDefined(handlerBuilder, element, "remote-file-separator");
return handlerBuilder.getBeanDefinition();
}

View File

@@ -64,6 +64,10 @@ public class FileTransferringMessageHandler extends AbstractMessageHandler {
this.sessionFactory = sessionFactory;
}
public void setRemoteFileSeparator(String remoteFileSeparator) {
Assert.hasText(remoteFileSeparator, "'remoteFileSeparator' must not be null");
this.remoteFileSeparator = remoteFileSeparator;
}
public void setRemoteDirectoryExpression(Expression remoteDirectoryExpression) {
this.directoryExpressionProcessor = new ExpressionEvaluatingMessageProcessor<String>(remoteDirectoryExpression, String.class);

View File

@@ -88,6 +88,10 @@ public abstract class AbstractInboundFileSynchronizer<F> implements InboundFileS
this.sessionFactory = sessionFactory;
}
public void setRemoteFileSeparator(String remoteFileSeparator) {
Assert.hasText(remoteFileSeparator, "'remoteFileSeparator' must not be null");
this.remoteFileSeparator = remoteFileSeparator;
}
/**
* Specify the full path to the remote directory.