camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dhira...@apache.org
Subject [23/26] camel git commit: CAMEL-10197: Regenerated asciidoc and spring-boot starter configuration with NestedConfiguration support
Date Tue, 20 Sep 2016 19:57:35 GMT
http://git-wip-us.apache.org/repos/asf/camel/blob/d485f2f0/components-starter/camel-guava-eventbus-starter/src/main/java/org/apache/camel/component/guava/eventbus/springboot/GuavaEventBusComponentConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-guava-eventbus-starter/src/main/java/org/apache/camel/component/guava/eventbus/springboot/GuavaEventBusComponentConfiguration.java
b/components-starter/camel-guava-eventbus-starter/src/main/java/org/apache/camel/component/guava/eventbus/springboot/GuavaEventBusComponentConfiguration.java
index 932a8b5..800e994 100644
--- a/components-starter/camel-guava-eventbus-starter/src/main/java/org/apache/camel/component/guava/eventbus/springboot/GuavaEventBusComponentConfiguration.java
+++ b/components-starter/camel-guava-eventbus-starter/src/main/java/org/apache/camel/component/guava/eventbus/springboot/GuavaEventBusComponentConfiguration.java
@@ -18,6 +18,7 @@ package org.apache.camel.component.guava.eventbus.springboot;
 
 import com.google.common.eventbus.EventBus;
 import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.boot.context.properties.NestedConfigurationProperty;
 
 /**
  * The guava-eventbus component provides integration bridge between Camel and
@@ -31,6 +32,7 @@ public class GuavaEventBusComponentConfiguration {
     /**
      * To use the given Guava EventBus instance
      */
+    @NestedConfigurationProperty
     private EventBus eventBus;
     /**
      * The interface with method(s) marked with the Subscribe annotation.

http://git-wip-us.apache.org/repos/asf/camel/blob/d485f2f0/components-starter/camel-hazelcast-starter/src/main/java/org/apache/camel/component/hazelcast/springboot/HazelcastComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-hazelcast-starter/src/main/java/org/apache/camel/component/hazelcast/springboot/HazelcastComponentAutoConfiguration.java
b/components-starter/camel-hazelcast-starter/src/main/java/org/apache/camel/component/hazelcast/springboot/HazelcastComponentAutoConfiguration.java
index 1b6f679..2d54892 100644
--- a/components-starter/camel-hazelcast-starter/src/main/java/org/apache/camel/component/hazelcast/springboot/HazelcastComponentAutoConfiguration.java
+++ b/components-starter/camel-hazelcast-starter/src/main/java/org/apache/camel/component/hazelcast/springboot/HazelcastComponentAutoConfiguration.java
@@ -45,6 +45,26 @@ public class HazelcastComponentAutoConfiguration {
         Map<String, Object> parameters = new HashMap<>();
         IntrospectionSupport.getProperties(configuration, parameters, null,
                 false);
+        for (Map.Entry<String, Object> entry : parameters.entrySet()) {
+            Object value = entry.getValue();
+            Class<?> paramClass = value.getClass();
+            if (paramClass.getName().endsWith("NestedConfiguration")) {
+                Class nestedClass = null;
+                try {
+                    nestedClass = (Class) paramClass.getDeclaredField(
+                            "CAMEL_NESTED_CLASS").get(null);
+                    HashMap<String, Object> nestedParameters = new HashMap<>();
+                    IntrospectionSupport.getProperties(value, nestedParameters,
+                            null, false);
+                    Object nestedProperty = nestedClass.newInstance();
+                    IntrospectionSupport.setProperties(camelContext,
+                            camelContext.getTypeConverter(), nestedProperty,
+                            nestedParameters);
+                    entry.setValue(nestedProperty);
+                } catch (NoSuchFieldException e) {
+                }
+            }
+        }
         IntrospectionSupport.setProperties(camelContext,
                 camelContext.getTypeConverter(), component, parameters);
         return component;

http://git-wip-us.apache.org/repos/asf/camel/blob/d485f2f0/components-starter/camel-hazelcast-starter/src/main/java/org/apache/camel/component/hazelcast/springboot/HazelcastComponentConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-hazelcast-starter/src/main/java/org/apache/camel/component/hazelcast/springboot/HazelcastComponentConfiguration.java
b/components-starter/camel-hazelcast-starter/src/main/java/org/apache/camel/component/hazelcast/springboot/HazelcastComponentConfiguration.java
index 2a418f7..484b309 100644
--- a/components-starter/camel-hazelcast-starter/src/main/java/org/apache/camel/component/hazelcast/springboot/HazelcastComponentConfiguration.java
+++ b/components-starter/camel-hazelcast-starter/src/main/java/org/apache/camel/component/hazelcast/springboot/HazelcastComponentConfiguration.java
@@ -18,6 +18,7 @@ package org.apache.camel.component.hazelcast.springboot;
 
 import com.hazelcast.core.HazelcastInstance;
 import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.boot.context.properties.NestedConfigurationProperty;
 
 /**
  * The hazelcast component allows you to work with the Hazelcast distributed
@@ -33,6 +34,7 @@ public class HazelcastComponentConfiguration {
      * endpoint. If you don't specify the instance reference camel use the
      * default hazelcast instance from the camel-hazelcast instance.
      */
