camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [3/4] camel git commit: CAMEL-8038: Fixed @UriPath
Date Mon, 24 Nov 2014 10:12:32 GMT
CAMEL-8038: Fixed @UriPath


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

Branch: refs/heads/master
Commit: 83550d19ea28ceb11c70c24dd4832e954fe8dd72
Parents: 9833c58
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Mon Nov 24 11:08:50 2014 +0100
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Mon Nov 24 11:12:20 2014 +0100

----------------------------------------------------------------------
 .../component/docker/DockerConfiguration.java   | 10 ++++--
 .../camel/component/docker/DockerEndpoint.java  |  4 ++-
 .../infinispan/InfinispanConfiguration.java     |  7 +++--
 .../infinispan/InfinispanEndpoint.java          |  2 +-
 ...ponentConfigurationAndDocumentationTest.java |  1 +
 .../camel/component/jdbc/JdbcEndpoint.java      | 21 +++++++------
 .../component/openshift/OpenShiftEndpoint.java  |  7 +++--
 ...ponentConfigurationAndDocumentationTest.java |  2 +-
 .../camel/component/quartz/QuartzComponent.java |  3 ++
 .../camel/component/quartz/QuartzEndpoint.java  | 29 ++++++++++++++---
 ...ponentConfigurationAndDocumentationTest.java |  1 +
 .../camel/component/quartz2/QuartzEndpoint.java | 33 +++++++++++++++-----
 ...ponentConfigurationAndDocumentationTest.java |  1 +
 .../component/sparkrest/SparkConfiguration.java |  8 ++---
 .../component/sparkrest/SparkEndpoint.java      | 11 ++++---
 15 files changed, 98 insertions(+), 42 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/83550d19/components/camel-docker/src/main/java/org/apache/camel/component/docker/DockerConfiguration.java
----------------------------------------------------------------------
diff --git a/components/camel-docker/src/main/java/org/apache/camel/component/docker/DockerConfiguration.java
b/components/camel-docker/src/main/java/org/apache/camel/component/docker/DockerConfiguration.java
index 299324e..60c21de 100644
--- a/components/camel-docker/src/main/java/org/apache/camel/component/docker/DockerConfiguration.java
+++ b/components/camel-docker/src/main/java/org/apache/camel/component/docker/DockerConfiguration.java
@@ -22,16 +22,20 @@ import java.util.Map;
 import com.github.dockerjava.api.DockerClient;
 
 import org.apache.camel.component.docker.exception.DockerException;
+import org.apache.camel.spi.UriParams;
+import org.apache.camel.spi.UriPath;
 
