camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [4/5] camel git commit: Component docs
Date Thu, 07 Jan 2016 10:01:23 GMT
Component docs


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/fb03d4f7
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/fb03d4f7
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/fb03d4f7

Branch: refs/heads/master
Commit: fb03d4f7c9d63c3429b3fc6107209255309977b1
Parents: e0de8bf
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Thu Jan 7 10:49:14 2016 +0100
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Thu Jan 7 11:01:11 2016 +0100

----------------------------------------------------------------------
 .../component/file/remote/SftpConfiguration.java   | 17 +++++++++++++----
 .../file/remote/FileToFtpTempFileNameTest.java     |  3 +--
 .../file/remote/FromFtpToBinarySampleTest.java     |  2 +-
 .../RemoteFileProduceOverruleOnlyOnceTest.java     |  5 ++---
 .../file/remote/sftp/SftpKeyFileConsumeTest.java   |  2 +-
 5 files changed, 18 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/fb03d4f7/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpConfiguration.java
----------------------------------------------------------------------
diff --git a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpConfiguration.java
b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpConfiguration.java
index 269e5b4..737ee10 100644
--- a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpConfiguration.java
+++ b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpConfiguration.java
@@ -35,14 +35,17 @@ public class SftpConfiguration extends RemoteFileConfiguration {
     private String knownHostsFile;
     @UriParam(label = "security")
     private String knownHostsUri;
+    @UriParam(label = "security")
     private byte[] knownHosts;
     @UriParam(label = "security")
     private String privateKeyFile;
     @UriParam(label = "security")
     private String privateKeyUri;
+    @UriParam(label = "security")
     private byte[] privateKey;
     @UriParam(label = "security")
     private String privateKeyPassphrase;
+    @UriParam(label = "security")
     private KeyPair keyPair;
     @UriParam(defaultValue = "no", enums = "no,yes", label = "security")
     private String strictHostKeyChecking = "no";
@@ -102,6 +105,9 @@ public class SftpConfiguration extends RemoteFileConfiguration {
         return knownHosts;
     }
 
+    /**
+     * Sets the known_hosts from the byte array, so that the SFTP endpoint can do host key
verification.
+     */
     public void setKnownHosts(byte[] knownHosts) {
         this.knownHosts = knownHosts;
     }
@@ -111,7 +117,7 @@ public class SftpConfiguration extends RemoteFileConfiguration {
     }
 
     /**
-     * Set the private key file to that the SFTP endpoint can do private key verification.
+     * Set the private key file so that the SFTP endpoint can do private key verification.
      */
     public void setPrivateKeyFile(String privateKeyFile) {
         this.privateKeyFile = privateKeyFile;
@@ -122,7 +128,7 @@ public class SftpConfiguration extends RemoteFileConfiguration {
     }
 
     /**
-     * Set the private key file (loaded from classpath by default) to that the SFTP endpoint
can do private key verification.
+     * Set the private key file (loaded from classpath by default) so that the SFTP endpoint
can do private key verification.
      */
     public void setPrivateKeyUri(String privateKeyUri) {
         this.privateKeyUri = privateKeyUri;
@@ -133,7 +139,7 @@ public class SftpConfiguration extends RemoteFileConfiguration {
     }
 
     /**
-     * Set the private key as byte[] to that the SFTP endpoint can do private key verification.
+     * Set the private key as byte[] so that the SFTP endpoint can do private key verification.
      */
     public void setPrivateKey(byte[] privateKey) {
         this.privateKey = privateKey;
@@ -144,7 +150,7 @@ public class SftpConfiguration extends RemoteFileConfiguration {
     }
 
     /**
-     * Set the private key file passphrase to that the SFTP endpoint can do private key verification.
+     * Set the private key file passphrase so that the SFTP endpoint can do private key verification.
      */
     public void setPrivateKeyPassphrase(String privateKeyFilePassphrase) {
         this.privateKeyPassphrase = privateKeyFilePassphrase;
@@ -164,6 +170,9 @@ public class SftpConfiguration extends RemoteFileConfiguration {
         return keyPair;
     }
 
+    /**
+     * Sets a key pair of the public and private key so to that the SFTP endpoint can do
public/private key verification.
+     */
     public void setKeyPair(KeyPair keyPair) {
         this.keyPair = keyPair;
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/fb03d4f7/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpTempFileNameTest.java
----------------------------------------------------------------------
diff --git a/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpTempFileNameTest.java
b/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpTempFileNameTest.java
index a4bd21d..b574de1 100644
--- a/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpTempFileNameTest.java
+++ b/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpTempFileNameTest.java
@@ -46,8 +46,7 @@ public class FileToFtpTempFileNameTest extends FtpServerTestSupport {
             @Override
             public void configure() throws Exception {
                 from("file://target/in?recursive=true")
-                    .to("ftp://admin:admin@localhost:" + getPort()
-                        + "/out/?fileName=${file:name}&tempFileName=${file:onlyname}.part&stepwise=false");
+                    .to("ftp://admin:admin@localhost:" + getPort() + "/out/?fileName=${file:name}&tempFileName=${file:onlyname}.part&stepwise=false");
             }
         };
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/fb03d4f7/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FromFtpToBinarySampleTest.java
----------------------------------------------------------------------
diff --git a/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FromFtpToBinarySampleTest.java
b/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FromFtpToBinarySampleTest.java
index 613488c..e63418c 100644
--- a/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FromFtpToBinarySampleTest.java
+++ b/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FromFtpToBinarySampleTest.java
@@ -35,7 +35,7 @@ public class FromFtpToBinarySampleTest extends CamelTestSupport {
         return new RouteBuilder() {
             public void configure() throws Exception {
                 // we use a delay of 60 minutes (eg. once pr. hour we poll the FTP server
-                long delay = 60 * 60 * 1000L;
+                long delay = 3600000;
 
                 // from the given FTP server we poll (= download) all the files
                 // from the public/reports folder as BINARY types and store this as files

http://git-wip-us.apache.org/repos/asf/camel/blob/fb03d4f7/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/RemoteFileProduceOverruleOnlyOnceTest.java
----------------------------------------------------------------------
diff --git a/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/RemoteFileProduceOverruleOnlyOnceTest.java
b/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/RemoteFileProduceOverruleOnlyOnceTest.java
index 7d7933c..04fb666 100644
--- a/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/RemoteFileProduceOverruleOnlyOnceTest.java
+++ b/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/RemoteFileProduceOverruleOnlyOnceTest.java
@@ -56,9 +56,8 @@ public class RemoteFileProduceOverruleOnlyOnceTest extends FtpServerTestSupport
             @Override
             public void configure() throws Exception {
                 from("direct:input")
-                    .to("ftp://admin:admin@localhost:" + getPort()
-                        + "/out/")
-                    .to("file://target/out", "mock:result");
+                    .to("ftp://admin:admin@localhost:" + getPort() + "/out/")
+                        .to("file://target/out", "mock:result");
             }
         };
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/fb03d4f7/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/SftpKeyFileConsumeTest.java
----------------------------------------------------------------------
diff --git a/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/SftpKeyFileConsumeTest.java
b/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/SftpKeyFileConsumeTest.java
index c2c4412..eeaff7c 100644
--- a/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/SftpKeyFileConsumeTest.java
+++ b/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/SftpKeyFileConsumeTest.java
@@ -50,7 +50,7 @@ public class SftpKeyFileConsumeTest extends SftpServerTestSupport {
             @Override
             public void configure() throws Exception {
                 from("sftp://localhost:" + getPort() + "/" + FTP_ROOT_DIR
-                    + "?username=admin&knownHostsFile=./src/test/resources/known_hosts&privateKeyFile=./src/test/resources/id_rsa&privateKeyFilePassphrase=secret&delay=10s&disconnect=true")
+                    + "?username=admin&knownHostsFile=./src/test/resources/known_hosts&privateKeyFile=./src/test/resources/id_rsa&privateKeyPassphrase=secret&delay=10s&disconnect=true")
                     .routeId("foo").noAutoStartup()
                     .to("mock:result");
             }


Mime
View raw message