+    @NestedConfigurationProperty
     private HazelcastInstance hazelcastInstance;
 
     public HazelcastInstance getHazelcastInstance() {

http://git-wip-us.apache.org/repos/asf/camel/blob/d485f2f0/components-starter/camel-hbase-starter/src/main/java/org/apache/camel/component/hbase/springboot/HBaseComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-hbase-starter/src/main/java/org/apache/camel/component/hbase/springboot/HBaseComponentAutoConfiguration.java
b/components-starter/camel-hbase-starter/src/main/java/org/apache/camel/component/hbase/springboot/HBaseComponentAutoConfiguration.java
index 7334d6a..b0ef4fb 100644
--- a/components-starter/camel-hbase-starter/src/main/java/org/apache/camel/component/hbase/springboot/HBaseComponentAutoConfiguration.java
+++ b/components-starter/camel-hbase-starter/src/main/java/org/apache/camel/component/hbase/springboot/HBaseComponentAutoConfiguration.java
@@ -44,6 +44,26 @@ public class HBaseComponentAutoConfiguration {
         Map<String, Object> parameters = new HashMap<>();
         IntrospectionSupport.getProperties(configuration, parameters, null,
                 false);
+        for (Map.Entry<String, Object> entry : parameters.entrySet()) {
+            Object value = entry.getValue();
+            Class<?> paramClass = value.getClass();
+            if (paramClass.getName().endsWith("NestedConfiguration")) {
+                Class nestedClass = null;
+                try {
+                    nestedClass = (Class) paramClass.getDeclaredField(
+                            "CAMEL_NESTED_CLASS").get(null);
+                    HashMap<String, Object> nestedParameters = new HashMap<>();
+                    IntrospectionSupport.getProperties(value, nestedParameters,
+                            null, false);
+                    Object nestedProperty = nestedClass.newInstance();
+                    IntrospectionSupport.setProperties(camelContext,
+                            camelContext.getTypeConverter(), nestedProperty,
+                            nestedParameters);
+                    entry.setValue(nestedProperty);
+                } catch (NoSuchFieldException e) {
+                }
+            }
+        }
         IntrospectionSupport.setProperties(camelContext,
                 camelContext.getTypeConverter(), component, parameters);
         return component;

http://git-wip-us.apache.org/repos/asf/camel/blob/d485f2f0/components-starter/camel-hbase-starter/src/main/java/org/apache/camel/component/hbase/springboot/HBaseComponentConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-hbase-starter/src/main/java/org/apache/camel/component/hbase/springboot/HBaseComponentConfiguration.java
b/components-starter/camel-hbase-starter/src/main/java/org/apache/camel/component/hbase/springboot/HBaseComponentConfiguration.java
index 4c4e2e9..a800e04 100644
--- a/components-starter/camel-hbase-starter/src/main/java/org/apache/camel/component/hbase/springboot/HBaseComponentConfiguration.java
+++ b/components-starter/camel-hbase-starter/src/main/java/org/apache/camel/component/hbase/springboot/HBaseComponentConfiguration.java
@@ -18,6 +18,7 @@ package org.apache.camel.component.hbase.springboot;
 
 import org.apache.hadoop.conf.Configuration;
 import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.boot.context.properties.NestedConfigurationProperty;
 
 /**
  * For reading/writing from/to an HBase store (Hadoop database).
@@ -30,6 +31,7 @@ public class HBaseComponentConfiguration {
     /**
      * To use the shared configuration
      */
+    @NestedConfigurationProperty
     private Configuration configuration;
     /**
      * Maximum number of references to keep for each table in the HTable pool.

http://git-wip-us.apache.org/repos/asf/camel/blob/d485f2f0/components-starter/camel-hdfs-starter/src/main/java/org/apache/camel/component/hdfs/springboot/HdfsComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-hdfs-starter/src/main/java/org/apache/camel/component/hdfs/springboot/HdfsComponentAutoConfiguration.java
b/components-starter/camel-hdfs-starter/src/main/java/org/apache/camel/component/hdfs/springboot/HdfsComponentAutoConfiguration.java
index ab72ef7..987b615 100644
--- a/components-starter/camel-hdfs-starter/src/main/java/org/apache/camel/component/hdfs/springboot/HdfsComponentAutoConfiguration.java
+++ b/components-starter/camel-hdfs-starter/src/main/java/org/apache/camel/component/hdfs/springboot/HdfsComponentAutoConfiguration.java
@@ -44,6 +44,26 @@ public class HdfsComponentAutoConfiguration {
         Map<String, Object> parameters = new HashMap<>();
         IntrospectionSupport.getProperties(configuration, parameters, null,
                 false);
+        for (Map.Entry<String, Object> entry : parameters.entrySet()) {
+            Object value = entry.getValue();
+            Class<?> paramClass = value.getClass();
+            if (paramClass.getName().endsWith("NestedConfiguration")) {
+                Class nestedClass = null;
+                try {
+                    nestedClass = (Class) paramClass.getDeclaredField(
+                            "CAMEL_NESTED_CLASS").get(null);
+                    HashMap<String, Object> nestedParameters = new HashMap<>();
+                    IntrospectionSupport.getProperties(value, nestedParameters,
+                            null, false);
+                    Object nestedProperty = nestedClass.newInstance();
+                    IntrospectionSupport.setProperties(camelContext,
+                            camelContext.getTypeConverter(), nestedProperty,
+                            nestedParameters);
+                    entry.setValue(nestedProperty);
+                } catch (NoSuchFieldException e) {
+                }
+            }
+        }
         IntrospectionSupport.setProperties(camelContext,
                 camelContext.getTypeConverter(), component, parameters);
         return component;

http://git-wip-us.apache.org/repos/asf/camel/blob/d485f2f0/components-starter/camel-hdfs2-starter/src/main/java/org/apache/camel/component/hdfs2/springboot/HdfsComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-hdfs2-starter/src/main/java/org/apache/camel/component/hdfs2/springboot/HdfsComponentAutoConfiguration.java
b/components-starter/camel-hdfs2-starter/src/main/java/org/apache/camel/component/hdfs2/springboot/HdfsComponentAutoConfiguration.java
index 92a1fac..c7a1e1d 100644
--- a/components-starter/camel-hdfs2-starter/src/main/java/org/apache/camel/component/hdfs2/springboot/HdfsComponentAutoConfiguration.java
+++ b/components-starter/camel-hdfs2-starter/src/main/java/org/apache/camel/component/hdfs2/springboot/HdfsComponentAutoConfiguration.java
@@ -44,6 +44,26 @@ public class HdfsComponentAutoConfiguration {
         Map<String, Object> parameters = new HashMap<>();
         IntrospectionSupport.getProperties(configuration, parameters, null,
                 false);
+        for (Map.Entry<String, Object> entry : parameters.entrySet()) {
+            Object value = entry.getValue();
+            Class<?> paramClass = value.getClass();
+            if (paramClass.getName().endsWith("NestedConfiguration")) {
+                Class nestedClass = null;
+                try {
+                    nestedClass = (Class) paramClass.getDeclaredField(
+                            "CAMEL_NESTED_CLASS").get(null);
+                    HashMap<String, Object> nestedParameters = new HashMap<>();
+                    IntrospectionSupport.getProperties(value, nestedParameters,
+                            null, false);
+                    Object nestedProperty = nestedClass.newInstance();
+                    IntrospectionSupport.setProperties(camelContext,
+                            camelContext.getTypeConverter(), nestedProperty,
+                            nestedParameters);
+                    entry.setValue(nestedProperty);
+                } catch (NoSuchFieldException e) {
+                }
+            }
+        }
         IntrospectionSupport.setProperties(camelContext,
                 camelContext.getTypeConverter(), component, parameters);
         return component;

http://git-wip-us.apache.org/repos/asf/camel/blob/d485f2f0/components-starter/camel-http-starter/src/main/java/org/apache/camel/component/http/springboot/HttpComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-http-starter/src/main/java/org/apache/camel/component/http/springboot/HttpComponentAutoConfiguration.java
b/components-starter/camel-http-starter/src/main/java/org/apache/camel/component/http/springboot/HttpComponentAutoConfiguration.java
index b90977e..1397ebb 100644
--- a/components-starter/camel-http-starter/src/main/java/org/apache/camel/component/http/springboot/HttpComponentAutoConfiguration.java
+++ b/components-starter/camel-http-starter/src/main/java/org/apache/camel/component/http/springboot/HttpComponentAutoConfiguration.java
@@ -44,6 +44,26 @@ public class HttpComponentAutoConfiguration {
         Map<String, Object> parameters = new HashMap<>();
         IntrospectionSupport.getProperties(configuration, parameters, null,
                 false);
+        for (Map.Entry<String, Object> entry : parameters.entrySet()) {
+            Object value = entry.getValue();
+            Class<?> paramClass = value.getClass();
+            if (paramClass.getName().endsWith("NestedConfiguration")) {
+                Class nestedClass = null;
+                try {
+                    nestedClass = (Class) paramClass.getDeclaredField(
+                            "CAMEL_NESTED_CLASS").get(null);
+                    HashMap<String, Object> nestedParameters = new HashMap<>();
+                    IntrospectionSupport.getProperties(value, nestedParameters,
+                            null, false);
+                    Object nestedProperty = nestedClass.newInstance();
+                    IntrospectionSupport.setProperties(camelContext,
+                            camelContext.getTypeConverter(), nestedProperty,
+                            nestedParameters);
+                    entry.setValue(nestedProperty);
+                } catch (NoSuchFieldException e) {
+                }
+            }
+        }
         IntrospectionSupport.setProperties(camelContext,
                 camelContext.getTypeConverter(), component, parameters);
         return component;

http://git-wip-us.apache.org/repos/asf/camel/blob/d485f2f0/components-starter/camel-http-starter/src/main/java/org/apache/camel/component/http/springboot/HttpComponentConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-http-starter/src/main/java/org/apache/camel/component/http/springboot/HttpComponentConfiguration.java
b/components-starter/camel-http-starter/src/main/java/org/apache/camel/component/http/springboot/HttpComponentConfiguration.java
index 20714b3..acf31ee 100644
--- a/components-starter/camel-http-starter/src/main/java/org/apache/camel/component/http/springboot/HttpComponentConfiguration.java
+++ b/components-starter/camel-http-starter/src/main/java/org/apache/camel/component/http/springboot/HttpComponentConfiguration.java
@@ -22,6 +22,7 @@ import org.apache.camel.http.common.HttpConfiguration;
 import org.apache.camel.spi.HeaderFilterStrategy;
 import org.apache.commons.httpclient.HttpConnectionManager;
 import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.boot.context.properties.NestedConfigurationProperty;
 
 /**
  * For calling out to external HTTP servers using Apache HTTP Client 3.x.
@@ -35,19 +36,23 @@ public class HttpComponentConfiguration {
      * To use the custom HttpClientConfigurer to perform configuration of the
      * HttpClient that will be used.
      */
+    @NestedConfigurationProperty
     private HttpClientConfigurer httpClientConfigurer;
     /**
      * To use a custom HttpConnectionManager to manage connections
      */
+    @NestedConfigurationProperty
     private HttpConnectionManager httpConnectionManager;
     /**
      * To use a custom HttpBinding to control the mapping between Camel message
      * and HttpClient.
      */
+    @NestedConfigurationProperty
     private HttpBinding httpBinding;
     /**
      * To use the shared HttpConfiguration as base configuration.
      */
+    @NestedConfigurationProperty
     private HttpConfiguration httpConfiguration;
     /**
      * Whether to allow java serialization when a request uses
@@ -61,6 +66,7 @@ public class HttpComponentConfiguration {
      * To use a custom HeaderFilterStrategy to filter header to and from Camel
      * message.
      */
+    @NestedConfigurationProperty
     private HeaderFilterStrategy headerFilterStrategy;
 
     public HttpClientConfigurer getHttpClientConfigurer() {

http://git-wip-us.apache.org/repos/asf/camel/blob/d485f2f0/components-starter/camel-http4-starter/src/main/java/org/apache/camel/component/http4/springboot/HttpComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-http4-starter/src/main/java/org/apache/camel/component/http4/springboot/HttpComponentAutoConfiguration.java
b/components-starter/camel-http4-starter/src/main/java/org/apache/camel/component/http4/springboot/HttpComponentAutoConfiguration.java
index 6459f12..126e7c1 100644
--- a/components-starter/camel-http4-starter/src/main/java/org/apache/camel/component/http4/springboot/HttpComponentAutoConfiguration.java
+++ b/components-starter/camel-http4-starter/src/main/java/org/apache/camel/component/http4/springboot/HttpComponentAutoConfiguration.java
@@ -44,6 +44,26 @@ public class HttpComponentAutoConfiguration {
         Map<String, Object> parameters = new HashMap<>();
         IntrospectionSupport.getProperties(configuration, parameters, null,
                 false);
+        for (Map.Entry<String, Object> entry : parameters.entrySet()) {
+            Object value = entry.getValue();
+            Class<?> paramClass = value.getClass();
+            if (paramClass.getName().endsWith("NestedConfiguration")) {
+                Class nestedClass = null;
+                try {
+                    nestedClass = (Class) paramClass.getDeclaredField(
+                            "CAMEL_NESTED_CLASS").get(null);
+                    HashMap<String, Object> nestedParameters = new HashMap<>();
+                    IntrospectionSupport.getProperties(value, nestedParameters,
+                            null, false);
+                    Object nestedProperty = nestedClass.newInstance();
+                    IntrospectionSupport.setProperties(camelContext,
+                            camelContext.getTypeConverter(), nestedProperty,
+                            nestedParameters);
+                    entry.setValue(nestedProperty);
+                } catch (NoSuchFieldException e) {
+                }
+            }
+        }
         IntrospectionSupport.setProperties(camelContext,
                 camelContext.getTypeConverter(), component, parameters);
         return component;

http://git-wip-us.apache.org/repos/asf/camel/blob/d485f2f0/components-starter/camel-http4-starter/src/main/java/org/apache/camel/component/http4/springboot/HttpComponentConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-http4-starter/src/main/java/org/apache/camel/component/http4/springboot/HttpComponentConfiguration.java
b/components-starter/camel-http4-starter/src/main/java/org/apache/camel/component/http4/springboot/HttpComponentConfiguration.java
index c88d77b..eacaa37 100644
--- a/components-starter/camel-http4-starter/src/main/java/org/apache/camel/component/http4/springboot/HttpComponentConfiguration.java
+++ b/components-starter/camel-http4-starter/src/main/java/org/apache/camel/component/http4/springboot/HttpComponentConfiguration.java
@@ -26,6 +26,7 @@ import org.apache.http.conn.HttpClientConnectionManager;
 import org.apache.http.conn.ssl.X509HostnameVerifier;
 import org.apache.http.protocol.HttpContext;
 import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.boot.context.properties.NestedConfigurationProperty;
 
 /**
  * For calling out to external HTTP servers using Apache HTTP Client 4.x.
@@ -39,19 +40,23 @@ public class HttpComponentConfiguration {
      * To use the custom HttpClientConfigurer to perform configuration of the
      * HttpClient that will be used.
      */
+    @NestedConfigurationProperty
     private HttpClientConfigurer httpClientConfigurer;
     /**
      * To use a custom HttpClientConnectionManager to manage connections
      */
+    @NestedConfigurationProperty
     private HttpClientConnectionManager clientConnectionManager;
     /**
      * To use a custom HttpBinding to control the mapping between Camel message
      * and HttpClient.
      */
+    @NestedConfigurationProperty
     private HttpBinding httpBinding;
     /**
      * To use the shared HttpConfiguration as base configuration.
      */
+    @NestedConfigurationProperty
     private HttpConfiguration httpConfiguration;
     /**
      * Whether to allow java serialization when a request uses
@@ -65,6 +70,7 @@ public class HttpComponentConfiguration {
      * To use a custom org.apache.http.protocol.HttpContext when executing
      * requests.
      */
+    @NestedConfigurationProperty
     private HttpContext httpContext;
     /**
      * To configure security using SSLContextParameters. Important: Only one
@@ -72,12 +78,14 @@ public class HttpComponentConfiguration {
      * per HttpComponent. If you need to use 2 or more different instances you
      * need to define a new HttpComponent per instance you need.
      */
+    @NestedConfigurationProperty
     private SSLContextParameters sslContextParameters;
     /**
      * To use a custom X509HostnameVerifier such as
      * org.apache.http.conn.ssl.StrictHostnameVerifier or
      * org.apache.http.conn.ssl.AllowAllHostnameVerifier.
      */
+    @NestedConfigurationProperty
     private X509HostnameVerifier x509HostnameVerifier;
     /**
      * The maximum number of connections.
@@ -91,7 +99,7 @@ public class HttpComponentConfiguration {
      * The time for connection to live the time unit is millisecond the default
      * value is always keep alive.
      */
-    private long connectionTimeToLive;
+    private Long connectionTimeToLive;
     /**
      * To use a custom org.apache.http.client.CookieStore. By default the
      * org.apache.http.impl.client.BasicCookieStore is used which is an
@@ -99,11 +107,13 @@ public class HttpComponentConfiguration {
      * cookie store is forced to be a noop cookie store as cookie shouldn't be
      * stored as we are just bridging (eg acting as a proxy).
      */
+    @NestedConfigurationProperty
     private CookieStore cookieStore;
     /**
      * To use a custom HeaderFilterStrategy to filter header to and from Camel
      * message.
      */
+    @NestedConfigurationProperty
     private HeaderFilterStrategy headerFilterStrategy;
 
     public HttpClientConfigurer getHttpClientConfigurer() {
@@ -190,11 +200,11 @@ public class HttpComponentConfiguration {
         this.connectionsPerRoute = connectionsPerRoute;
     }
 
-    public long getConnectionTimeToLive() {
+    public Long getConnectionTimeToLive() {
         return connectionTimeToLive;
     }
 
-    public void setConnectionTimeToLive(long connectionTimeToLive) {
+    public void setConnectionTimeToLive(Long connectionTimeToLive) {
         this.connectionTimeToLive = connectionTimeToLive;
     }
 

http://git-wip-us.apache.org/repos/asf/camel/blob/d485f2f0/components-starter/camel-ibatis-starter/src/main/java/org/apache/camel/component/ibatis/springboot/IBatisComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-ibatis-starter/src/main/java/org/apache/camel/component/ibatis/springboot/IBatisComponentAutoConfiguration.java
b/components-starter/camel-ibatis-starter/src/main/java/org/apache/camel/component/ibatis/springboot/IBatisComponentAutoConfiguration.java
index 6946ea4..98329f2 100644
--- a/components-starter/camel-ibatis-starter/src/main/java/org/apache/camel/component/ibatis/springboot/IBatisComponentAutoConfiguration.java
+++ b/components-starter/camel-ibatis-starter/src/main/java/org/apache/camel/component/ibatis/springboot/IBatisComponentAutoConfiguration.java
@@ -44,6 +44,26 @@ public class IBatisComponentAutoConfiguration {
         Map<String, Object> parameters = new HashMap<>();
         IntrospectionSupport.getProperties(configuration, parameters, null,
                 false);
+        for (Map.Entry<String, Object> entry : parameters.entrySet()) {
+            Object value = entry.getValue();
+            Class<?> paramClass = value.getClass();
+            if (paramClass.getName().endsWith("NestedConfiguration")) {
+                Class nestedClass = null;
+                try {
+                    nestedClass = (Class) paramClass.getDeclaredField(
+                            "CAMEL_NESTED_CLASS").get(null);
+                    HashMap<String, Object> nestedParameters = new HashMap<>();
+                    IntrospectionSupport.getProperties(value, nestedParameters,
+                            null, false);
+                    Object nestedProperty = nestedClass.newInstance();
+                    IntrospectionSupport.setProperties(camelContext,
+                            camelContext.getTypeConverter(), nestedProperty,
+                            nestedParameters);
+                    entry.setValue(nestedProperty);
+                } catch (NoSuchFieldException e) {
+                }
+            }
+        }
         IntrospectionSupport.setProperties(camelContext,
                 camelContext.getTypeConverter(), component, parameters);
         return component;

http://git-wip-us.apache.org/repos/asf/camel/blob/d485f2f0/components-starter/camel-ibatis-starter/src/main/java/org/apache/camel/component/ibatis/springboot/IBatisComponentConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-ibatis-starter/src/main/java/org/apache/camel/component/ibatis/springboot/IBatisComponentConfiguration.java
b/components-starter/camel-ibatis-starter/src/main/java/org/apache/camel/component/ibatis/springboot/IBatisComponentConfiguration.java
index 214cced..e21fa68 100644
--- a/components-starter/camel-ibatis-starter/src/main/java/org/apache/camel/component/ibatis/springboot/IBatisComponentConfiguration.java
+++ b/components-starter/camel-ibatis-starter/src/main/java/org/apache/camel/component/ibatis/springboot/IBatisComponentConfiguration.java
@@ -18,6 +18,7 @@ package org.apache.camel.component.ibatis.springboot;
 
 import com.ibatis.sqlmap.client.SqlMapClient;
 import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.boot.context.properties.NestedConfigurationProperty;
 
 /**
  * Performs a query poll insert update or delete in a relational database using
@@ -31,6 +32,7 @@ public class IBatisComponentConfiguration {
     /**
      * To use the given com.ibatis.sqlmap.client.SqlMapClient
      */
+    @NestedConfigurationProperty
     private SqlMapClient sqlMapClient;
     /**
      * Location of iBatis xml configuration file. The default value is:

http://git-wip-us.apache.org/repos/asf/camel/blob/d485f2f0/components-starter/camel-jclouds-starter/src/main/java/org/apache/camel/component/jclouds/springboot/JcloudsComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-jclouds-starter/src/main/java/org/apache/camel/component/jclouds/springboot/JcloudsComponentAutoConfiguration.java
b/components-starter/camel-jclouds-starter/src/main/java/org/apache/camel/component/jclouds/springboot/JcloudsComponentAutoConfiguration.java
index 5d184c0..20f116f 100644
--- a/components-starter/camel-jclouds-starter/src/main/java/org/apache/camel/component/jclouds/springboot/JcloudsComponentAutoConfiguration.java
+++ b/components-starter/camel-jclouds-starter/src/main/java/org/apache/camel/component/jclouds/springboot/JcloudsComponentAutoConfiguration.java
@@ -45,6 +45,26 @@ public class JcloudsComponentAutoConfiguration {
         Map<String, Object> parameters = new HashMap<>();
         IntrospectionSupport.getProperties(configuration, parameters, null,
                 false);
+        for (Map.Entry<String, Object> entry : parameters.entrySet()) {
+            Object value = entry.getValue();
+            Class<?> paramClass = value.getClass();
+            if (paramClass.getName().endsWith("NestedConfiguration")) {
+                Class nestedClass = null;
+                try {
+                    nestedClass = (Class) paramClass.getDeclaredField(
+                            "CAMEL_NESTED_CLASS").get(null);
+                    HashMap<String, Object> nestedParameters = new HashMap<>();
+                    IntrospectionSupport.getProperties(value, nestedParameters,
+                            null, false);
+                    Object nestedProperty = nestedClass.newInstance();
+                    IntrospectionSupport.setProperties(camelContext,
+                            camelContext.getTypeConverter(), nestedProperty,
+                            nestedParameters);
+                    entry.setValue(nestedProperty);
+                } catch (NoSuchFieldException e) {
+                }
+            }
+        }
         IntrospectionSupport.setProperties(camelContext,
                 camelContext.getTypeConverter(), component, parameters);
         return component;

http://git-wip-us.apache.org/repos/asf/camel/blob/d485f2f0/components-starter/camel-jdbc-starter/src/main/java/org/apache/camel/component/jdbc/springboot/JdbcComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-jdbc-starter/src/main/java/org/apache/camel/component/jdbc/springboot/JdbcComponentAutoConfiguration.java
b/components-starter/camel-jdbc-starter/src/main/java/org/apache/camel/component/jdbc/springboot/JdbcComponentAutoConfiguration.java
index 13ad304..b613e7f 100644
--- a/components-starter/camel-jdbc-starter/src/main/java/org/apache/camel/component/jdbc/springboot/JdbcComponentAutoConfiguration.java
+++ b/components-starter/camel-jdbc-starter/src/main/java/org/apache/camel/component/jdbc/springboot/JdbcComponentAutoConfiguration.java
@@ -44,6 +44,26 @@ public class JdbcComponentAutoConfiguration {
         Map<String, Object> parameters = new HashMap<>();
         IntrospectionSupport.getProperties(configuration, parameters, null,
                 false);
+        for (Map.Entry<String, Object> entry : parameters.entrySet()) {
+            Object value = entry.getValue();
+            Class<?> paramClass = value.getClass();
+            if (paramClass.getName().endsWith("NestedConfiguration")) {
+                Class nestedClass = null;
+                try {
+                    nestedClass = (Class) paramClass.getDeclaredField(
+                            "CAMEL_NESTED_CLASS").get(null);
+                    HashMap<String, Object> nestedParameters = new HashMap<>();
+                    IntrospectionSupport.getProperties(value, nestedParameters,
+                            null, false);
+                    Object nestedProperty = nestedClass.newInstance();
+                    IntrospectionSupport.setProperties(camelContext,
+                            camelContext.getTypeConverter(), nestedProperty,
+                            nestedParameters);
+                    entry.setValue(nestedProperty);
+                } catch (NoSuchFieldException e) {
+                }
+            }
+        }
         IntrospectionSupport.setProperties(camelContext,
                 camelContext.getTypeConverter(), component, parameters);
         return component;

http://git-wip-us.apache.org/repos/asf/camel/blob/d485f2f0/components-starter/camel-jetty9-starter/src/main/java/org/apache/camel/component/jetty9/springboot/JettyHttpComponentAutoConfiguration9.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-jetty9-starter/src/main/java/org/apache/camel/component/jetty9/springboot/JettyHttpComponentAutoConfiguration9.java
b/components-starter/camel-jetty9-starter/src/main/java/org/apache/camel/component/jetty9/springboot/JettyHttpComponentAutoConfiguration9.java
index d1f37a8..24d1213 100644
--- a/components-starter/camel-jetty9-starter/src/main/java/org/apache/camel/component/jetty9/springboot/JettyHttpComponentAutoConfiguration9.java
+++ b/components-starter/camel-jetty9-starter/src/main/java/org/apache/camel/component/jetty9/springboot/JettyHttpComponentAutoConfiguration9.java
@@ -45,6 +45,26 @@ public class JettyHttpComponentAutoConfiguration9 {
         Map<String, Object> parameters = new HashMap<>();
         IntrospectionSupport.getProperties(configuration, parameters, null,
                 false);
+        for (Map.Entry<String, Object> entry : parameters.entrySet()) {
+            Object value = entry.getValue();
+            Class<?> paramClass = value.getClass();
+            if (paramClass.getName().endsWith("NestedConfiguration")) {
+                Class nestedClass = null;
+                try {
+                    nestedClass = (Class) paramClass.getDeclaredField(
+                            "CAMEL_NESTED_CLASS").get(null);
+                    HashMap<String, Object> nestedParameters = new HashMap<>();
+                    IntrospectionSupport.getProperties(value, nestedParameters,
+                            null, false);
+                    Object nestedProperty = nestedClass.newInstance();
+                    IntrospectionSupport.setProperties(camelContext,
+                            camelContext.getTypeConverter(), nestedProperty,
+                            nestedParameters);
+                    entry.setValue(nestedProperty);
+                } catch (NoSuchFieldException e) {
+                }
+            }
+        }
         IntrospectionSupport.setProperties(camelContext,
                 camelContext.getTypeConverter(), component, parameters);
         return component;

http://git-wip-us.apache.org/repos/asf/camel/blob/d485f2f0/components-starter/camel-jetty9-starter/src/main/java/org/apache/camel/component/jetty9/springboot/JettyHttpComponentConfiguration9.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-jetty9-starter/src/main/java/org/apache/camel/component/jetty9/springboot/JettyHttpComponentConfiguration9.java
b/components-starter/camel-jetty9-starter/src/main/java/org/apache/camel/component/jetty9/springboot/JettyHttpComponentConfiguration9.java
index ee6fc07..42f4060 100644
--- a/components-starter/camel-jetty9-starter/src/main/java/org/apache/camel/component/jetty9/springboot/JettyHttpComponentConfiguration9.java
+++ b/components-starter/camel-jetty9-starter/src/main/java/org/apache/camel/component/jetty9/springboot/JettyHttpComponentConfiguration9.java
@@ -27,6 +27,7 @@ import org.eclipse.jetty.server.Connector;
 import org.eclipse.jetty.server.handler.ErrorHandler;
 import org.eclipse.jetty.util.thread.ThreadPool;
 import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.boot.context.properties.NestedConfigurationProperty;
 
 /**
  * The jetty component provides HTTP-based endpoints for consuming and producing
@@ -57,6 +58,7 @@ public class JettyHttpComponentConfiguration9 {
     /**
      * This option is used to set the ErrorHandler that Jetty server uses.
      */
+    @NestedConfigurationProperty
     private ErrorHandler errorHandler;
     /**
      * A map which contains per port number specific SSL connectors.
@@ -91,6 +93,7 @@ public class JettyHttpComponentConfiguration9 {
      * To use a custom thread pool for the server. This option should only be
      * used in special circumstances.
      */
+    @NestedConfigurationProperty
     private ThreadPool threadPool;
     /**
      * If this option is true Jetty JMX support will be enabled for this
@@ -101,19 +104,23 @@ public class JettyHttpComponentConfiguration9 {
      * To use a custom org.apache.camel.component.jetty.JettyHttpBinding which
      * are used to customize how a response should be written for the producer.
      */
+    @NestedConfigurationProperty
     private JettyHttpBinding jettyHttpBinding;
     /**
      * Not to be used - use JettyHttpBinding instead.
      */
+    @NestedConfigurationProperty
     private HttpBinding httpBinding;
     /**
      * Jetty component does not use HttpConfiguration.
      */
+    @NestedConfigurationProperty
     private HttpConfiguration httpConfiguration;
     /**
      * To use a existing configured org.eclipse.jetty.jmx.MBeanContainer if JMX
      * is enabled that Jetty uses for registering mbeans.
      */
+    @NestedConfigurationProperty
     private MBeanContainer mbContainer;
     /**
      * A map which contains general SSL connector properties.
@@ -139,6 +146,7 @@ public class JettyHttpComponentConfiguration9 {
     /**
      * To configure security using SSLContextParameters
      */
+    @NestedConfigurationProperty
     private SSLContextParameters sslContextParameters;
     /**
      * Allows to configure a custom value of the response buffer size on the
@@ -191,6 +199,7 @@ public class JettyHttpComponentConfiguration9 {
      * To use a custom HeaderFilterStrategy to filter header to and from Camel
      * message.
      */
+    @NestedConfigurationProperty
     private HeaderFilterStrategy headerFilterStrategy;
 
     public String getSslKeyPassword() {

http://git-wip-us.apache.org/repos/asf/camel/blob/d485f2f0/components-starter/camel-jgroups-starter/src/main/java/org/apache/camel/component/jgroups/springboot/JGroupsComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-jgroups-starter/src/main/java/org/apache/camel/component/jgroups/springboot/JGroupsComponentAutoConfiguration.java
b/components-starter/camel-jgroups-starter/src/main/java/org/apache/camel/component/jgroups/springboot/JGroupsComponentAutoConfiguration.java
index d44e3b8..e8ad026 100644
--- a/components-starter/camel-jgroups-starter/src/main/java/org/apache/camel/component/jgroups/springboot/JGroupsComponentAutoConfiguration.java
+++ b/components-starter/camel-jgroups-starter/src/main/java/org/apache/camel/component/jgroups/springboot/JGroupsComponentAutoConfiguration.java
@@ -45,6 +45,26 @@ public class JGroupsComponentAutoConfiguration {
         Map<String, Object> parameters = new HashMap<>();
         IntrospectionSupport.getProperties(configuration, parameters, null,
                 false);
+        for (Map.Entry<String, Object> entry : parameters.entrySet()) {
+            Object value = entry.getValue();
+            Class<?> paramClass = value.getClass();
+            if (paramClass.getName().endsWith("NestedConfiguration")) {
+                Class nestedClass = null;
+                try {
+                    nestedClass = (Class) paramClass.getDeclaredField(
+                            "CAMEL_NESTED_CLASS").get(null);
+                    HashMap<String, Object> nestedParameters = new HashMap<>();
+                    IntrospectionSupport.getProperties(value, nestedParameters,
+                            null, false);
+                    Object nestedProperty = nestedClass.newInstance();
+                    IntrospectionSupport.setProperties(camelContext,
+                            camelContext.getTypeConverter(), nestedProperty,
+                            nestedParameters);
+                    entry.setValue(nestedProperty);
+                } catch (NoSuchFieldException e) {
+                }
+            }
+        }
         IntrospectionSupport.setProperties(camelContext,
                 camelContext.getTypeConverter(), component, parameters);
         return component;

http://git-wip-us.apache.org/repos/asf/camel/blob/d485f2f0/components-starter/camel-jgroups-starter/src/main/java/org/apache/camel/component/jgroups/springboot/JGroupsComponentConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-jgroups-starter/src/main/java/org/apache/camel/component/jgroups/springboot/JGroupsComponentConfiguration.java
b/components-starter/camel-jgroups-starter/src/main/java/org/apache/camel/component/jgroups/springboot/JGroupsComponentConfiguration.java
index 8d5e024..20cfdbf9 100644
--- a/components-starter/camel-jgroups-starter/src/main/java/org/apache/camel/component/jgroups/springboot/JGroupsComponentConfiguration.java
+++ b/components-starter/camel-jgroups-starter/src/main/java/org/apache/camel/component/jgroups/springboot/JGroupsComponentConfiguration.java
@@ -18,6 +18,7 @@ package org.apache.camel.component.jgroups.springboot;
 
 import org.jgroups.Channel;
 import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.boot.context.properties.NestedConfigurationProperty;
 
 /**
  * The jgroups component provides exchange of messages between Camel and JGroups
@@ -31,6 +32,7 @@ public class JGroupsComponentConfiguration {
     /**
      * Channel to use
      */
+    @NestedConfigurationProperty
     private Channel channel;
     /**
      * Specifies configuration properties of the JChannel used by the endpoint.

http://git-wip-us.apache.org/repos/asf/camel/blob/d485f2f0/components-starter/camel-jms-starter/src/main/java/org/apache/camel/component/jms/springboot/JmsComponentAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components-starter/camel-jms-starter/src/main/java/org/apache/camel/component/jms/springboot/JmsComponentAutoConfiguration.java
b/components-starter/camel-jms-starter/src/main/java/org/apache/camel/component/jms/springboot/JmsComponentAutoConfiguration.java
index 9d689cb..94f524a 100644
--- a/components-starter/camel-jms-starter/src/main/java/org/apache/camel/component/jms/springboot/JmsComponentAutoConfiguration.java
+++ b/components-starter/camel-jms-starter/src/main/java/org/apache/camel/component/jms/springboot/JmsComponentAutoConfiguration.java
@@ -44,6 +44,26 @@ public class JmsComponentAutoConfiguration {
         Map<String, Object> parameters = new HashMap<>();
         IntrospectionSupport.getProperties(configuration, parameters, null,
                 false);
+        for (Map.Entry<String, Object> entry : parameters.entrySet()) {
+            Object value = entry.getValue();
+            Class<?> paramClass = value.getClass();
+            if (paramClass.getName().endsWith("NestedConfiguration")) {
+                Class nestedClass = null;
+                try {
+                    nestedClass = (Class) paramClass.getDeclaredField(
+                            "CAMEL_NESTED_CLASS").get(null);
+                    HashMap<String, Object> nestedParameters = new HashMap<>();
+                    IntrospectionSupport.getProperties(value, nestedParameters,
+                            null, false);
+                    Object nestedProperty = nestedClass.newInstance();
+                    IntrospectionSupport.setProperties(camelContext,
+                            camelContext.getTypeConverter(), nestedProperty,
+                            nestedParameters);
+                    entry.setValue(nestedProperty);
+                } catch (NoSuchFieldException e) {
+                }
+            }
+        }
         IntrospectionSupport.setProperties(camelContext,
                 camelContext.getTypeConverter(), component, parameters);
         return component;


Mime
View raw message