INT-1614 'auto-delete-remote-files-on-sync' is now 'delete-remote-files'
This commit is contained in:
@@ -47,7 +47,7 @@ public class FtpInboundChannelAdapterParser extends AbstractPollingInboundChanne
|
||||
"org.springframework.integration.ftp.inbound.FtpInboundFileSynchronizer");
|
||||
synchronizerBuilder.addConstructorArgValue(sessionFactoryBuilder.getBeanDefinition());
|
||||
IntegrationNamespaceUtils.setValueIfAttributeDefined(synchronizerBuilder, element, "remote-directory");
|
||||
// IntegrationNamespaceUtils.setValueIfAttributeDefined(synchronizerBuilder, element, "auto-delete-remote-files-on-sync", "shouldDeleteSourceFile");
|
||||
IntegrationNamespaceUtils.setValueIfAttributeDefined(synchronizerBuilder, element, "delete-remote-files");
|
||||
String fileNamePattern = element.getAttribute("filename-pattern");
|
||||
String filter = element.getAttribute("filter");
|
||||
boolean hasFileNamePattern = StringUtils.hasText(fileNamePattern);
|
||||
|
||||
@@ -55,7 +55,14 @@
|
||||
<xsd:element ref="integration:poller" minOccurs="0" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="auto-create-directories" type="xsd:boolean"/>
|
||||
<xsd:attribute name="auto-delete-remote-files-on-sync" type="xsd:boolean"/>
|
||||
<xsd:attribute name="delete-remote-files" type="xsd:boolean">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
Specify whether to delete the remote source file after copying.
|
||||
By default, the remote files will NOT be deleted.
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="filename-pattern" type="xsd:string"/>
|
||||
<xsd:attribute name="filter" type="xsd:string">
|
||||
<xsd:annotation>
|
||||
@@ -79,7 +86,7 @@
|
||||
<xsd:annotation>
|
||||
<xsd:appinfo>
|
||||
<tool:annotation kind="ref">
|
||||
<tool:expected-type type="org.springframework.integration.ftp.client.AbstractFtpClientFactory"/>
|
||||
<tool:expected-type type="org.springframework.integration.ftp.session.AbstractFtpSessionFactory"/>
|
||||
</tool:annotation>
|
||||
</xsd:appinfo>
|
||||
</xsd:annotation>
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
local-directory="target/foo"
|
||||
remote-directory="foo/bar"
|
||||
auto-create-directories="true"
|
||||
auto-delete-remote-files-on-sync="false">
|
||||
delete-remote-files="false">
|
||||
<int:poller fixed-rate="1000"/>
|
||||
</ftp:inbound-channel-adapter>
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
local-directory="target"
|
||||
remote-directory="foo/bar"
|
||||
auto-create-directories="true"
|
||||
auto-delete-remote-files-on-sync="false">
|
||||
delete-remote-files="false">
|
||||
<int:poller fixed-rate="1000"/>
|
||||
</ftp:inbound-channel-adapter>
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
local-directory="file:target/bar"
|
||||
remote-directory="foo/bar"
|
||||
auto-create-directories="false"
|
||||
auto-delete-remote-files-on-sync="false">
|
||||
delete-remote-files="false">
|
||||
<int:poller fixed-rate="1000"/>
|
||||
</ftp:inbound-channel-adapter>
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
session-factory="ftpSessionFactory"
|
||||
charset="UTF-8"
|
||||
auto-create-directories="true"
|
||||
auto-delete-remote-files-on-sync="true"
|
||||
delete-remote-files="true"
|
||||
filename-pattern=".?txt"
|
||||
local-directory="."
|
||||
remote-directory="foo/bar">
|
||||
@@ -27,7 +27,7 @@
|
||||
session-factory="ftpSessionFactory"
|
||||
charset="UTF-8"
|
||||
auto-create-directories="true"
|
||||
auto-delete-remote-files-on-sync="true"
|
||||
delete-remote-files="true"
|
||||
filter="entryListFilter"
|
||||
local-directory="."
|
||||
remote-directory="foo/bar">
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
session-factory="ftpSessionFactory"
|
||||
charset="UTF-8"
|
||||
auto-create-directories="true"
|
||||
auto-delete-remote-files-on-sync="true"
|
||||
delete-remote-files="true"
|
||||
local-directory="."
|
||||
remote-directory="foo/bar"
|
||||
filter="entryListFilter">
|
||||
@@ -34,7 +34,7 @@
|
||||
session-factory="ftpSessionFactory"
|
||||
charset="UTF-8"
|
||||
auto-create-directories="true"
|
||||
auto-delete-remote-files-on-sync="true"
|
||||
delete-remote-files="true"
|
||||
filename-pattern=".?txt"
|
||||
local-directory="."
|
||||
remote-directory="foo/bar">
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
auto-create-directories="true"
|
||||
local-directory="file:target/foo"
|
||||
remote-directory="foo/bar"
|
||||
auto-delete-remote-files-on-sync="false">
|
||||
delete-remote-files="false">
|
||||
<int:poller fixed-rate="1000"/>
|
||||
</ftp:inbound-channel-adapter>
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ public class FtpInboundRemoteFileSystemSynchronizerTest {
|
||||
new FtpInboundFileSynchronizingMessageSource();
|
||||
|
||||
FtpInboundFileSynchronizer synchronizer = spy(new FtpInboundFileSynchronizer(ftpSessionFactory));
|
||||
synchronizer.setShouldDeleteSourceFile(true);
|
||||
synchronizer.setDeleteRemoteFiles(true);
|
||||
synchronizer.setRemoteDirectory("remote-test-dir");
|
||||
synchronizer.setFilter(new FtpPatternMatchingFileListFilter(".*\\.test$"));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user