git commit: CAMEL-6250: Setting id on endpoint in from may not work - added unit test which shows the issue
Updated Branches: refs/heads/master 900b9bd9c - a2f4f6c1d CAMEL-6250: Setting id on endpoint in from may not work - added unit test which shows the issue Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/a2f4f6c1 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/a2f4f6c1 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/a2f4f6c1 Branch: refs/heads/master Commit: a2f4f6c1d3312a47027b285cba89ecba820c3967 Parents: 900b9bd Author: cmueller cmuel...@apache.org Authored: Fri Jul 5 18:40:29 2013 +0200 Committer: cmueller cmuel...@apache.org Committed: Fri Jul 5 18:43:18 2013 +0200 -- .../spring/issues/EndpointIdIssueTest.java | 45 .../camel/spring/issues/EndpointIdIssueTest.xml | 33 ++ 2 files changed, 78 insertions(+) -- http://git-wip-us.apache.org/repos/asf/camel/blob/a2f4f6c1/components/camel-spring/src/test/java/org/apache/camel/spring/issues/EndpointIdIssueTest.java -- diff --git a/components/camel-spring/src/test/java/org/apache/camel/spring/issues/EndpointIdIssueTest.java b/components/camel-spring/src/test/java/org/apache/camel/spring/issues/EndpointIdIssueTest.java new file mode 100644 index 000..6f7f54c --- /dev/null +++ b/components/camel-spring/src/test/java/org/apache/camel/spring/issues/EndpointIdIssueTest.java @@ -0,0 +1,45 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the License); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.spring.issues; + +import org.apache.camel.Exchange; +import org.apache.camel.Processor; +import org.apache.camel.impl.DefaultEndpoint; +import org.apache.camel.spring.SpringTestSupport; +import org.junit.Ignore; +import org.springframework.context.support.AbstractXmlApplicationContext; +import org.springframework.context.support.ClassPathXmlApplicationContext; + +@Ignore +public class EndpointIdIssueTest extends SpringTestSupport { + +@Override +protected AbstractXmlApplicationContext createApplicationContext() { +return new ClassPathXmlApplicationContext(org/apache/camel/spring/issues/EndpointIdIssueTest.xml); +} + +public void testSpring() throws Exception { +Exchange response = template.request(direct:start, new Processor() { +public void process(Exchange exchange) throws Exception { +DefaultEndpoint fromEndpoint = (DefaultEndpoint) exchange.getFromEndpoint(); +assertEquals(myCamelFromEndpint, fromEndpoint.getId()); +} +}); + +assertNotNull(response); +} +} http://git-wip-us.apache.org/repos/asf/camel/blob/a2f4f6c1/components/camel-spring/src/test/resources/org/apache/camel/spring/issues/EndpointIdIssueTest.xml -- diff --git a/components/camel-spring/src/test/resources/org/apache/camel/spring/issues/EndpointIdIssueTest.xml b/components/camel-spring/src/test/resources/org/apache/camel/spring/issues/EndpointIdIssueTest.xml new file mode 100644 index 000..05f0890 --- /dev/null +++ b/components/camel-spring/src/test/resources/org/apache/camel/spring/issues/EndpointIdIssueTest.xml @@ -0,0 +1,33 @@ +?xml version=1.0 encoding=UTF-8? +!-- +Licensed to the Apache Software Foundation (ASF) under one or more +contributor license agreements. See the NOTICE file distributed with +this work for additional information regarding copyright ownership. +The ASF licenses this file to You under the Apache License, Version 2.0 +(the License); you may not use this file except in compliance with +the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an AS IS BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License.
git commit: CAMEL-6266: Support for SFTP through a proxy Thanks to Joakim Ek for the patch
Updated Branches: refs/heads/master a2f4f6c1d - 3ff26cdc4 CAMEL-6266: Support for SFTP through a proxy Thanks to Joakim Ek for the patch Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/3ff26cdc Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/3ff26cdc Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/3ff26cdc Branch: refs/heads/master Commit: 3ff26cdc42ff545dd990adc9cff2c4a4a0287b92 Parents: a2f4f6c Author: cmueller cmuel...@apache.org Authored: Fri Jul 5 19:16:41 2013 +0200 Committer: cmueller cmuel...@apache.org Committed: Fri Jul 5 19:16:41 2013 +0200 -- components/camel-ftp/pom.xml| 7 ++ .../component/file/remote/SftpEndpoint.java | 9 +- .../component/file/remote/SftpOperations.java | 15 +++ .../sftp/SftpSimpleConsumeThroughProxyTest.java | 89 + .../sftp/SftpSimpleProduceThroughProxyTest.java | 125 +++ 5 files changed, 244 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/3ff26cdc/components/camel-ftp/pom.xml -- diff --git a/components/camel-ftp/pom.xml b/components/camel-ftp/pom.xml index 305613c..62393d5 100644 --- a/components/camel-ftp/pom.xml +++ b/components/camel-ftp/pom.xml @@ -96,6 +96,13 @@ version${sshd-version}/version scopetest/scope /dependency +!-- for testing sftp through http proxy -- +dependency + groupIdorg.littleshoot/groupId + artifactIdlittleproxy/artifactId + version0.4/version + scopetest/scope +/dependency !-- needed for sftp server -- dependency groupIdorg.bouncycastle/groupId http://git-wip-us.apache.org/repos/asf/camel/blob/3ff26cdc/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpEndpoint.java -- diff --git a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpEndpoint.java b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpEndpoint.java index b2b62ae..257e240 100644 --- a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpEndpoint.java +++ b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpEndpoint.java @@ -17,6 +17,7 @@ package org.apache.camel.component.file.remote; import com.jcraft.jsch.ChannelSftp; +import com.jcraft.jsch.Proxy; import org.apache.camel.Processor; import org.apache.camel.component.file.GenericFileProducer; @@ -25,6 +26,8 @@ import org.apache.camel.component.file.GenericFileProducer; */ public class SftpEndpoint extends RemoteFileEndpointChannelSftp.LsEntry { +Proxy proxy; + public SftpEndpoint() { } @@ -47,7 +50,7 @@ public class SftpEndpoint extends RemoteFileEndpointChannelSftp.LsEntry { } public RemoteFileOperationsChannelSftp.LsEntry createRemoteFileOperations() { -SftpOperations operations = new SftpOperations(); +SftpOperations operations = new SftpOperations(proxy); operations.setEndpoint(this); return operations; } @@ -56,4 +59,8 @@ public class SftpEndpoint extends RemoteFileEndpointChannelSftp.LsEntry { public String getScheme() { return sftp; } + +public void setProxy(Proxy proxy) { +this.proxy = proxy; +} } http://git-wip-us.apache.org/repos/asf/camel/blob/3ff26cdc/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpOperations.java -- diff --git a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpOperations.java b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpOperations.java index cdf6e05..f3e4c39 100644 --- a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpOperations.java +++ b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpOperations.java @@ -38,6 +38,7 @@ import java.util.regex.Pattern; import com.jcraft.jsch.ChannelSftp; import com.jcraft.jsch.JSch; import com.jcraft.jsch.JSchException; +import com.jcraft.jsch.Proxy; import com.jcraft.jsch.Session; import com.jcraft.jsch.SftpException; import com.jcraft.jsch.UIKeyboardInteractive; @@ -68,10 +69,18 @@ import static org.apache.camel.util.ObjectHelper.isNotEmpty; public class SftpOperations implements RemoteFileOperationsChannelSftp.LsEntry { private static final transient Logger LOG = LoggerFactory.getLogger(SftpOperations.class); private static final Pattern UP_DIR_PATTERN = Pattern.compile(/[^/]+); +private Proxy proxy; private SftpEndpoint endpoint;
[CONF] Apache Camel Download
Download Page edited by Christian Mueller Changes (1) ... h3. Keys The {{KEYS}} used to sign the release can be found [here|https://www.apache.org/dist/camel/apache-camel/KEYS]. h3. Getting the Binaries using Maven 2 ... Full Content Latest Releases Grab these releases while they are hot! The latest release for Camel 2.11.x is Camel 2.11.0 Release. The latest release for Camel 2.10.x is Camel 2.10.5 Release. The latest release for Camel 2.9.x is Camel 2.9.7 Release. Support for Camel 2.8.x and previous releases is discontinued. Older Releases See Download Archives Getting the latest distributions The URLs below use redirectionThe above URLs use the Apache Mirror system to redirect you to a suitable mirror for your download. Some users have experienced issues with some versions of browsers (e.g. some Safari browsers). If the download doesn't seem to work for you from the above URL then try using Mozilla Firefox Binary Distribution Description Download Link PGP Signature file of download MD5 Checksum file of download SHA1 Checksum file of download Windows Distribution apache-camel-2.11.0.zip apache-camel-2.11.0.zip.asc apache-camel-2.11.0.zip.md5 apache-camel-2.11.0.zip.sha1 Unix/Linux/Cygwin Distribution apache-camel-2.11.0.tar.gz apache-camel-2.11.0.tar.gz.asc apache-camel-2.10.5.tar.gz.md5 apache-camel-2.11.0.tar.gz.sha1 Windows Distribution apache-camel-2.10.5.zip apache-camel-2.10.5.zip.asc apache-camel-2.10.5.zip.md5 apache-camel-2.10.5.zip.sha1 Unix/Linux/Cygwin Distribution apache-camel-2.10.5.tar.gz apache-camel-2.10.5.tar.gz.asc apache-camel-2.10.5.tar.gz.md5 apache-camel-2.10.5.tar.gz.sha1 Windows Distribution (2.9.x branch) apache-camel-2.9.7.zip apache-camel-2.9.7.zip.asc apache-camel-2.9.7.zip.md5 apache-camel-2.9.7.zip.sha1 Unix/Linux/Cygwin Distribution (2.9.x branch) apache-camel-2.9.7.tar.gz apache-camel-2.9.7.tar.gz.asc apache-camel-2.9.7.tar.gz.md5 apache-camel-2.9.7.tar.gz.sha1 Source Distribution Description Download Link PGP Signature file of download MD5 Checksum file of download SHA1 Checksum file of download Source (zip - 2.11.x branch) apache-camel-2.11.0-src.zip apache-camel-2.11.0-src.zip.asc apache-camel-2.11.0-src.zip.md5 apache-camel-2.11.0-src.zip.sha1 Source (zip - 2.10.x branch) apache-camel-2.10.5-src.zip apache-camel-2.10.5-src.zip.asc apache-camel-2.10.5-src.zip.md5 apache-camel-2.10.5-src.zip.sha1 Source (zip - 2.9.x branch) apache-camel-2.9.7-src.zip apache-camel-2.9.7-src.zip.asc apache-camel-2.9.7-src.zip.md5 apache-camel-2.9.7-src.zip.sha1 Keys The KEYS used to sign the release can be found here. Getting the Binaries using Maven 2 To use this release in your maven project, the proper dependency configuration that you should use in your Maven POM is: dependency groupIdorg.apache.camel/groupId artifactIdcamel-core/artifactId version2.11.0/version /dependency Getting past releases See the Download Archives for all time releases. Releases In Progress The following releases are currently in progress Camel 2.12.0 ReleaseCamel x.y.z Release (template) Snapshots Help us test the latest SNAPSHOTS Version Download Apache Camel 2.12-SNAPSHOT Download Apache Camel 2.11.1-SNAPSHOT Download Apache Camel 2.10.5-SNAPSHOT The camel-1.x branch is no longer maintained therefore snapshots for that branch are not available. Maven 2 Repositories Repository URL Apache Camel Releases https://repository.apache.org/content/repositories/releases/ Apache Camel Releases (old) For Camel 1.6.0 or older releases: http://people.apache.org/repo/m2-ibiblio-rsync-repository/ Apache Camel SNAPSHOTS https://repository.apache.org/content/repositories/snapshots/ Maven 2 snapshot repository in pom Camel In your pom.xml file you can add the Maven 2 snapshot repository if you want to try out the xxx-SNAPSHOT versions: repository idapache.snapshots/id nameApache Development Snapshot Repository/name urlhttps://repository.apache.org/content/repositories/snapshots//url releases enabledfalse/enabled /releases snapshots enabledtrue/enabled /snapshots /repository Then you can use the SNAPSHOT version of camel in your pom.xml: dependency groupIdorg.apache.camel/groupId artifactIdcamel-core/artifactId version2.12-SNAPSHOT/version /dependency Camel Plugins And the same setting for the plugin repository if you want to try the latest Apache Camel maven tools also: pluginRepository idapache.snapshots/id nameApache Development Snapshot Repository/name
git commit: CAMEL-6266: Support for SFTP through a proxy Thanks to Joakim Ek for the patch
Updated Branches: refs/heads/camel-2.11.x 2b1f4de98 - 4335b82aa CAMEL-6266: Support for SFTP through a proxy Thanks to Joakim Ek for the patch Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/4335b82a Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/4335b82a Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/4335b82a Branch: refs/heads/camel-2.11.x Commit: 4335b82aa28dc922533d1567de3a4159093d6a75 Parents: 2b1f4de Author: cmueller cmuel...@apache.org Authored: Fri Jul 5 19:16:41 2013 +0200 Committer: cmueller cmuel...@apache.org Committed: Fri Jul 5 19:17:52 2013 +0200 -- components/camel-ftp/pom.xml| 7 ++ .../component/file/remote/SftpEndpoint.java | 9 +- .../component/file/remote/SftpOperations.java | 15 +++ .../sftp/SftpSimpleConsumeThroughProxyTest.java | 89 + .../sftp/SftpSimpleProduceThroughProxyTest.java | 125 +++ 5 files changed, 244 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/4335b82a/components/camel-ftp/pom.xml -- diff --git a/components/camel-ftp/pom.xml b/components/camel-ftp/pom.xml index eda51d1..9ac2eee 100644 --- a/components/camel-ftp/pom.xml +++ b/components/camel-ftp/pom.xml @@ -96,6 +96,13 @@ version${sshd-version}/version scopetest/scope /dependency +!-- for testing sftp through http proxy -- +dependency + groupIdorg.littleshoot/groupId + artifactIdlittleproxy/artifactId + version0.4/version + scopetest/scope +/dependency !-- needed for sftp server -- dependency groupIdorg.bouncycastle/groupId http://git-wip-us.apache.org/repos/asf/camel/blob/4335b82a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpEndpoint.java -- diff --git a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpEndpoint.java b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpEndpoint.java index b2b62ae..257e240 100644 --- a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpEndpoint.java +++ b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpEndpoint.java @@ -17,6 +17,7 @@ package org.apache.camel.component.file.remote; import com.jcraft.jsch.ChannelSftp; +import com.jcraft.jsch.Proxy; import org.apache.camel.Processor; import org.apache.camel.component.file.GenericFileProducer; @@ -25,6 +26,8 @@ import org.apache.camel.component.file.GenericFileProducer; */ public class SftpEndpoint extends RemoteFileEndpointChannelSftp.LsEntry { +Proxy proxy; + public SftpEndpoint() { } @@ -47,7 +50,7 @@ public class SftpEndpoint extends RemoteFileEndpointChannelSftp.LsEntry { } public RemoteFileOperationsChannelSftp.LsEntry createRemoteFileOperations() { -SftpOperations operations = new SftpOperations(); +SftpOperations operations = new SftpOperations(proxy); operations.setEndpoint(this); return operations; } @@ -56,4 +59,8 @@ public class SftpEndpoint extends RemoteFileEndpointChannelSftp.LsEntry { public String getScheme() { return sftp; } + +public void setProxy(Proxy proxy) { +this.proxy = proxy; +} } http://git-wip-us.apache.org/repos/asf/camel/blob/4335b82a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpOperations.java -- diff --git a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpOperations.java b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpOperations.java index a7ad773..0ba6a7f 100644 --- a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpOperations.java +++ b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpOperations.java @@ -33,6 +33,7 @@ import java.util.regex.Pattern; import com.jcraft.jsch.ChannelSftp; import com.jcraft.jsch.JSch; import com.jcraft.jsch.JSchException; +import com.jcraft.jsch.Proxy; import com.jcraft.jsch.Session; import com.jcraft.jsch.SftpException; import com.jcraft.jsch.UIKeyboardInteractive; @@ -63,10 +64,18 @@ import static org.apache.camel.util.ObjectHelper.isNotEmpty; public class SftpOperations implements RemoteFileOperationsChannelSftp.LsEntry { private static final transient Logger LOG = LoggerFactory.getLogger(SftpOperations.class); private static final Pattern UP_DIR_PATTERN = Pattern.compile(/[^/]+); +private Proxy proxy; private SftpEndpoint
git commit: CAMEL-6266: Support for SFTP through a proxy Thanks to Joakim Ek for the patch
Updated Branches: refs/heads/camel-2.10.x ad1824a5f - 1d6d1fb86 CAMEL-6266: Support for SFTP through a proxy Thanks to Joakim Ek for the patch Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/1d6d1fb8 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/1d6d1fb8 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/1d6d1fb8 Branch: refs/heads/camel-2.10.x Commit: 1d6d1fb8642157b44c0e4c18da6f43d6c027bd1d Parents: ad1824a Author: cmueller cmuel...@apache.org Authored: Fri Jul 5 19:16:41 2013 +0200 Committer: cmueller cmuel...@apache.org Committed: Fri Jul 5 19:27:52 2013 +0200 -- components/camel-ftp/pom.xml| 7 ++ .../component/file/remote/SftpEndpoint.java | 9 +- .../component/file/remote/SftpOperations.java | 15 +++ .../sftp/SftpSimpleConsumeThroughProxyTest.java | 89 + .../sftp/SftpSimpleProduceThroughProxyTest.java | 125 +++ 5 files changed, 244 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/1d6d1fb8/components/camel-ftp/pom.xml -- diff --git a/components/camel-ftp/pom.xml b/components/camel-ftp/pom.xml index 87b53cb..a85abc2 100644 --- a/components/camel-ftp/pom.xml +++ b/components/camel-ftp/pom.xml @@ -93,6 +93,13 @@ version${sshd-version}/version scopetest/scope /dependency +!-- for testing sftp through http proxy -- +dependency + groupIdorg.littleshoot/groupId + artifactIdlittleproxy/artifactId + version0.4/version + scopetest/scope +/dependency !-- needed for sftp server -- dependency groupIdorg.bouncycastle/groupId http://git-wip-us.apache.org/repos/asf/camel/blob/1d6d1fb8/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpEndpoint.java -- diff --git a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpEndpoint.java b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpEndpoint.java index b2b62ae..257e240 100644 --- a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpEndpoint.java +++ b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpEndpoint.java @@ -17,6 +17,7 @@ package org.apache.camel.component.file.remote; import com.jcraft.jsch.ChannelSftp; +import com.jcraft.jsch.Proxy; import org.apache.camel.Processor; import org.apache.camel.component.file.GenericFileProducer; @@ -25,6 +26,8 @@ import org.apache.camel.component.file.GenericFileProducer; */ public class SftpEndpoint extends RemoteFileEndpointChannelSftp.LsEntry { +Proxy proxy; + public SftpEndpoint() { } @@ -47,7 +50,7 @@ public class SftpEndpoint extends RemoteFileEndpointChannelSftp.LsEntry { } public RemoteFileOperationsChannelSftp.LsEntry createRemoteFileOperations() { -SftpOperations operations = new SftpOperations(); +SftpOperations operations = new SftpOperations(proxy); operations.setEndpoint(this); return operations; } @@ -56,4 +59,8 @@ public class SftpEndpoint extends RemoteFileEndpointChannelSftp.LsEntry { public String getScheme() { return sftp; } + +public void setProxy(Proxy proxy) { +this.proxy = proxy; +} } http://git-wip-us.apache.org/repos/asf/camel/blob/1d6d1fb8/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpOperations.java -- diff --git a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpOperations.java b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpOperations.java index 43c391f..4de94e8 100644 --- a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpOperations.java +++ b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpOperations.java @@ -32,6 +32,7 @@ import java.util.regex.Pattern; import com.jcraft.jsch.ChannelSftp; import com.jcraft.jsch.JSch; import com.jcraft.jsch.JSchException; +import com.jcraft.jsch.Proxy; import com.jcraft.jsch.Session; import com.jcraft.jsch.SftpException; import com.jcraft.jsch.UIKeyboardInteractive; @@ -58,10 +59,18 @@ import static org.apache.camel.util.ObjectHelper.isNotEmpty; public class SftpOperations implements RemoteFileOperationsChannelSftp.LsEntry { private static final transient Logger LOG = LoggerFactory.getLogger(SftpOperations.class); private static final Pattern UP_DIR_PATTERN = Pattern.compile(/[^/]+); +private Proxy proxy; private SftpEndpoint
[CONF] Apache Camel FTP2
FTP2 Page edited by Christian Mueller Changes (2) ... | {{ftpClient.keyStore.keyPassword}} | {{null}} | *FTPS Only:* Sets the private key password. | | {{sslContextParameters}} | {{null}} | *FTPS Only:* *Camel 2.9:* Reference to a {{org.apache.camel.util.jsse.SSLContextParameters}} in the [Registry|http://camel.apache.org/registry.html].nbsp; This reference overrides any configured SSL related options on ftpClient as well as the securityProtocol (SSL, TLS, etc.) set on FtpsConfiguration.nbsp; See [Using the JSSE Configuration Utility|CAMEL:Camel Configuration Utilities]. | | {{proxy}} | {{null}} | *SFTP Only:* *Camel 2.10.7, 2.11.1:* Reference to a {{com.jcraft.jsch.Proxy}} in the [Registry|http://camel.apache.org/registry.html].nbsp; This proxy used to consume/send messages from the target SFTP host.nbsp;| {div} ... {snippet:id=example|lang=xml|url="" h3. Using a proxy with SFTP To use an HTTP proxy to connect to your remote host, you can configure your route in the following way: {code:xml} !-- define our sorter as a plain spring bean -- bean id=proxy class=com.jcraft.jsch.ProxyHTTP constructor-arg value=localhost/ constructor-arg value=/ /bean route from uri=sftp://localhost:/root?username=adminpassword=adminproxy=#proxy/ to uri=bean:processFile/ /route {code} You can also assign a user name and password to the proxy, if necessary. Please consult the documentation for {{com.jcraft.jsch.Proxy}} to discover all options. h3. Debug logging ... Full Content FTP/SFTP/FTPS Component This component provides access to remote file systems over the FTP and SFTP protocols. Maven users will need to add the following dependency to their pom.xml for this component: dependency groupIdorg.apache.camel/groupId artifactIdcamel-ftp/artifactId versionx.x.x/version !-- use the same version as your Camel core version -- /dependency More optionsSee File for more options as all the options from File is inherited. Consuming from remote FTP serverMake sure you read the section titled Default when consuming files further below for details related to consuming files. URI format ftp://[username@]hostname[:port]/directoryname[?options] sftp://[username@]hostname[:port]/directoryname[?options] ftps://[username@]hostname[:port]/directoryname[?options] Where directoryname represents the underlying directory. Can contain nested folders. If no username is provided, then anonymous login is attempted using no password. If no port number is provided, Camel will provide default values according to the protocol (ftp = 21, sftp = 22, ftps = ). You can append query options to the URI in the following format, ?option=valueoption=value... This component uses two different libraries for the actual FTP work. FTP and FTPS uses Apache Commons Net while SFTP uses JCraft JSCH. The FTPS component is only available in Camel 2.2 or newer. FTPS (also known as FTP Secure) is an extension to FTP that adds support for the Transport Layer Security (TLS) and the Secure Sockets Layer (SSL) cryptographic protocols. URI Options The options below are exclusive for the FTP component. More optionsSee File for more options as all the options from File is inherited. Name Default Value Description username null Specifies the username to use to log in to the remote file systen. password null Specifies the password to use to log in to the remote file system. binary false Specifies the file transfer mode, BINARY or ASCII. Default is ASCII (false). disconnect false Camel 2.2: Whether or not to disconnect from remote FTP server right after use. Can be used for both consumer and producer. Disconnect will only disconnect the current connection to the FTP server. If you have a consumer which you want to stop, then you need to stop the consumer/route instead. localWorkDirectory null When consuming, a local work directory can be used to store the remote file content directly in local files, to avoid loading the content into memory. This is beneficial, if you consume a very big remote file and thus can conserve memory. See below for more details. passiveMode false FTP and FTPS only: Specifies whether to use passive mode connections. Default is active mode (false). securityProtocol TLS FTPS only: Sets the underlying security protocol. The following values are defined: TLS: Transport Layer Security SSL: Secure Sockets Layer disableSecureDataChannelDefaults false Camel 2.4: FTPS only: Whether or not to disable using default values for execPbsz and execProt when using secure data transfer. You can set this option to true if you
[2/2] git commit: fix CS
fix CS Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/7251ab5a Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/7251ab5a Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/7251ab5a Branch: refs/heads/master Commit: 7251ab5a57889699d86a6c27227a72543c804ad4 Parents: 0c71622 Author: Jonathan Anstey jans...@gmail.com Authored: Fri Jul 5 15:22:34 2013 -0230 Committer: Jonathan Anstey jans...@gmail.com Committed: Fri Jul 5 15:22:34 2013 -0230 -- .../java/org/apache/camel/component/yammer/model/Contact.java| 4 +--- .../java/org/apache/camel/component/yammer/model/Settings.java | 3 +-- .../main/java/org/apache/camel/component/yammer/model/User.java | 3 +-- 3 files changed, 3 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/7251ab5a/components/camel-yammer/src/main/java/org/apache/camel/component/yammer/model/Contact.java -- diff --git a/components/camel-yammer/src/main/java/org/apache/camel/component/yammer/model/Contact.java b/components/camel-yammer/src/main/java/org/apache/camel/component/yammer/model/Contact.java index 0296e0a..c9c357f 100644 --- a/components/camel-yammer/src/main/java/org/apache/camel/component/yammer/model/Contact.java +++ b/components/camel-yammer/src/main/java/org/apache/camel/component/yammer/model/Contact.java @@ -1,4 +1,3 @@ - /** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -18,9 +17,8 @@ package org.apache.camel.component.yammer.model; import java.util.List; -import org.codehaus.jackson.annotate.JsonProperty; - import org.codehaus.jackson.annotate.JsonIgnoreProperties; +import org.codehaus.jackson.annotate.JsonProperty; @JsonIgnoreProperties(ignoreUnknown = true) public class Contact { http://git-wip-us.apache.org/repos/asf/camel/blob/7251ab5a/components/camel-yammer/src/main/java/org/apache/camel/component/yammer/model/Settings.java -- diff --git a/components/camel-yammer/src/main/java/org/apache/camel/component/yammer/model/Settings.java b/components/camel-yammer/src/main/java/org/apache/camel/component/yammer/model/Settings.java index 3005367..371b022 100644 --- a/components/camel-yammer/src/main/java/org/apache/camel/component/yammer/model/Settings.java +++ b/components/camel-yammer/src/main/java/org/apache/camel/component/yammer/model/Settings.java @@ -16,9 +16,8 @@ */ package org.apache.camel.component.yammer.model; -import org.codehaus.jackson.annotate.JsonProperty; - import org.codehaus.jackson.annotate.JsonIgnoreProperties; +import org.codehaus.jackson.annotate.JsonProperty; @JsonIgnoreProperties(ignoreUnknown = true) public class Settings { http://git-wip-us.apache.org/repos/asf/camel/blob/7251ab5a/components/camel-yammer/src/main/java/org/apache/camel/component/yammer/model/User.java -- diff --git a/components/camel-yammer/src/main/java/org/apache/camel/component/yammer/model/User.java b/components/camel-yammer/src/main/java/org/apache/camel/component/yammer/model/User.java index 13fb42e..676ec98 100644 --- a/components/camel-yammer/src/main/java/org/apache/camel/component/yammer/model/User.java +++ b/components/camel-yammer/src/main/java/org/apache/camel/component/yammer/model/User.java @@ -17,9 +17,8 @@ package org.apache.camel.component.yammer.model; import java.util.List; -import org.codehaus.jackson.annotate.JsonProperty; - import org.codehaus.jackson.annotate.JsonIgnoreProperties; +import org.codehaus.jackson.annotate.JsonProperty; @JsonIgnoreProperties(ignoreUnknown = true) public class User {
[1/2] git commit: CAMEL-6493 - add support for yammer user API
Updated Branches: refs/heads/master 3ff26cdc4 - 7251ab5a5 CAMEL-6493 - add support for yammer user API Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/0c716220 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/0c716220 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/0c716220 Branch: refs/heads/master Commit: 0c716220aa1b46c80c2296845f166f0385fd72bc Parents: 3ff26cd Author: Jonathan Anstey jans...@gmail.com Authored: Fri Jul 5 15:20:41 2013 -0230 Committer: Jonathan Anstey jans...@gmail.com Committed: Fri Jul 5 15:20:47 2013 -0230 -- .../component/yammer/YammerConfiguration.java | 67 +--- .../camel/component/yammer/YammerEndpoint.java | 16 +- .../component/yammer/YammerFunctionType.java| 3 +- .../yammer/YammerMessagePollingConsumer.java| 75 +++- .../yammer/YammerUserPollingConsumer.java | 100 + .../camel/component/yammer/model/Contact.java | 73 .../component/yammer/model/EmailAddress.java| 43 ++ .../apache/camel/component/yammer/model/Im.java | 48 +++ .../camel/component/yammer/model/Settings.java | 42 ++ .../camel/component/yammer/model/Stats.java | 57 +++ .../camel/component/yammer/model/User.java | 391 +++ .../component/yammer/YammerComponentTest.java | 51 --- .../yammer/YammerMessageRouteTest.java | 51 +++ .../YammerMessagesConsumerOptionTest.java | 2 +- .../component/yammer/YammerUserRouteTest.java | 59 +++ .../camel-yammer/src/test/resources/users.json | 70 16 files changed, 1027 insertions(+), 121 deletions(-) -- http://git-wip-us.apache.org/repos/asf/camel/blob/0c716220/components/camel-yammer/src/main/java/org/apache/camel/component/yammer/YammerConfiguration.java -- diff --git a/components/camel-yammer/src/main/java/org/apache/camel/component/yammer/YammerConfiguration.java b/components/camel-yammer/src/main/java/org/apache/camel/component/yammer/YammerConfiguration.java index f758c37..92adb21 100644 --- a/components/camel-yammer/src/main/java/org/apache/camel/component/yammer/YammerConfiguration.java +++ b/components/camel-yammer/src/main/java/org/apache/camel/component/yammer/YammerConfiguration.java @@ -18,7 +18,6 @@ package org.apache.camel.component.yammer; import org.apache.camel.spi.UriParam; import org.apache.camel.spi.UriParams; -import org.apache.camel.util.ObjectHelper; @UriParams public class YammerConfiguration { @@ -92,68 +91,6 @@ public class YammerConfiguration { this.function = function; } -public String getApiUrl() throws Exception { -StringBuilder url = new StringBuilder(); - -switch (YammerFunctionType.fromUri(function)) { -case MESSAGES: -url.append(YammerConstants.YAMMER_BASE_API_URL); -url.append(function); -url.append(.json); -break; -case ALGO: -case FOLLOWING: -case MY_FEED: -case PRIVATE: -case SENT: -url.append(YammerConstants.YAMMER_BASE_API_URL); -url.append(messages/); -url.append(function); -url.append(.json); -break; -default: -throw new Exception(String.format(%s is not a valid Yammer function type., function)); -} - -StringBuilder args = new StringBuilder(); - -if (limit 0) { -args.append(limit=); -args.append(limit); -} - -if (getOlderThan() 0) { -if (args.length() 0) { -args.append(); -} -args.append(older_than=); -args.append(getOlderThan()); -} - -if (getNewerThan() 0) { -if (args.length() 0) { -args.append(); -} -args.append(newer_than=); -args.append(getNewerThan()); -} - -if (ObjectHelper.isNotEmpty(getThreaded()) - (true.equals(getThreaded()) || extended.equals(getThreaded( { -if (args.length() 0) { -args.append(); -} -args.append(threaded=); -args.append(getThreaded()); -} - -if (args.length() 0) { -url.append(?); -url.append(args); -} - -return url.toString(); -} public boolean isUseJson() { return useJson; @@ -163,9 +100,9 @@ public class YammerConfiguration { this.useJson = useJson; } -public ApiRequestor getRequestor() throws Exception { +public ApiRequestor getRequestor(String apiUrl)
[CONF] Apache Camel FTP2
FTP2 Page edited by Christian Mueller Changes (1) ... | {{ftpClient.keyStore.keyPassword}} | {{null}} | *FTPS Only:* Sets the private key password. | | {{sslContextParameters}} | {{null}} | *FTPS Only:* *Camel 2.9:* Reference to a {{org.apache.camel.util.jsse.SSLContextParameters}} in the [Registry|http://camel.apache.org/registry.html].nbsp; This reference overrides any configured SSL related options on ftpClient as well as the securityProtocol (SSL, TLS, etc.) set on FtpsConfiguration.nbsp; See [Using the JSSE Configuration Utility|CAMEL:Camel Configuration Utilities]. | | {{proxy}} | {{null}} | *SFTP Only:* *Camel 2.10.7, 2.11.1:* Reference to a {{com.jcraft.jsch.Proxy}} in the [Registry|http://camel.apache.org/registry.html].nbsp; This proxy is used to consume/send messages from the target SFTP host.nbsp;| {div} ... Full Content FTP/SFTP/FTPS Component This component provides access to remote file systems over the FTP and SFTP protocols. Maven users will need to add the following dependency to their pom.xml for this component: dependency groupIdorg.apache.camel/groupId artifactIdcamel-ftp/artifactId versionx.x.x/version !-- use the same version as your Camel core version -- /dependency More optionsSee File for more options as all the options from File is inherited. Consuming from remote FTP serverMake sure you read the section titled Default when consuming files further below for details related to consuming files. URI format ftp://[username@]hostname[:port]/directoryname[?options] sftp://[username@]hostname[:port]/directoryname[?options] ftps://[username@]hostname[:port]/directoryname[?options] Where directoryname represents the underlying directory. Can contain nested folders. If no username is provided, then anonymous login is attempted using no password. If no port number is provided, Camel will provide default values according to the protocol (ftp = 21, sftp = 22, ftps = ). You can append query options to the URI in the following format, ?option=valueoption=value... This component uses two different libraries for the actual FTP work. FTP and FTPS uses Apache Commons Net while SFTP uses JCraft JSCH. The FTPS component is only available in Camel 2.2 or newer. FTPS (also known as FTP Secure) is an extension to FTP that adds support for the Transport Layer Security (TLS) and the Secure Sockets Layer (SSL) cryptographic protocols. URI Options The options below are exclusive for the FTP component. More optionsSee File for more options as all the options from File is inherited. Name Default Value Description username null Specifies the username to use to log in to the remote file systen. password null Specifies the password to use to log in to the remote file system. binary false Specifies the file transfer mode, BINARY or ASCII. Default is ASCII (false). disconnect false Camel 2.2: Whether or not to disconnect from remote FTP server right after use. Can be used for both consumer and producer. Disconnect will only disconnect the current connection to the FTP server. If you have a consumer which you want to stop, then you need to stop the consumer/route instead. localWorkDirectory null When consuming, a local work directory can be used to store the remote file content directly in local files, to avoid loading the content into memory. This is beneficial, if you consume a very big remote file and thus can conserve memory. See below for more details. passiveMode false FTP and FTPS only: Specifies whether to use passive mode connections. Default is active mode (false). securityProtocol TLS FTPS only: Sets the underlying security protocol. The following values are defined: TLS: Transport Layer Security SSL: Secure Sockets Layer disableSecureDataChannelDefaults false Camel 2.4: FTPS only: Whether or not to disable using default values for execPbsz and execProt when using secure data transfer. You can set this option to true if you want to be in absolute full control what the options execPbsz and execProt should be used. download true Camel 2.11: Whether the FTP consumer should download the file. If this option is set to false, then the message body will be null, but the consumer will still trigger a Camel Exchange that has details about the file such as file name, file size, etc. It's just that the file will not be downloaded. streamDownload false Camel 2.11:Whether the consumer should download the entire file up front, the default behavior, or if it should pass an InputStreamread from the remote resource rather than an in-memory array as the in body of theCamelExchange. This option is ignored if downloadis
[CONF] Apache Camel ICal
ICal Page added by Christian Mueller ICal DataFormat Available as of Camel 2.12 The ICal dataformat is used for working with iCalendar messages. A typical iCalendar message looks like: BEGIN:VCALENDAR VERSION:2.0 PRODID:-//Events Calendar//iCal4j 1.0//EN CALSCALE:GREGORIAN BEGIN:VEVENT DTSTAMP:20130324T18Z DTSTART:20130401T17 DTEND:20130401T21 SUMMARY:Progress Meeting TZID:America/New_York UID: ATTENDEE;ROLE=REQ-PARTICIPANT;CN=Developer 1:mailto:d...@mycompany.com ATTENDEE;ROLE=OPT-PARTICIPANT;CN=Developer 2:mailto:d...@mycompany.com END:VEVENT END:VCALENDAR Basic Usage To unmarshal and marshal the message shown above, your route will look like the following: from("direct:ical-unmarshal") .unmarshal("ical") .to("mock:unmarshaled") .marshal("ical") .to("mock:marshaled"); Maven users will need to add the following dependency to their pom.xml for this component: dependency groupIdorg.apache.camel/groupId artifactIdcamel-ical/artifactId versionx.x.x/version !-- use the same version as your Camel core version -- /dependency See Also Configuring Camel Component Endpoint Getting Started Stop watching space | Change email notification preferences View Online | Add Comment
[CONF] Apache Camel Data Format List
Data Format List Page edited by Christian Mueller Changes (1) ... ** [TidyMarkup] ** [SysLog] ** [ICal] Full Content Standard JVM object marshalling Serialization String Object marshalling Avro JSON Protobuf Object/XML marshalling Castor JAXB XmlBeans XStream JiBX Object/XML/Webservice marshalling SOAP Direct JSON / XML marshalling XmlJson Flat data structure marshalling BeanIO Bindy CSV EDI Flatpack DataFormat Domain specific marshalling HL7 DataFormat Compression GZip data format Zip DataFormat Zip File DataFormat Security Crypto PGP XMLSecurity DataFormat Misc. Base64 Custom DataFormat - to use your own custom implementation RSS TidyMarkup Syslog ICal Stop watching space | Change email notification preferences View Online | View Changes | Add Comment
[CONF] Apache Camel ICal
ICal Page edited by Christian Mueller Changes (1) h2. ICal DataFormat *Available as of Camel 2.12* 2.11.1* The *ICal* dataformat is used for working with [iCalendar|http://en.wikipedia.org/wiki/ICalendar] messages. ... Full Content ICal DataFormat Available as of Camel 2.11.1 The ICal dataformat is used for working with iCalendar messages. A typical iCalendar message looks like: BEGIN:VCALENDAR VERSION:2.0 PRODID:-//Events Calendar//iCal4j 1.0//EN CALSCALE:GREGORIAN BEGIN:VEVENT DTSTAMP:20130324T18Z DTSTART:20130401T17 DTEND:20130401T21 SUMMARY:Progress Meeting TZID:America/New_York UID: ATTENDEE;ROLE=REQ-PARTICIPANT;CN=Developer 1:mailto:d...@mycompany.com ATTENDEE;ROLE=OPT-PARTICIPANT;CN=Developer 2:mailto:d...@mycompany.com END:VEVENT END:VCALENDAR Basic Usage To unmarshal and marshal the message shown above, your route will look like the following: from("direct:ical-unmarshal") .unmarshal("ical") .to("mock:unmarshaled") .marshal("ical") .to("mock:marshaled"); Maven users will need to add the following dependency to their pom.xml for this component: dependency groupIdorg.apache.camel/groupId artifactIdcamel-ical/artifactId versionx.x.x/version !-- use the same version as your Camel core version -- /dependency See Also Configuring Camel Component Endpoint Getting Started Stop watching space | Change email notification preferences View Online | View Changes | Add Comment