INT-2981 - Add Rename (mv) to (S)FTP Gateway

* (S)FTP Change Commands, Options to Enums
* INT-2981 Add Support For 'mv' To File/Remote/GW
* INT-2981 (S)FTP Namespace Support and Docs
* INT-2981 Create Remote Dirs if Needed
* INT-2981 Add 'mv' Command to What's New
* INT-2981 Polishing - PR Comments
* Add javadocs to enums.
* Polish schemas to use an enumerated type for available gateway commands
This commit is contained in:
Gary Russell
2013-04-05 14:44:48 -04:00
committed by Gunnar Hillert
parent 2e2986d354
commit c224d445ac
16 changed files with 557 additions and 158 deletions

View File

@@ -327,6 +327,7 @@ protected void postProcessClientBeforeConnect(T client) throws IOException {
<listitem>get (retrieve file)</listitem>
<listitem>mget (retrieve file(s))</listitem>
<listitem>rm (remove file(s))</listitem>
<listitem>mv (move/rename file)</listitem>
</itemizedlist>
</para>
<para><emphasis>ls</emphasis></para>
@@ -397,8 +398,23 @@ protected void postProcessClientBeforeConnect(T client) throws IOException {
The remote directory is provided in the <classname>file_remoteDirectory</classname> header, and the filename is
provided in the <classname>file_remoteFile</classname> header.
</para>
<para><emphasis>mv</emphasis></para>
<para>
In each case, the PATH that these commands act on is provided by the 'expression'
The <emphasis>mv</emphasis> command has no options.
</para>
<para>
The <emphasis>expression</emphasis> attribute defines the "from" path and the
<emphasis>rename-expression</emphasis> attribute defines the "to" path. By default, the
<emphasis>rename-expression</emphasis> is <code>headers['file_renameTo']</code>. This
expression must not evaluate to null, or an empty <code>String</code>. If necessary,
any remote directories needed will be created.
The payload of the result message is <code>Boolean.TRUE</code>.
The original remote directory is provided in the <code>file_remoteDirectory</code> header, and the filename is
provided in the <code>file_remoteFile</code> header. The new path is in
the <code>file_renameTo</code> header.
</para>
<para>
For all commands, the PATH that the command acts on is provided by the 'expression'
property of the gateway. For the mget command, the expression might evaluate to '*', meaning
retrieve all files, or 'somedirectory/*' etc.
</para>

View File

@@ -360,6 +360,7 @@ xsi:schemaLocation="http://www.springframework.org/schema/integration/sftp
<listitem>get (retrieve file)</listitem>
<listitem>mget (retrieve file(s))</listitem>
<listitem>rm (remove file(s))</listitem>
<listitem>mv (move/rename file)</listitem>
</itemizedlist>
</para>
<para><emphasis>ls</emphasis></para>
@@ -430,8 +431,23 @@ xsi:schemaLocation="http://www.springframework.org/schema/integration/sftp
The remote directory is provided in the <classname>file_remoteDirectory</classname> header, and the filename is
provided in the <classname>file_remoteFile</classname> header.
</para>
<para><emphasis>mv</emphasis></para>
<para>
In each case, the PATH that these commands act on is provided by the 'expression'
The <emphasis>mv</emphasis> command has no options.
</para>
<para>
The <emphasis>expression</emphasis> attribute defines the "from" path and the
<emphasis>rename-expression</emphasis> attribute defines the "to" path. By default, the
<emphasis>rename-expression</emphasis> is <code>headers['file_renameTo']</code>. This
expression must not evaluate to null, or an empty <code>String</code>. If necessary,
any remote directories needed will be created.
The payload of the result message is <code>Boolean.TRUE</code>.
The original remote directory is provided in the <code>file_remoteDirectory</code> header, and the filename is
provided in the <code>file_remoteFile</code> header. The new path is in
the <code>file_renameTo</code> header.
</para>
<para>
For all commands, the PATH that the command acts on is provided by the 'expression'
property of the gateway. For the mget command, the expression might evaluate to '*', meaning
retrieve all files, or 'somedirectory/*' etc.
</para>

View File

@@ -78,6 +78,13 @@
URI-schemes supported by Spring Web Services. For more information see <xref linkend="outbound-uri"/>.
</para>
</section>
<section id="3.0-xFTP-gw">
<title>(S)FTP(S) Gateways</title>
<para>
The gateways now support the <code>mv</code> command, enabling the renaming of remote
files.
</para>
</section>
</section>
</chapter>