You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2013/10/28 13:18:55 UTC

[1/6] git commit: CAMEL-6907: Added setProperties method to DefaultEndpoint just like we have in DefaultComponent that comes handy for component developers.

Updated Branches:
  refs/heads/camel-2.11.x a01324c74 -> c9c74ecd1
  refs/heads/camel-2.12.x 609998bb3 -> a0f0d38bf
  refs/heads/master 2f3e58688 -> 2e05ae0a1


CAMEL-6907: Added setProperties method to DefaultEndpoint just like we have in DefaultComponent that comes handy for component developers.


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

Branch: refs/heads/master
Commit: 9041192bd3578d538262f316de4a2d39dd3bf294
Parents: 2f3e586
Author: Claus Ibsen <da...@apache.org>
Authored: Mon Oct 28 13:17:35 2013 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Mon Oct 28 13:17:35 2013 +0100

----------------------------------------------------------------------
 .../java/org/apache/camel/impl/DefaultEndpoint.java   | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/9041192b/camel-core/src/main/java/org/apache/camel/impl/DefaultEndpoint.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/impl/DefaultEndpoint.java b/camel-core/src/main/java/org/apache/camel/impl/DefaultEndpoint.java
index b88d148..3dae289 100644
--- a/camel-core/src/main/java/org/apache/camel/impl/DefaultEndpoint.java
+++ b/camel-core/src/main/java/org/apache/camel/impl/DefaultEndpoint.java
@@ -269,6 +269,20 @@ public abstract class DefaultEndpoint extends ServiceSupport implements Endpoint
     }
 
     /**
+     * Sets the bean properties on the given bean.
+     * <p/>
+     * This is the same logical implementation as {@link DefaultComponent#setProperties(Object, java.util.Map)}
+     *
+     * @param bean  the bean
+     * @param parameters  properties to set
+     */
+    protected void setProperties(Object bean, Map<String, Object> parameters) throws Exception {
+        // set reference properties first as they use # syntax that fools the regular properties setter
+        EndpointHelper.setReferenceProperties(getCamelContext(), bean, parameters);
+        EndpointHelper.setProperties(getCamelContext(), bean, parameters);
+    }
+
+    /**
      * A factory method to lazily create the endpointUri if none is specified
      */
     protected String createEndpointUri() {


[6/6] git commit: CAMEL-6908: camel-ftp ftpClient.xxx options now support refernece lookup (eg # syntax)

Posted by da...@apache.org.
CAMEL-6908: camel-ftp ftpClient.xxx options now support refernece lookup (eg # syntax)


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

Branch: refs/heads/camel-2.11.x
Commit: c9c74ecd1fb5bd3035eb1d2eee0b8ebfadf41579
Parents: 86e6d54
Author: Claus Ibsen <da...@apache.org>
Authored: Mon Oct 28 13:18:35 2013 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Mon Oct 28 13:19:26 2013 +0100

----------------------------------------------------------------------
 .../org/apache/camel/component/file/remote/FtpEndpoint.java     | 5 ++---
 .../org/apache/camel/component/file/remote/FtpsEndpoint.java    | 5 ++---
 2 files changed, 4 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/c9c74ecd/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpEndpoint.java b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpEndpoint.java
index 77ee093..03b14b5 100644
--- a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpEndpoint.java
+++ b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpEndpoint.java
@@ -24,7 +24,6 @@ import org.apache.camel.Processor;
 import org.apache.camel.component.file.GenericFileConfiguration;
 import org.apache.camel.component.file.GenericFileProducer;
 import org.apache.camel.component.file.remote.RemoteFileConfiguration.PathSeparator;
-import org.apache.camel.util.IntrospectionSupport;
 import org.apache.commons.net.ftp.FTPClient;
 import org.apache.commons.net.ftp.FTPClientConfig;
 import org.apache.commons.net.ftp.FTPFile;
@@ -100,7 +99,7 @@ public class FtpEndpoint<T extends FTPFile> extends RemoteFileEndpoint<FTPFile>
             if (timeout != null) {
                 dataTimeout = getCamelContext().getTypeConverter().convertTo(int.class, dataTimeout);
             }
-            IntrospectionSupport.setProperties(client, ftpClientParameters);
+            setProperties(client, ftpClientParameters);
         }
         
         if (ftpClientConfigParameters != null) {
@@ -108,7 +107,7 @@ public class FtpEndpoint<T extends FTPFile> extends RemoteFileEndpoint<FTPFile>
             if (ftpClientConfig == null) {
                 ftpClientConfig = new FTPClientConfig();
             }
-            IntrospectionSupport.setProperties(ftpClientConfig, ftpClientConfigParameters);
+            setProperties(ftpClientConfig, ftpClientConfigParameters);
         }
 
         if (dataTimeout > 0) {

http://git-wip-us.apache.org/repos/asf/camel/blob/c9c74ecd/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpsEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpsEndpoint.java b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpsEndpoint.java
index 1f0c6a2..1b4e6d3 100644
--- a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpsEndpoint.java
+++ b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpsEndpoint.java
@@ -27,7 +27,6 @@ import javax.net.ssl.SSLSocket;
 import javax.net.ssl.TrustManagerFactory;
 
 import org.apache.camel.util.IOHelper;
-import org.apache.camel.util.IntrospectionSupport;
 import org.apache.camel.util.jsse.SSLContextParameters;
 import org.apache.commons.net.ftp.FTPClient;
 import org.apache.commons.net.ftp.FTPClientConfig;
@@ -165,7 +164,7 @@ public class FtpsEndpoint extends FtpEndpoint<FTPFile> {
             if (timeout != null) {
                 dataTimeout = getCamelContext().getTypeConverter().convertTo(int.class, dataTimeout);
             }
-            IntrospectionSupport.setProperties(client, ftpClientParameters);
+            setProperties(client, ftpClientParameters);
         }
 
         if (ftpClientConfigParameters != null) {
@@ -173,7 +172,7 @@ public class FtpsEndpoint extends FtpEndpoint<FTPFile> {
             if (ftpClientConfig == null) {
                 ftpClientConfig = new FTPClientConfig();
             }
-            IntrospectionSupport.setProperties(ftpClientConfig, ftpClientConfigParameters);
+            setProperties(ftpClientConfig, ftpClientConfigParameters);
         }
 
         if (dataTimeout > 0) {


[2/6] git commit: CAMEL-6908: camel-ftp ftpClient.xxx options now support refernece lookup (eg # syntax)

Posted by da...@apache.org.
CAMEL-6908: camel-ftp ftpClient.xxx options now support refernece lookup (eg # syntax)


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

Branch: refs/heads/master
Commit: 2e05ae0a1665282168d5822c004c624f46d09d58
Parents: 9041192
Author: Claus Ibsen <da...@apache.org>
Authored: Mon Oct 28 13:18:35 2013 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Mon Oct 28 13:18:35 2013 +0100

----------------------------------------------------------------------
 .../org/apache/camel/component/file/remote/FtpEndpoint.java     | 5 ++---
 .../org/apache/camel/component/file/remote/FtpsEndpoint.java    | 5 ++---
 2 files changed, 4 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/2e05ae0a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpEndpoint.java b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpEndpoint.java
index 77ee093..03b14b5 100644
--- a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpEndpoint.java
+++ b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpEndpoint.java
@@ -24,7 +24,6 @@ import org.apache.camel.Processor;
 import org.apache.camel.component.file.GenericFileConfiguration;
 import org.apache.camel.component.file.GenericFileProducer;
 import org.apache.camel.component.file.remote.RemoteFileConfiguration.PathSeparator;
-import org.apache.camel.util.IntrospectionSupport;
 import org.apache.commons.net.ftp.FTPClient;
 import org.apache.commons.net.ftp.FTPClientConfig;
 import org.apache.commons.net.ftp.FTPFile;
@@ -100,7 +99,7 @@ public class FtpEndpoint<T extends FTPFile> extends RemoteFileEndpoint<FTPFile>
             if (timeout != null) {
                 dataTimeout = getCamelContext().getTypeConverter().convertTo(int.class, dataTimeout);
             }
-            IntrospectionSupport.setProperties(client, ftpClientParameters);
+            setProperties(client, ftpClientParameters);
         }
         
         if (ftpClientConfigParameters != null) {
@@ -108,7 +107,7 @@ public class FtpEndpoint<T extends FTPFile> extends RemoteFileEndpoint<FTPFile>
             if (ftpClientConfig == null) {
                 ftpClientConfig = new FTPClientConfig();
             }
-            IntrospectionSupport.setProperties(ftpClientConfig, ftpClientConfigParameters);
+            setProperties(ftpClientConfig, ftpClientConfigParameters);
         }
 
         if (dataTimeout > 0) {

http://git-wip-us.apache.org/repos/asf/camel/blob/2e05ae0a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpsEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpsEndpoint.java b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpsEndpoint.java
index 1f0c6a2..1b4e6d3 100644
--- a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpsEndpoint.java
+++ b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpsEndpoint.java
@@ -27,7 +27,6 @@ import javax.net.ssl.SSLSocket;
 import javax.net.ssl.TrustManagerFactory;
 
 import org.apache.camel.util.IOHelper;
-import org.apache.camel.util.IntrospectionSupport;
 import org.apache.camel.util.jsse.SSLContextParameters;
 import org.apache.commons.net.ftp.FTPClient;
 import org.apache.commons.net.ftp.FTPClientConfig;
@@ -165,7 +164,7 @@ public class FtpsEndpoint extends FtpEndpoint<FTPFile> {
             if (timeout != null) {
                 dataTimeout = getCamelContext().getTypeConverter().convertTo(int.class, dataTimeout);
             }
-            IntrospectionSupport.setProperties(client, ftpClientParameters);
+            setProperties(client, ftpClientParameters);
         }
 
         if (ftpClientConfigParameters != null) {
@@ -173,7 +172,7 @@ public class FtpsEndpoint extends FtpEndpoint<FTPFile> {
             if (ftpClientConfig == null) {
                 ftpClientConfig = new FTPClientConfig();
             }
-            IntrospectionSupport.setProperties(ftpClientConfig, ftpClientConfigParameters);
+            setProperties(ftpClientConfig, ftpClientConfigParameters);
         }
 
         if (dataTimeout > 0) {


[4/6] git commit: CAMEL-6908: camel-ftp ftpClient.xxx options now support refernece lookup (eg # syntax)

Posted by da...@apache.org.
CAMEL-6908: camel-ftp ftpClient.xxx options now support refernece lookup (eg # syntax)


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

Branch: refs/heads/camel-2.12.x
Commit: a0f0d38bf3d532ce9705ec36e6dc2389cba28228
Parents: de0296c
Author: Claus Ibsen <da...@apache.org>
Authored: Mon Oct 28 13:18:35 2013 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Mon Oct 28 13:19:05 2013 +0100

----------------------------------------------------------------------
 .../org/apache/camel/component/file/remote/FtpEndpoint.java     | 5 ++---
 .../org/apache/camel/component/file/remote/FtpsEndpoint.java    | 5 ++---
 2 files changed, 4 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/a0f0d38b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpEndpoint.java b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpEndpoint.java
index 77ee093..03b14b5 100644
--- a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpEndpoint.java
+++ b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpEndpoint.java
@@ -24,7 +24,6 @@ import org.apache.camel.Processor;
 import org.apache.camel.component.file.GenericFileConfiguration;
 import org.apache.camel.component.file.GenericFileProducer;
 import org.apache.camel.component.file.remote.RemoteFileConfiguration.PathSeparator;
-import org.apache.camel.util.IntrospectionSupport;
 import org.apache.commons.net.ftp.FTPClient;
 import org.apache.commons.net.ftp.FTPClientConfig;
 import org.apache.commons.net.ftp.FTPFile;
@@ -100,7 +99,7 @@ public class FtpEndpoint<T extends FTPFile> extends RemoteFileEndpoint<FTPFile>
             if (timeout != null) {
                 dataTimeout = getCamelContext().getTypeConverter().convertTo(int.class, dataTimeout);
             }
-            IntrospectionSupport.setProperties(client, ftpClientParameters);
+            setProperties(client, ftpClientParameters);
         }
         
         if (ftpClientConfigParameters != null) {
@@ -108,7 +107,7 @@ public class FtpEndpoint<T extends FTPFile> extends RemoteFileEndpoint<FTPFile>
             if (ftpClientConfig == null) {
                 ftpClientConfig = new FTPClientConfig();
             }
-            IntrospectionSupport.setProperties(ftpClientConfig, ftpClientConfigParameters);
+            setProperties(ftpClientConfig, ftpClientConfigParameters);
         }
 
         if (dataTimeout > 0) {

http://git-wip-us.apache.org/repos/asf/camel/blob/a0f0d38b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpsEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpsEndpoint.java b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpsEndpoint.java
index 1f0c6a2..1b4e6d3 100644
--- a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpsEndpoint.java
+++ b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpsEndpoint.java
@@ -27,7 +27,6 @@ import javax.net.ssl.SSLSocket;
 import javax.net.ssl.TrustManagerFactory;
 
 import org.apache.camel.util.IOHelper;
-import org.apache.camel.util.IntrospectionSupport;
 import org.apache.camel.util.jsse.SSLContextParameters;
 import org.apache.commons.net.ftp.FTPClient;
 import org.apache.commons.net.ftp.FTPClientConfig;
@@ -165,7 +164,7 @@ public class FtpsEndpoint extends FtpEndpoint<FTPFile> {
             if (timeout != null) {
                 dataTimeout = getCamelContext().getTypeConverter().convertTo(int.class, dataTimeout);
             }
-            IntrospectionSupport.setProperties(client, ftpClientParameters);
+            setProperties(client, ftpClientParameters);
         }
 
         if (ftpClientConfigParameters != null) {
@@ -173,7 +172,7 @@ public class FtpsEndpoint extends FtpEndpoint<FTPFile> {
             if (ftpClientConfig == null) {
                 ftpClientConfig = new FTPClientConfig();
             }
-            IntrospectionSupport.setProperties(ftpClientConfig, ftpClientConfigParameters);
+            setProperties(ftpClientConfig, ftpClientConfigParameters);
         }
 
         if (dataTimeout > 0) {


[3/6] git commit: CAMEL-6907: Added setProperties method to DefaultEndpoint just like we have in DefaultComponent that comes handy for component developers.

Posted by da...@apache.org.
CAMEL-6907: Added setProperties method to DefaultEndpoint just like we have in DefaultComponent that comes handy for component developers.


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

Branch: refs/heads/camel-2.12.x
Commit: de0296c37d5f3c3be81fc9df3b3004ff107d86d3
Parents: 609998b
Author: Claus Ibsen <da...@apache.org>
Authored: Mon Oct 28 13:17:35 2013 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Mon Oct 28 13:18:59 2013 +0100

----------------------------------------------------------------------
 .../java/org/apache/camel/impl/DefaultEndpoint.java   | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/de0296c3/camel-core/src/main/java/org/apache/camel/impl/DefaultEndpoint.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/impl/DefaultEndpoint.java b/camel-core/src/main/java/org/apache/camel/impl/DefaultEndpoint.java
index b88d148..3dae289 100644
--- a/camel-core/src/main/java/org/apache/camel/impl/DefaultEndpoint.java
+++ b/camel-core/src/main/java/org/apache/camel/impl/DefaultEndpoint.java
@@ -269,6 +269,20 @@ public abstract class DefaultEndpoint extends ServiceSupport implements Endpoint
     }
 
     /**
+     * Sets the bean properties on the given bean.
+     * <p/>
+     * This is the same logical implementation as {@link DefaultComponent#setProperties(Object, java.util.Map)}
+     *
+     * @param bean  the bean
+     * @param parameters  properties to set
+     */
+    protected void setProperties(Object bean, Map<String, Object> parameters) throws Exception {
+        // set reference properties first as they use # syntax that fools the regular properties setter
+        EndpointHelper.setReferenceProperties(getCamelContext(), bean, parameters);
+        EndpointHelper.setProperties(getCamelContext(), bean, parameters);
+    }
+
+    /**
      * A factory method to lazily create the endpointUri if none is specified
      */
     protected String createEndpointUri() {


[5/6] git commit: CAMEL-6907: Added setProperties method to DefaultEndpoint just like we have in DefaultComponent that comes handy for component developers.

Posted by da...@apache.org.
CAMEL-6907: Added setProperties method to DefaultEndpoint just like we have in DefaultComponent that comes handy for component developers.


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

Branch: refs/heads/camel-2.11.x
Commit: 86e6d54c687a266a0c715b29e1553a5d58cc7500
Parents: a01324c
Author: Claus Ibsen <da...@apache.org>
Authored: Mon Oct 28 13:17:35 2013 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Mon Oct 28 13:19:18 2013 +0100

----------------------------------------------------------------------
 .../java/org/apache/camel/impl/DefaultEndpoint.java   | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/86e6d54c/camel-core/src/main/java/org/apache/camel/impl/DefaultEndpoint.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/impl/DefaultEndpoint.java b/camel-core/src/main/java/org/apache/camel/impl/DefaultEndpoint.java
index 3b12a40..3273229 100644
--- a/camel-core/src/main/java/org/apache/camel/impl/DefaultEndpoint.java
+++ b/camel-core/src/main/java/org/apache/camel/impl/DefaultEndpoint.java
@@ -266,6 +266,20 @@ public abstract class DefaultEndpoint extends ServiceSupport implements Endpoint
     }
 
     /**
+     * Sets the bean properties on the given bean.
+     * <p/>
+     * This is the same logical implementation as {@link DefaultComponent#setProperties(Object, java.util.Map)}
+     *
+     * @param bean  the bean
+     * @param parameters  properties to set
+     */
+    protected void setProperties(Object bean, Map<String, Object> parameters) throws Exception {
+        // set reference properties first as they use # syntax that fools the regular properties setter
+        EndpointHelper.setReferenceProperties(getCamelContext(), bean, parameters);
+        EndpointHelper.setProperties(getCamelContext(), bean, parameters);
+    }
+
+    /**
      * A factory method to lazily create the endpointUri if none is specified
      */
     protected String createEndpointUri() {