This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/master by this push:
     new d7ef9d1  Polished
d7ef9d1 is described below

commit d7ef9d10897fc87dea24b658c6d53bdb2ab90222
Author: Claus Ibsen <claus.ib...@gmail.com>
AuthorDate: Thu Apr 26 10:50:02 2018 +0200

    Polished
---
 .../camel-web3j/src/main/docs/web3j-component.adoc | 44 ++++------------------
 .../camel/component/web3j/Web3jConfiguration.java  |  8 +++-
 .../camel/component/web3j/Web3jEndpoint.java       |  7 +++-
 components/readme.adoc                             |  2 +-
 .../springboot/Web3jComponentConfiguration.java    |  5 ++-
 5 files changed, 26 insertions(+), 40 deletions(-)

diff --git a/components/camel-web3j/src/main/docs/web3j-component.adoc 
b/components/camel-web3j/src/main/docs/web3j-component.adoc
index 617932f..be802c6 100644
--- a/components/camel-web3j/src/main/docs/web3j-component.adoc
+++ b/components/camel-web3j/src/main/docs/web3j-component.adoc
@@ -1,26 +1,24 @@
 [[web3j-component]]
 == web3j Component
 
-*Available as of Camel version 2.20*
-
-*Available as of Camel version 2.20*
+*Available as of Camel version 2.22*
 
 
 The web3j component uses the
 https://github.com/web3j/web3j[web3j] client
 API and allows you to read/write from geth/parity compatible Ethereum nodes.
 
-### URI Format
+=== URI Format
 
-[source,java]
-------------------------------
+[source,text]
+----
 web3j://ethereumServerUrl[?options]
-------------------------------
+----
 
 You can append query options to the URI in the following format,
 ?options=value&option2=value&...
 
-### Web3j Options
+=== Web3j Options
 
 // component options: START
 The web3j component supports 2 options which are listed below.
@@ -54,7 +52,7 @@ with the following path and query parameters:
 |===
 
 
-==== Query Parameters (4 parameters):
+==== Query Parameters (5 parameters):
 
 
 [width="100%",cols="2,5,^1,2",options="header"]
@@ -63,35 +61,9 @@ with the following path and query parameters:
 | *bridgeErrorHandler* (consumer) | Allows for bridging the consumer to the 
Camel routing Error Handler, which mean any exceptions occurred while the 
consumer is trying to pickup incoming messages, or the likes, will now be 
processed as a message and handled by the routing Error Handler. By default the 
consumer will use the org.apache.camel.spi.ExceptionHandler to deal with 
exceptions, that will be logged at WARN or ERROR level and ignored. | false | 
boolean
 | *exceptionHandler* (consumer) | To let the consumer use a custom 
ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this 
options is not in use. By default the consumer will deal with exceptions, that 
will be logged at WARN or ERROR level and ignored. |  | ExceptionHandler
 | *exchangePattern* (consumer) | Sets the exchange pattern when the consumer 
creates an exchange. |  | ExchangePattern
+| *operation* (producer) | Operation to use. | transaction | String
 | *synchronous* (advanced) | Sets whether synchronous processing should be 
strictly used, or Camel is allowed to use asynchronous processing (if 
supported). | false | boolean
 |===
 // endpoint options: END
 
 
-### Usage
-
-
-### Dependencies
-
-Maven users will need to add the following dependency to their pom.xml.
-
-*pom.xml*
-
-[source,xml]
----------------------------------------
-<dependency>
-    <groupId>org.apache.camel</groupId>
-    <artifactId>camel-web3j</artifactId>
-    <version>${camel-version}</version>
-</dependency>
----------------------------------------
-
-where `${camel-version`} must be replaced by the actual version of Camel
-(2.22 or higher).
-
-### See Also
-
-* Configuring Camel
-* Component
-* Endpoint
-* Getting Started
\ No newline at end of file
diff --git 
a/components/camel-web3j/src/main/java/org/apache/camel/component/web3j/Web3jConfiguration.java
 
