INT-4302: Add fileExistsMode() to Java DSL

JIRA: https://jira.spring.io/browse/INT-4302

Add `RemoteFileOutboundGatewaySpec#fileExistsMode()`
This commit is contained in:
Artem Bilan
2017-06-23 11:51:37 -04:00
committed by Gary Russell
parent 171d169748
commit 4679c9bdbe
2 changed files with 16 additions and 1 deletions

View File

@@ -62,6 +62,7 @@ import org.springframework.test.context.junit4.SpringRunner;
/**
* @author Artem Bilan
* @author Gary Russell
*
* @since 5.0
*/
@RunWith(SpringRunner.class)
@@ -170,6 +171,7 @@ public class FtpTests extends FtpTestSupport {
.handle(Ftp.outboundGateway(sessionFactory(),
AbstractRemoteFileOutboundGateway.Command.MGET, "payload")
.options(AbstractRemoteFileOutboundGateway.Option.RECURSIVE)
.fileExistsMode(FileExistsMode.IGNORE)
.filterExpression("name matches 'subFtpSource|.*1.txt'")
.localDirectoryExpression("'" + getTargetLocalDirectoryName() + "' + #remoteDirectory")
.localFilenameExpression("#remoteFileName.replaceFirst('ftpSource', 'localTarget')"))