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 2016/01/04 18:07:50 UTC
[6/6] camel git commit: CAMEL-9472: Add multi value to component docs
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/15856d24
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/15856d24
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/15856d24
Branch: refs/heads/camel-2.16.x
Commit: 15856d24c60ce6b1e44a3a4e4afd8f0528c9e44d
Parents: 5a9df4f
Author: Claus Ibsen <da...@apache.org>
Authored: Mon Jan 4 18:04:08 2016 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Mon Jan 4 18:07:01 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/15856d24/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 6731421..d6904f2 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
@@ -40,7 +40,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/15856d24/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/15856d24/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 a2d51ce..3a78cfd 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/15856d24/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&accessKey=key&secretKey=secret&domainName=testDomain&version=1.0&eventName=testEvent"/>
+ <to uri="aws-swf:workflow?amazonSWClient=#amazonSWClient&accessKey=key&secretKey=secret&domainName=testDomain&version=1.0&eventName=testEvent"/>
<to uri="mock:result"/>
</route>
</camelContext>