b/components/camel-web3j/src/main/java/org/apache/camel/component/web3j/Web3jConfiguration.java
index f408dad..b8a7ed0 100644
--- 
a/components/camel-web3j/src/main/java/org/apache/camel/component/web3j/Web3jConfiguration.java
+++ 
b/components/camel-web3j/src/main/java/org/apache/camel/component/web3j/Web3jConfiguration.java
@@ -28,8 +28,11 @@ import org.web3j.protocol.core.DefaultBlockParameterName;
 
 @UriParams
 public class Web3jConfiguration implements Cloneable {
+
+    // TODO: Add javadoc for setter for documentation and add @UriParam to 
each option
+
     @UriParam(label = "producer", defaultValue = "transaction")
-    private String operation = Web3jConstants.TRANSACTION.toLowerCase();
+    private String operation = Web3jConstants.TRANSACTION.toLowerCase(); // 
TODO: Make this an enum
     private DefaultBlockParameter fromBlock;
     private DefaultBlockParameter toBlock;
     private DefaultBlockParameter atBlock;
@@ -331,6 +334,9 @@ public class Web3jConfiguration implements Cloneable {
         return operation;
     }
 
+    /**
+     * Operation to use.
+     */
     public void setOperation(String operation) {
         this.operation = operation;
     }
diff --git 
a/components/camel-web3j/src/main/java/org/apache/camel/component/web3j/Web3jEndpoint.java
 
b/components/camel-web3j/src/main/java/org/apache/camel/component/web3j/Web3jEndpoint.java
index 1f9fce4..ef6810e 100644
--- 
a/components/camel-web3j/src/main/java/org/apache/camel/component/web3j/Web3jEndpoint.java
+++ 
b/components/camel-web3j/src/main/java/org/apache/camel/component/web3j/Web3jEndpoint.java
@@ -24,6 +24,8 @@ import org.apache.camel.Producer;
 import org.apache.camel.impl.DefaultEndpoint;
 import org.apache.camel.spi.Metadata;
 import org.apache.camel.spi.UriEndpoint;
+import org.apache.camel.spi.UriParam;
+import org.apache.camel.spi.UriParams;
 import org.apache.camel.spi.UriPath;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -38,16 +40,19 @@ import org.web3j.protocol.http.HttpService;
 import org.web3j.protocol.ipc.UnixIpcService;
 import org.web3j.protocol.ipc.WindowsIpcService;
 
+// TODO: should it say web3j compliant content repository. Should it not say 
something about blockchain,bitcoin
+
 /**
  * The web3j component uses the Web3j client API and allows you to add/read 
nodes to/from a web3j compliant content repositories.
  */
-@UriEndpoint(firstVersion = "2.20.0", scheme = "web3j", title = "web3j", 
syntax = "web3j:cmsUrl", consumerClass = Web3jConsumer.class, label = 
"web3j,blockchain")
+@UriEndpoint(firstVersion = "2.22.0", scheme = "web3j", title = "web3j", 
syntax = "web3j:cmsUrl", consumerClass = Web3jConsumer.class, label = 
"web3j,blockchain")
 public class Web3jEndpoint extends DefaultEndpoint {
     private static final Logger LOG = 
LoggerFactory.getLogger(Web3jEndpoint.class);
 
     @UriPath(description = "URL to the web3j repository")
     @Metadata(required = "true")
     private final Web3j web3j;
+    @UriParam
     private Web3jConfiguration configuration;
 
     public Web3jEndpoint(String uri, String remaining, Web3jComponent 
component, Web3jConfiguration configuration) {
diff --git a/components/readme.adoc b/components/readme.adoc
index ae52dae..4683b03 100644
--- a/components/readme.adoc
+++ b/components/readme.adoc
@@ -849,7 +849,7 @@ Number of Components: 293 in 200 JAR artifacts (20 
deprecated)
 `weather:name` | 2.12 | Polls the weather information from Open Weather Map.
 
 | link:camel-web3j/src/main/docs/web3j-component.adoc[web3j] (camel-web3j) +
-`web3j:cmsUrl` | 2.20 | The web3j component uses the Web3j client API and 
allows you to add/read nodes to/from a web3j compliant content repositories.
+`web3j:cmsUrl` | 2.22 | The web3j component uses the Web3j client API and 
allows you to add/read nodes to/from a web3j compliant content repositories.
 
 | link:camel-wordpress/src/main/docs/wordpress-component.adoc[Wordpress] 
(camel-wordpress) +
 `wordpress:operation` | 2.21 | Integrates Camel with Wordpress.
diff --git 
a/platforms/spring-boot/components-starter/camel-web3j-starter/src/main/java/org/apache/camel/component/web3j/springboot/Web3jComponentConfiguration.java
 
b/platforms/spring-boot/components-starter/camel-web3j-starter/src/main/java/org/apache/camel/component/web3j/springboot/Web3jComponentConfiguration.java
index 90dbad3..dc179a3 100644
--- 
a/platforms/spring-boot/components-starter/camel-web3j-starter/src/main/java/org/apache/camel/component/web3j/springboot/Web3jComponentConfiguration.java
+++ 
b/platforms/spring-boot/components-starter/camel-web3j-starter/src/main/java/org/apache/camel/component/web3j/springboot/Web3jComponentConfiguration.java
@@ -94,7 +94,10 @@ public class Web3jComponentConfiguration
         private List topics;
         private String address;
         private Boolean fullTransactionObjects;
-        private String operation;
+        /**
+         * Operation to use.
+         */
+        private String operation = "transaction";
 
         public Web3j getWeb3j() {
             return web3j;

-- 
To stop receiving notification emails like this one, please contact
davscl...@apache.org.

Reply via email to