INT-3706: Support FileExistModes in (S)FTP Gateway

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

Previously, the `mode` attribute on the (S)FTP outbound gateways was ignored.

Take account of the mode on (M)GET and (M)PUT commands.
This commit is contained in:
Gary Russell
2015-05-11 12:58:07 +01:00
committed by Artem Bilan
parent c2ee93f9e1
commit 123b38a008
8 changed files with 222 additions and 19 deletions

View File

@@ -427,11 +427,18 @@ Here is an example of a gateway configured for an ls command...
reply-channel="toSplitter"/>
----
The payload of the message sent to the toSplitter channel is a list of String objects containing the filename of each file.
The payload of the message sent to the toSplitter channel is a list of String objects containing the filename of each
file.
If the `command-options` was omitted, it would be a list of `FileInfo` objects.
Options are provided space-delimited, e.g.
`command-options="-1 -dirs -links"`.
Starting with _version 4.2_, the `GET`, `MGET`, `PUT` and `MPUT` commands support a `FileExistsMode` property (`mode`
when using the namespace support). This affects the behavior when the local file exists (`GET` and `MGET`) or the remote
file exists (`PUT` and `MPUT`). Supported modes are `REPLACE`, `APPEND`, `FAIL` and `IGNORE`.
For backwards compatibility, the default mode for `PUT` and `MPUT` operations is `REPLACE` and for `GET` and `MGET`
operations, the default is `FAIL`.
[[ftp-session-caching]]
=== FTP Session Caching

View File

@@ -497,6 +497,12 @@ If the `command-options` was omitted, it would be a list of `FileInfo` objects.
Options are provided space-delimited, e.g.
`command-options="-1 -dirs -links"`.
Starting with _version 4.2_, the `GET`, `MGET`, `PUT` and `MPUT` commands support a `FileExistsMode` property (`mode`
when using the namespace support). This affects the behavior when the local file exists (`GET` and `MGET`) or the remote
file exists (`PUT` and `MPUT`). Supported modes are `REPLACE`, `APPEND`, `FAIL` and `IGNORE`.
For backwards compatibility, the default mode for `PUT` and `MPUT` operations is `REPLACE` and for `GET` and `MGET`
operations, the default is `FAIL`.
[[sftp-jsch-logging]]
=== SFTP/JSCH Logging