+@UriParams
 public class DockerConfiguration {
     private static final String DEFAULT_DOCKER_HOST = "localhost";
     private static final int DEFAULT_DOCKER_PORT = 2375;
 
+    @UriPath
+    private DockerOperation operation;
+
     private Map<String, Object> parameters = new HashMap<String, Object>();
     private Map<DockerClientProfile, DockerClient> clients = new HashMap<DockerClientProfile,
DockerClient>();
-    
-    private DockerOperation operation;
-    
+
     public void setClient(DockerClientProfile clientProfile, DockerClient client) {
         clients.put(clientProfile, client);
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/83550d19/components/camel-docker/src/main/java/org/apache/camel/component/docker/DockerEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-docker/src/main/java/org/apache/camel/component/docker/DockerEndpoint.java
b/components/camel-docker/src/main/java/org/apache/camel/component/docker/DockerEndpoint.java
index 78bdff4..e6330b7 100644
--- a/components/camel-docker/src/main/java/org/apache/camel/component/docker/DockerEndpoint.java
+++ b/components/camel-docker/src/main/java/org/apache/camel/component/docker/DockerEndpoint.java
@@ -24,13 +24,15 @@ import org.apache.camel.component.docker.exception.DockerException;
 import org.apache.camel.component.docker.producer.DockerProducer;
 import org.apache.camel.impl.DefaultEndpoint;
 import org.apache.camel.spi.UriEndpoint;
+import org.apache.camel.spi.UriParam;
 
 /**
  * Represents a Docker endpoint.
  */
-@UriEndpoint(scheme = "docker", consumerClass = DockerEventsConsumer.class)
+@UriEndpoint(scheme = "docker", consumerClass = DockerEventsConsumer.class, label = "container,cloud,platform")
 public class DockerEndpoint extends DefaultEndpoint {
 
+    @UriParam
     private DockerConfiguration configuration;
 
     public DockerEndpoint() {

http://git-wip-us.apache.org/repos/asf/camel/blob/83550d19/components/camel-infinispan/src/main/java/org/apache/camel/component/infinispan/InfinispanConfiguration.java
----------------------------------------------------------------------
diff --git a/components/camel-infinispan/src/main/java/org/apache/camel/component/infinispan/InfinispanConfiguration.java
b/components/camel-infinispan/src/main/java/org/apache/camel/component/infinispan/InfinispanConfiguration.java
index 0c31a0c..5cceabe 100644
--- a/components/camel-infinispan/src/main/java/org/apache/camel/component/infinispan/InfinispanConfiguration.java
+++ b/components/camel-infinispan/src/main/java/org/apache/camel/component/infinispan/InfinispanConfiguration.java
@@ -22,18 +22,19 @@ import java.util.Set;
 
 import org.apache.camel.spi.UriParam;
 import org.apache.camel.spi.UriParams;
+import org.apache.camel.spi.UriPath;
 import org.infinispan.commons.api.BasicCacheContainer;
 
 @UriParams
 public class InfinispanConfiguration {
     private BasicCacheContainer cacheContainer;
+    @UriPath
+    private String host;
     @UriParam
     private String cacheName;
     @UriParam
-    private String host;
-    @UriParam
     private String command;
-    @UriParam
+    @UriParam(defaultValue = "true")
     private boolean sync = true;
     private Set<String> eventTypes;
 

http://git-wip-us.apache.org/repos/asf/camel/blob/83550d19/components/camel-infinispan/src/main/java/org/apache/camel/component/infinispan/InfinispanEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-infinispan/src/main/java/org/apache/camel/component/infinispan/InfinispanEndpoint.java
b/components/camel-infinispan/src/main/java/org/apache/camel/component/infinispan/InfinispanEndpoint.java
index 899f7fb..062e33f 100644
--- a/components/camel-infinispan/src/main/java/org/apache/camel/component/infinispan/InfinispanEndpoint.java
+++ b/components/camel-infinispan/src/main/java/org/apache/camel/component/infinispan/InfinispanEndpoint.java
@@ -23,7 +23,7 @@ import org.apache.camel.impl.DefaultEndpoint;
 import org.apache.camel.spi.UriEndpoint;
 import org.apache.camel.spi.UriParam;
 
-@UriEndpoint(scheme = "infinispan", consumerClass = InfinispanConsumer.class)
+@UriEndpoint(scheme = "infinispan", consumerClass = InfinispanConsumer.class, label = "cache,datagrid")
 public class InfinispanEndpoint extends DefaultEndpoint {
     @UriParam
     private InfinispanConfiguration configuration;

http://git-wip-us.apache.org/repos/asf/camel/blob/83550d19/components/camel-infinispan/src/test/java/org/apache/camel/component/infinispan/InfinispanComponentConfigurationAndDocumentationTest.java
----------------------------------------------------------------------
diff --git a/components/camel-infinispan/src/test/java/org/apache/camel/component/infinispan/InfinispanComponentConfigurationAndDocumentationTest.java
b/components/camel-infinispan/src/test/java/org/apache/camel/component/infinispan/InfinispanComponentConfigurationAndDocumentationTest.java
index 5c20b90..3528e05 100644
--- a/components/camel-infinispan/src/test/java/org/apache/camel/component/infinispan/InfinispanComponentConfigurationAndDocumentationTest.java
+++ b/components/camel-infinispan/src/test/java/org/apache/camel/component/infinispan/InfinispanComponentConfigurationAndDocumentationTest.java
@@ -43,6 +43,7 @@ public class InfinispanComponentConfigurationAndDocumentationTest extends
CamelT
         String json = compConf.createParameterJsonSchema();
         assertNotNull(json);
 
+        assertTrue(json.contains("\"host\": { \"kind\": \"path\", \"type\": \"string\""));
         assertTrue(json.contains("\"command\": { \"kind\": \"parameter\", \"type\": \"string\""));
         assertTrue(json.contains("\"sync\": { \"kind\": \"parameter\", \"type\": \"boolean\""));
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/83550d19/components/camel-jdbc/src/main/java/org/apache/camel/component/jdbc/JdbcEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-jdbc/src/main/java/org/apache/camel/component/jdbc/JdbcEndpoint.java
b/components/camel-jdbc/src/main/java/org/apache/camel/component/jdbc/JdbcEndpoint.java
index a238221..6a0dbc3 100755
--- a/components/camel-jdbc/src/main/java/org/apache/camel/component/jdbc/JdbcEndpoint.java
+++ b/components/camel-jdbc/src/main/java/org/apache/camel/component/jdbc/JdbcEndpoint.java
@@ -17,7 +17,6 @@
 package org.apache.camel.component.jdbc;
 
 import java.util.Map;
-
 import javax.sql.DataSource;
 
 import org.apache.camel.Component;
@@ -27,30 +26,31 @@ import org.apache.camel.Producer;
 import org.apache.camel.impl.DefaultEndpoint;
 import org.apache.camel.spi.UriEndpoint;
 import org.apache.camel.spi.UriParam;
+import org.apache.camel.spi.UriPath;
 
 /**
  * @version
  */
 @UriEndpoint(scheme = "jdbc", label = "database")
 public class JdbcEndpoint extends DefaultEndpoint {
+    @UriPath
+    private DataSource dataSource;
     @UriParam
     private int readSize;
-    @UriParam
+    @UriParam(defaultValue = "false")
     private boolean transacted;
-    @UriParam
+    @UriParam(defaultValue = "true")
     private boolean resetAutoCommit = true;
-    @UriParam
-    private DataSource dataSource;
     private Map<String, Object> parameters;
-    @UriParam
+    @UriParam(defaultValue = "true")
     private boolean useJDBC4ColumnNameAndLabelSemantics = true;
     @UriParam
     private JdbcPrepareStatementStrategy prepareStatementStrategy = new DefaultJdbcPrepareStatementStrategy();
-    @UriParam
+    @UriParam(defaultValue = "true")
     private boolean allowNamedParameters = true;
-    @UriParam
+    @UriParam(defaultValue = "false")
     private boolean useHeadersAsParameters;
-    @UriParam
+    @UriParam(defaultValue = "SelectList")
     private JdbcOutputType outputType = JdbcOutputType.SelectList;
     @UriParam
     private String outputClass;
@@ -105,6 +105,9 @@ public class JdbcEndpoint extends DefaultEndpoint {
         return dataSource;
     }
 
+    /**
+     * The data source to use
+     */
     public void setDataSource(DataSource dataSource) {
         this.dataSource = dataSource;
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/83550d19/components/camel-openshift/src/main/java/org/apache/camel/component/openshift/OpenShiftEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-openshift/src/main/java/org/apache/camel/component/openshift/OpenShiftEndpoint.java
b/components/camel-openshift/src/main/java/org/apache/camel/component/openshift/OpenShiftEndpoint.java
index df17818..489d0d0 100644
--- a/components/camel-openshift/src/main/java/org/apache/camel/component/openshift/OpenShiftEndpoint.java
+++ b/components/camel-openshift/src/main/java/org/apache/camel/component/openshift/OpenShiftEndpoint.java
@@ -26,18 +26,19 @@ import org.apache.camel.impl.DefaultExchange;
 import org.apache.camel.impl.ScheduledPollEndpoint;
 import org.apache.camel.spi.UriEndpoint;
 import org.apache.camel.spi.UriParam;
+import org.apache.camel.spi.UriPath;
 import org.apache.camel.util.ObjectHelper;
 
-@UriEndpoint(scheme = "openshift", consumerClass = OpenShiftConsumer.class)
+@UriEndpoint(scheme = "openshift", consumerClass = OpenShiftConsumer.class, label = "cloud")
 public class OpenShiftEndpoint extends ScheduledPollEndpoint {
 
+    @UriPath
+    private String clientId;
     @UriParam
     private String username;
     @UriParam
     private String password;
     @UriParam
-    private String clientId;
-    @UriParam
     private String domain;
     @UriParam
     private String server;

http://git-wip-us.apache.org/repos/asf/camel/blob/83550d19/components/camel-openshift/src/test/java/org/apache/camel/component/openshift/OpenShiftComponentConfigurationAndDocumentationTest.java
----------------------------------------------------------------------
diff --git a/components/camel-openshift/src/test/java/org/apache/camel/component/openshift/OpenShiftComponentConfigurationAndDocumentationTest.java
b/components/camel-openshift/src/test/java/org/apache/camel/component/openshift/OpenShiftComponentConfigurationAndDocumentationTest.java
index dba275d..069fce2 100644
--- a/components/camel-openshift/src/test/java/org/apache/camel/component/openshift/OpenShiftComponentConfigurationAndDocumentationTest.java
+++ b/components/camel-openshift/src/test/java/org/apache/camel/component/openshift/OpenShiftComponentConfigurationAndDocumentationTest.java
@@ -43,7 +43,7 @@ public class OpenShiftComponentConfigurationAndDocumentationTest extends
CamelTe
         assertNotNull(json);
 
         assertTrue(json.contains("\"application\": { \"kind\": \"parameter\", \"type\": \"string\""));
-        assertTrue(json.contains("\"clientId\": { \"kind\": \"parameter\", \"type\": \"string\""));
+        assertTrue(json.contains("\"clientId\": { \"kind\": \"path\", \"type\": \"string\""));
         assertTrue(json.contains("\"operation\": { \"kind\": \"parameter\", \"type\": \"string\""));
     }
 

http://git-wip-us.apache.org/repos/asf/camel/blob/83550d19/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzComponent.java
b/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzComponent.java
index 86e471a..edf27a8 100644
--- a/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzComponent.java
+++ b/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzComponent.java
@@ -159,6 +159,9 @@ public class QuartzComponent extends UriEndpointComponent implements StartupList
         }
 
         QuartzEndpoint answer = new QuartzEndpoint(uri, this);
+        answer.setGroupName(group);
+        answer.setTimerName(name);
+
         setProperties(answer.getJobDetail(), jobParameters);
 
         // enrich job data map with trigger information

http://git-wip-us.apache.org/repos/asf/camel/blob/83550d19/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzEndpoint.java
b/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzEndpoint.java
index b1c6ac0..43fcb7e 100644
--- a/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzEndpoint.java
+++ b/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzEndpoint.java
@@ -28,6 +28,7 @@ import org.apache.camel.processor.loadbalancer.LoadBalancer;
 import org.apache.camel.processor.loadbalancer.RoundRobinLoadBalancer;
 import org.apache.camel.spi.UriEndpoint;
 import org.apache.camel.spi.UriParam;
+import org.apache.camel.spi.UriPath;
 import org.apache.camel.support.ServiceSupport;
 import org.apache.camel.util.ObjectHelper;
 import org.apache.camel.util.ServiceHelper;
@@ -52,11 +53,15 @@ public class QuartzEndpoint extends DefaultEndpoint implements ShutdownableServi
     private Trigger trigger;
     private JobDetail jobDetail = new JobDetail();
     private volatile boolean started;
-    @UriParam
-    private volatile boolean stateful;
-    @UriParam
+    @UriPath
+    private String groupName;
+    @UriPath
+    private String timerName;
+    @UriParam(defaultValue = "false")
+    private boolean stateful;
+    @UriParam(defaultValue = "true")
     private boolean deleteJob = true;
-    @UriParam
+    @UriParam(defaultValue = "false")
     private boolean pauseJob;
     /** If it is true, the CamelContext name is used,
      *  if it is false, use the CamelContext management name which could be changed during
the deploy time 
@@ -189,6 +194,22 @@ public class QuartzEndpoint extends DefaultEndpoint implements ShutdownableServi
         return loadBalancer;
     }
 
+    public String getGroupName() {
+        return groupName;
+    }
+
+    public void setGroupName(String groupName) {
+        this.groupName = groupName;
+    }
+
+    public String getTimerName() {
+        return timerName;
+    }
+
+    public void setTimerName(String timerName) {
+        this.timerName = timerName;
+    }
+
     public void setLoadBalancer(final LoadBalancer loadBalancer) {
         this.loadBalancer = loadBalancer;
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/83550d19/components/camel-quartz/src/test/java/org/apache/camel/component/quartz/QuartzComponentConfigurationAndDocumentationTest.java
----------------------------------------------------------------------
diff --git a/components/camel-quartz/src/test/java/org/apache/camel/component/quartz/QuartzComponentConfigurationAndDocumentationTest.java
b/components/camel-quartz/src/test/java/org/apache/camel/component/quartz/QuartzComponentConfigurationAndDocumentationTest.java
index 801f582..336578e 100644
--- a/components/camel-quartz/src/test/java/org/apache/camel/component/quartz/QuartzComponentConfigurationAndDocumentationTest.java
+++ b/components/camel-quartz/src/test/java/org/apache/camel/component/quartz/QuartzComponentConfigurationAndDocumentationTest.java
@@ -43,6 +43,7 @@ public class QuartzComponentConfigurationAndDocumentationTest extends CamelTestS
         String json = compConf.createParameterJsonSchema();
         assertNotNull(json);
 
+        assertTrue(json.contains("\"groupName\": { \"kind\": \"path\", \"type\": \"string\""));
         assertTrue(json.contains("\"stateful\": { \"kind\": \"parameter\", \"type\": \"boolean\""));
         assertTrue(json.contains("\"deleteJob\": { \"kind\": \"parameter\", \"type\": \"boolean\""));
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/83550d19/components/camel-quartz2/src/main/java/org/apache/camel/component/quartz2/QuartzEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-quartz2/src/main/java/org/apache/camel/component/quartz2/QuartzEndpoint.java
b/components/camel-quartz2/src/main/java/org/apache/camel/component/quartz2/QuartzEndpoint.java
index 7688349..25b871f 100644
--- a/components/camel-quartz2/src/main/java/org/apache/camel/component/quartz2/QuartzEndpoint.java
+++ b/components/camel-quartz2/src/main/java/org/apache/camel/component/quartz2/QuartzEndpoint.java
@@ -31,6 +31,7 @@ import org.apache.camel.processor.loadbalancer.LoadBalancer;
 import org.apache.camel.processor.loadbalancer.RoundRobinLoadBalancer;
 import org.apache.camel.spi.UriEndpoint;
 import org.apache.camel.spi.UriParam;
+import org.apache.camel.spi.UriPath;
 import org.apache.camel.util.EndpointHelper;
 import org.quartz.CronTrigger;
 import org.quartz.Job;
@@ -57,31 +58,35 @@ import static org.quartz.SimpleScheduleBuilder.simpleSchedule;
 public class QuartzEndpoint extends DefaultEndpoint {
     private static final Logger LOG = LoggerFactory.getLogger(QuartzEndpoint.class);
     private TriggerKey triggerKey;
+    @UriPath
+    private String groupName;
+    @UriPath
+    private String triggerName;
     @UriParam
     private String cron;
     private LoadBalancer consumerLoadBalancer;
     private Map<String, Object> triggerParameters;
     private Map<String, Object> jobParameters;
-    @UriParam
+    @UriParam(defaultValue = "false")
     private boolean stateful;
-    @UriParam
+    @UriParam(defaultValue = "false")
     private boolean fireNow;
-    @UriParam
+    @UriParam(defaultValue = "true")
     private boolean deleteJob = true;
-    @UriParam
+    @UriParam(defaultValue = "false")
     private boolean pauseJob;
-    @UriParam
+    @UriParam(defaultValue = "false")
     private boolean durableJob;
-    @UriParam
+    @UriParam(defaultValue = "false")
     private boolean recoverableJob;
     /** In case of scheduler has already started, we want the trigger start slightly after
current time to
      * ensure endpoint is fully started before the job kicks in. */
-    @UriParam
+    @UriParam(defaultValue = "500")
     private long triggerStartDelay = 500; // in millis second
     /** If it is true, the CamelContext name is used,
      *  if it is false, use the CamelContext management name which could be changed during
the deploy time 
      **/
-    @UriParam
+    @UriParam(defaultValue = "false")
     private boolean usingFixedCamelContextName;
 
     // An internal variables to track whether a job has been in scheduler or not, and has
it paused or not.
@@ -92,6 +97,18 @@ public class QuartzEndpoint extends DefaultEndpoint {
         super(uri, quartzComponent);
     }
 
+    public String getGroupName() {
+        return triggerKey.getName();
+    }
+
+    public String getTriggerName() {
+        return triggerKey.getName();
+    }
+
+    public void setTriggerName(String triggerName) {
+        this.triggerName = triggerName;
+    }
+
     public String getCron() {
         return cron;
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/83550d19/components/camel-quartz2/src/test/java/org/apache/camel/component/quartz2/Quartz2ComponentConfigurationAndDocumentationTest.java
----------------------------------------------------------------------
diff --git a/components/camel-quartz2/src/test/java/org/apache/camel/component/quartz2/Quartz2ComponentConfigurationAndDocumentationTest.java
b/components/camel-quartz2/src/test/java/org/apache/camel/component/quartz2/Quartz2ComponentConfigurationAndDocumentationTest.java
index f61e2bf..442f53e 100644
--- a/components/camel-quartz2/src/test/java/org/apache/camel/component/quartz2/Quartz2ComponentConfigurationAndDocumentationTest.java
+++ b/components/camel-quartz2/src/test/java/org/apache/camel/component/quartz2/Quartz2ComponentConfigurationAndDocumentationTest.java
@@ -41,6 +41,7 @@ public class Quartz2ComponentConfigurationAndDocumentationTest extends CamelTest
         String json = compConf.createParameterJsonSchema();
         assertNotNull(json);
 
+        assertTrue(json.contains("\"groupName\": { \"kind\": \"path\", \"type\": \"string\""));
         assertTrue(json.contains("\"cron\": { \"kind\": \"parameter\", \"type\": \"string\""));
         assertTrue(json.contains("\"fireNow\": { \"kind\": \"parameter\", \"type\": \"boolean\""));
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/83550d19/components/camel-spark-rest/src/main/java/org/apache/camel/component/sparkrest/SparkConfiguration.java
----------------------------------------------------------------------
diff --git a/components/camel-spark-rest/src/main/java/org/apache/camel/component/sparkrest/SparkConfiguration.java
b/components/camel-spark-rest/src/main/java/org/apache/camel/component/sparkrest/SparkConfiguration.java
index a6a72a7..1367645 100644
--- a/components/camel-spark-rest/src/main/java/org/apache/camel/component/sparkrest/SparkConfiguration.java
+++ b/components/camel-spark-rest/src/main/java/org/apache/camel/component/sparkrest/SparkConfiguration.java
@@ -22,13 +22,13 @@ import org.apache.camel.spi.UriParams;
 @UriParams
 public class SparkConfiguration {
 
-    @UriParam
+    @UriParam(defaultValue = "true")
     private boolean mapHeaders = true;
-    @UriParam
+    @UriParam(defaultValue = "false")
     private boolean disableStreamCache;
-    @UriParam
+    @UriParam(defaultValue = "false")
     private boolean urlDecodeHeaders;
-    @UriParam
+    @UriParam(defaultValue = "false")
     private boolean transferException;
 
     public boolean isMapHeaders() {

http://git-wip-us.apache.org/repos/asf/camel/blob/83550d19/components/camel-spark-rest/src/main/java/org/apache/camel/component/sparkrest/SparkEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-spark-rest/src/main/java/org/apache/camel/component/sparkrest/SparkEndpoint.java
b/components/camel-spark-rest/src/main/java/org/apache/camel/component/sparkrest/SparkEndpoint.java
index 63a3b1f..f655abf 100644
--- a/components/camel-spark-rest/src/main/java/org/apache/camel/component/sparkrest/SparkEndpoint.java
+++ b/components/camel-spark-rest/src/main/java/org/apache/camel/component/sparkrest/SparkEndpoint.java
@@ -23,21 +23,22 @@ import org.apache.camel.Producer;
 import org.apache.camel.impl.DefaultEndpoint;
 import org.apache.camel.spi.UriEndpoint;
 import org.apache.camel.spi.UriParam;
+import org.apache.camel.spi.UriPath;
 import org.apache.camel.util.ObjectHelper;
 import spark.route.HttpMethod;
 
-@UriEndpoint(scheme = "spark", consumerClass =  SparkConsumer.class)
+@UriEndpoint(scheme = "spark-rest", consumerClass =  SparkConsumer.class, label = "rest")
 public class SparkEndpoint extends DefaultEndpoint {
 
+    @UriPath
+    private String verb;
+    @UriPath
+    private String path;
     @UriParam
     SparkConfiguration sparkConfiguration;
     @UriParam
     private SparkBinding sparkBinding;
     @UriParam
-    private String verb;
-    @UriParam
-    private String path;
-    @UriParam
     private String accept;
 
     public SparkEndpoint(String endpointUri, Component component) {


Mime
View raw message