camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [3/6] camel git commit: CAMEL-9472: Add multi value to component docs
Date Mon, 04 Jan 2016 17:07:47 GMT
CAMEL-9472: Add multi value to component docs


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

Branch: refs/heads/master
Commit: 8996d15d7bdb8b16016980c0b99e17944e2ba871
Parents: 846b097
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Mon Jan 4 18:04:08 2016 +0100
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Mon Jan 4 18:04:08 2016 +0100

----------------------------------------------------------------------
 .../camel/component/aws/swf/SWFComponent.java   |  2 +-
 .../component/aws/swf/SWFConfiguration.java     | 25 +++++++++++++++-----
 .../camel/component/aws/swf/SWFEndpoint.java    |  4 ++--
 .../aws/swf/SwfComponentSpringTest-context.xml  |  2 +-
 4 files changed, 23 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/8996d15d/components/camel-aws/src/main/java/org/apache/camel/component/aws/swf/SWFComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-aws/src/main/java/org/apache/camel/component/aws/swf/SWFComponent.java
b/components/camel-aws/src/main/java/org/apache/camel/component/aws/swf/SWFComponent.java
index eadfc02..62467ab 100644
--- a/components/camel-aws/src/main/java/org/apache/camel/component/aws/swf/SWFComponent.java
+++ b/components/camel-aws/src/main/java/org/apache/camel/component/aws/swf/SWFComponent.java
@@ -37,7 +37,7 @@ public class SWFComponent extends UriEndpointComponent {
         configuration.setType(remaining);
         setProperties(configuration, parameters);
         configuration.setClientConfigurationParameters(clientConfigurationParameters);
-        configuration.setsWClientParameters(sWClientParameters);
+        configuration.setSWClientParameters(sWClientParameters);
         configuration.setStartWorkflowOptionsParameters(startWorkflowOptionsParameters);
 
         return new SWFEndpoint(uri, this, configuration);

http://git-wip-us.apache.org/repos/asf/camel/blob/8996d15d/components/camel-aws/src/main/java/org/apache/camel/component/aws/swf/SWFConfiguration.java
----------------------------------------------------------------------
diff --git a/components/camel-aws/src/main/java/org/apache/camel/component/aws/swf/SWFConfiguration.java
b/components/camel-aws/src/main/java/org/apache/camel/component/aws/swf/SWFConfiguration.java
index cdc4633..e002935 100644
--- a/components/camel-aws/src/main/java/org/apache/camel/component/aws/swf/SWFConfiguration.java
+++ b/components/camel-aws/src/main/java/org/apache/camel/component/aws/swf/SWFConfiguration.java
@@ -32,10 +32,6 @@ import org.apache.camel.spi.UriPath;
 @UriParams
 public class SWFConfiguration {
 
-    private Map<String, Object> clientConfigurationParameters;
-    private Map<String, Object> sWClientParameters;
-    private Map<String, Object> startWorkflowOptionsParameters;
-
     @UriPath(enums = "activity,workflow") @Metadata(required = "true")
     private String type;
     @UriParam
@@ -83,6 +79,13 @@ public class SWFConfiguration {
     @UriParam(label = "consumer,activity", defaultValue = "100")
     private int activityThreadPoolSize = 100; // aws-sdk default
 
+    @UriParam(label = "advanced", prefix = "clientConfiguration.", multiValue = true)
+    private Map<String, Object> clientConfigurationParameters;
+    @UriParam(label = "advanced", prefix = "sWClient.", multiValue = true)
+    private Map<String, Object> sWClientParameters;
+    @UriParam(label = "advanced", prefix = "startWorkflowOptions.", multiValue = true)
+    private Map<String, Object> startWorkflowOptionsParameters;
+
     public String getAccessKey() {
         return accessKey;
     }
@@ -175,15 +178,21 @@ public class SWFConfiguration {
         return clientConfigurationParameters;
     }
 
+    /**
+     * To configure the ClientConfiguration using the key/values from the Map.
+     */
     public void setClientConfigurationParameters(Map<String, Object> clientConfigurationParameters)
{
         this.clientConfigurationParameters = clientConfigurationParameters;
     }
 
-    public Map<String, Object> getsWClientParameters() {
+    public Map<String, Object> getSWClientParameters() {
         return sWClientParameters;
     }
 
-    public void setsWClientParameters(Map<String, Object> sWClientParameters) {
+    /**
+     * To configure the AmazonSimpleWorkflowClient using the key/values from the Map.
+     */
+    public void setSWClientParameters(Map<String, Object> sWClientParameters) {
         this.sWClientParameters = sWClientParameters;
     }
 
@@ -202,6 +211,10 @@ public class SWFConfiguration {
         return startWorkflowOptionsParameters;
     }
 
+    /**
+     * To configure the StartWorkflowOptions using the key/values from the Map.
+     * @param startWorkflowOptionsParameters
+     */
     public void setStartWorkflowOptionsParameters(Map<String, Object> startWorkflowOptionsParameters)
{
         this.startWorkflowOptionsParameters = startWorkflowOptionsParameters;
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/8996d15d/components/camel-aws/src/main/java/org/apache/camel/component/aws/swf/SWFEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-aws/src/main/java/org/apache/camel/component/aws/swf/SWFEndpoint.java
b/components/camel-aws/src/main/java/org/apache/camel/component/aws/swf/SWFEndpoint.java
index 86bb519..16d543c 100644
--- a/components/camel-aws/src/main/java/org/apache/camel/component/aws/swf/SWFEndpoint.java
+++ b/components/camel-aws/src/main/java/org/apache/camel/component/aws/swf/SWFEndpoint.java
@@ -95,8 +95,8 @@ public class SWFEndpoint extends DefaultEndpoint {
         }
 
         AmazonSimpleWorkflowClient client = new AmazonSimpleWorkflowClient(credentials, clientConfiguration);
-        if (!configuration.getsWClientParameters().isEmpty()) {
-            setProperties(client, configuration.getsWClientParameters());
+        if (!configuration.getSWClientParameters().isEmpty()) {
+            setProperties(client, configuration.getSWClientParameters());
         }
         return client;
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/8996d15d/components/camel-aws/src/test/resources/org/apache/camel/component/aws/swf/SwfComponentSpringTest-context.xml
----------------------------------------------------------------------
diff --git a/components/camel-aws/src/test/resources/org/apache/camel/component/aws/swf/SwfComponentSpringTest-context.xml
b/components/camel-aws/src/test/resources/org/apache/camel/component/aws/swf/SwfComponentSpringTest-context.xml
index 4b02072..24684b1 100644
--- a/components/camel-aws/src/test/resources/org/apache/camel/component/aws/swf/SwfComponentSpringTest-context.xml
+++ b/components/camel-aws/src/test/resources/org/apache/camel/component/aws/swf/SwfComponentSpringTest-context.xml
@@ -23,7 +23,7 @@
     <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
         <route>
             <from uri="direct:start"/>
-            <to uri="aws-swf://workflow?amazonSWClient=#amazonSWClient&amp;accessKey=key&amp;secretKey=secret&amp;domainName=testDomain&amp;version=1.0&amp;eventName=testEvent"/>
+            <to uri="aws-swf:workflow?amazonSWClient=#amazonSWClient&amp;accessKey=key&amp;secretKey=secret&amp;domainName=testDomain&amp;version=1.0&amp;eventName=testEvent"/>
             <to uri="mock:result"/>
         </route>
     </camelContext>


Mime
View raw message