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

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

commit d39ed0badcce916fdf48ad821d8ec3a5d216d6fa
Author: Bilgin Ibryam <bibr...@gmail.com>
AuthorDate: Fri Jun 1 00:33:13 2018 +0100

    CAMEL-12530:fixed documentationn tags
---
 .../camel-web3j/src/main/docs/web3j-component.adoc |  46 ++++--
 .../camel/component/web3j/Web3jConfiguration.java  | 157 ++++++++++++++++++++-
 .../camel/component/web3j/Web3jEndpoint.java       |  20 ++-
 3 files changed, 209 insertions(+), 14 deletions(-)

diff --git a/components/camel-web3j/src/main/docs/web3j-component.adoc 
b/components/camel-web3j/src/main/docs/web3j-component.adoc
index be802c6..5635dbd 100644
--- a/components/camel-web3j/src/main/docs/web3j-component.adoc
+++ b/components/camel-web3j/src/main/docs/web3j-component.adoc
@@ -1,5 +1,4 @@
-[[web3j-component]]
-== web3j Component
+== Web3j client for Ethereum blockchain Component
 
 *Available as of Camel version 2.22*
 
@@ -21,7 +20,7 @@ You can append query options to the URI in the following 
format,
 === Web3j Options
 
 // component options: START
-The web3j component supports 2 options which are listed below.
+The Web3j client for Ethereum blockchain component supports 2 options which 
are listed below.
 
 
 
@@ -34,10 +33,10 @@ The web3j component supports 2 options which are listed 
below.
 // component options: END
 
 // endpoint options: START
-The web3j endpoint is configured using URI syntax:
+The Web3j client for Ethereum blockchain endpoint is configured using URI 
syntax:
 
 ----
-web3j:cmsUrl
+web3j:host:port
 ----
 
 with the following path and query parameters:
@@ -48,22 +47,51 @@ with the following path and query parameters:
 [width="100%",cols="2,5,^1,2",options="header"]
 |===
 | Name | Description | Default | Type
-| *web3j* | *Required* URL to the web3j repository |  | Web3j
+| *nodeAddress* | *Required* Sets the node address used to communicate |  | 
String
 |===
 
 
-==== Query Parameters (5 parameters):
+==== Query Parameters (36 parameters):
 
 
 [width="100%",cols="2,5,^1,2",options="header"]
 |===
 | Name | Description | Default | Type
+| *addresses* (common) | Contract address or a list of addresses. |  | List
+| *fromAddress* (common) | The address the transaction is send from |  | String
+| *fromBlock* (common) | The block number, or the string latest for the last 
mined block or pending, earliest for not yet mined transactions. | latest | 
DefaultBlockParameter
+| *fullTransactionObjects* (common) | If true it returns the full transaction 
objects, if false only the hashes of the transactions. | false | boolean
+| *gasLimit* (common) | The maximum gas allowed in this block. |  | BigInteger
+| *toAddress* (common) | The address the transaction is directed to. |  | 
String
+| *toBlock* (common) | The block number, or the string latest for the last 
mined block or pending, earliest for not yet mined transactions. | latest | 
DefaultBlockParameter
+| *topics* (common) | Topics are order-dependent. Each topic can also be a 
list of topics. |  | List
+| *web3j* (common) | The preconfigured Web3j object. |  | Web3j
 | *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
+| *address* (producer) | Contract address. |  | String
+| *atBlock* (producer) | The block number, or the string latest for the last 
mined block or pending, earliest for not yet mined transactions. | latest | 
DefaultBlockParameter
+| *blockHash* (producer) | Hash of the block where this transaction was in. |  
| String
+| *clientId* (producer) | A random hexadecimal(32 bytes) ID identifying the 
client. |  | String
+| *data* (producer) | The compiled code of a contract OR the hash of the 
invoked method signature and encoded parameters. |  | String
+| *databaseName* (producer) | The local database name. |  | String
+| *filterId* (producer) | The filter id to use. |  | BigInteger
+| *gasPrice* (producer) | Gas price used for each paid gas. |  | BigInteger
+| *hashrate* (producer) | A hexadecimal string representation (32 bytes) of 
the hash rate. |  | String
+| *headerPowHash* (producer) | The header's pow-hash (256 bits) used for 
submitting a proof-of-work solution. |  | String
+| *keyName* (producer) | The key name in the database. |  | String
+| *mixDigest* (producer) | The mix digest (256 bits) used for submitting a 
proof-of-work solution. |  | String
+| *nonce* (producer) | The nonce found (64 bits) used for submitting a 
proof-of-work solution. |  | String
 | *operation* (producer) | Operation to use. | transaction | String
+| *position* (producer) | The transaction index position withing a block. |  | 
BigInteger
+| *priority* (producer) | The priority of a whisper message. |  | BigInteger
+| *sha3HashOfDataToSign* (producer) | Message to sign by calculating an 
Ethereum specific signature. |  | String
+| *signedTransactionData* (producer) | The signed transaction data for a new 
message call transaction or a contract creation for signed transactions. |  | 
String
+| *sourceCode* (producer) | The source code to compile. |  | String
+| *transactionHash* (producer) | The information about a transaction requested 
by transaction hash. |  | String
+| *transactionIndex* (producer) | The transactions index position in the 
block. |  | BigInteger
+| *ttl* (producer) | The time to live in seconds of a whisper message. |  | 
BigInteger
+| *value* (producer) | The value sent within a transaction. |  | BigInteger
 | *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
-
-
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 b8a7ed0..95a1cbf 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
@@ -29,46 +29,109 @@ 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(); // 
TODO: Make this an enum
+
+    @UriParam(label = "common", defaultValue = "latest")
     private DefaultBlockParameter fromBlock;
+
+    @UriParam(label = "common", defaultValue = "latest")
     private DefaultBlockParameter toBlock;
+
+    @UriParam(label = "producer", defaultValue = "latest")
     private DefaultBlockParameter atBlock;
+
+    @UriParam(label = "common")
     private List<String> addresses;
+
+    @UriParam(label = "producer")
     private String address;
+
+    @UriParam(label = "common")
     private List<String> topics; //TODO doesn't support list of lists
+
+    @UriParam(label = "producer")
     private BigInteger position;
+
+    @UriParam(label = "producer")
     private String blockHash;
+
+    @UriParam(label = "producer")
     private String sha3HashOfDataToSign;
+
+    @UriParam(label = "producer")
     private String signedTransactionData;
+
+    @UriParam(label = "producer")
     private BigInteger transactionIndex;
+
+    @UriParam(label = "producer")
     private BigInteger filterId;
+
+    @UriParam(label = "producer")
     private String databaseName;
+
+    @UriParam(label = "producer")
     private String keyName;
+
+    @UriParam(label = "producer")
     private String transactionHash;
+
+    @UriParam(label = "producer")
     private String sourceCode;
+
+    @UriParam(label = "producer")
     private String nonce;
+
+    @UriParam(label = "producer")
     private String headerPowHash;
+
+    @UriParam(label = "producer")
     private String mixDigest;
+
+    @UriParam(label = "producer")
     private String hashrate;
+
+    @UriParam(label = "producer")
     private String clientId;
+
+    @UriParam(label = "common")
     private String fromAddress;
+
+    @UriParam(label = "common")
     private String toAddress;
+
+    @UriParam(label = "producer")
     private BigInteger gasPrice;
+
+    @UriParam
     private BigInteger gasLimit;
+
+    @UriParam(label = "producer")
     private BigInteger value;
+
+    @UriParam(label = "producer")
     private String data;
+
+    @UriParam(label = "producer")
     private BigInteger priority;
+
+    @UriParam(label = "producer")
     private BigInteger ttl;
+
+    @UriParam(label = "common")
     private Web3j web3j;
+
+    @UriParam(label = "common")
     private boolean fullTransactionObjects;
 
     public Web3j getWeb3j() {
         return web3j;
     }
 
+    /**
+     * The preconfigured Web3j object.
+     */
     public void setWeb3j(Web3j web3j) {
         this.web3j = web3j;
     }
@@ -77,6 +140,9 @@ public class Web3jConfiguration implements Cloneable {
         return priority;
     }
 
+    /**
+     * The priority of a whisper message.
+     */
     public void setPriority(BigInteger priority) {
         this.priority = priority;
     }
@@ -85,6 +151,9 @@ public class Web3jConfiguration implements Cloneable {
         return ttl;
     }
 
+    /**
+     * The time to live in seconds of a whisper message.
+     */
     public void setTtl(BigInteger ttl) {
         this.ttl = ttl;
     }
@@ -93,6 +162,9 @@ public class Web3jConfiguration implements Cloneable {
         return gasPrice;
     }
 
+    /**
+     * Gas price used for each paid gas.
+     */
     public void setGasPrice(BigInteger gasPrice) {
         this.gasPrice = gasPrice;
     }
@@ -101,6 +173,9 @@ public class Web3jConfiguration implements Cloneable {
         return gasLimit;
     }
 
+    /**
+     * The maximum gas allowed in this block.
+     */
     public void setGasLimit(BigInteger gasLimit) {
         this.gasLimit = gasLimit;
     }
@@ -109,6 +184,9 @@ public class Web3jConfiguration implements Cloneable {
         return value;
     }
 
+    /**
+     * The value sent within a transaction.
+     */
     public void setValue(BigInteger value) {
         this.value = value;
     }
@@ -117,6 +195,9 @@ public class Web3jConfiguration implements Cloneable {
         return data;
     }
 
+    /**
+     * The compiled code of a contract OR the hash of the invoked method 
signature and encoded parameters.
+     */
     public void setData(String data) {
         this.data = data;
     }
@@ -125,6 +206,9 @@ public class Web3jConfiguration implements Cloneable {
         return fromAddress;
     }
 
+    /**
+     * The address the transaction is send from
+     */
     public void setFromAddress(String fromAddress) {
         this.fromAddress = fromAddress;
     }
@@ -133,6 +217,9 @@ public class Web3jConfiguration implements Cloneable {
         return toAddress;
     }
 
+    /**
+     * The address the transaction is directed to.
+     */
     public void setToAddress(String toAddress) {
         this.toAddress = toAddress;
     }
@@ -141,6 +228,9 @@ public class Web3jConfiguration implements Cloneable {
         return clientId;
     }
 
+    /**
+     * A random hexadecimal(32 bytes) ID identifying the client.
+     */
     public void setClientId(String clientId) {
         this.clientId = clientId;
     }
@@ -149,6 +239,9 @@ public class Web3jConfiguration implements Cloneable {
         return hashrate;
     }
 
+    /**
+     * A hexadecimal string representation (32 bytes) of the hash rate.
+     */
     public void setHashrate(String hashrate) {
         this.hashrate = hashrate;
     }
@@ -157,6 +250,9 @@ public class Web3jConfiguration implements Cloneable {
         return mixDigest;
     }
 
+    /**
+     * The mix digest (256 bits) used for submitting a proof-of-work solution.
+     */
     public void setMixDigest(String mixDigest) {
         this.mixDigest = mixDigest;
     }
@@ -165,6 +261,9 @@ public class Web3jConfiguration implements Cloneable {
         return headerPowHash;
     }
 
+    /**
+     * The header's pow-hash (256 bits) used for submitting a proof-of-work 
solution.
+     */
     public void setHeaderPowHash(String headerPowHash) {
         this.headerPowHash = headerPowHash;
     }
@@ -173,6 +272,9 @@ public class Web3jConfiguration implements Cloneable {
         return nonce;
     }
 
+    /**
+     * The nonce found (64 bits) used for submitting a proof-of-work solution.
+     */
     public void setNonce(String nonce) {
         this.nonce = nonce;
     }
@@ -181,6 +283,9 @@ public class Web3jConfiguration implements Cloneable {
         return sourceCode;
     }
 
+    /**
+     * The source code to compile.
+     */
     public void setSourceCode(String sourceCode) {
         this.sourceCode = sourceCode;
     }
@@ -189,6 +294,9 @@ public class Web3jConfiguration implements Cloneable {
         return transactionHash;
     }
 
+    /**
+     * The information about a transaction requested by transaction hash.
+     */
     public void setTransactionHash(String transactionHash) {
         this.transactionHash = transactionHash;
     }
@@ -197,6 +305,9 @@ public class Web3jConfiguration implements Cloneable {
         return databaseName;
     }
 
+    /**
+     * The local database name.
+     */
     public void setDatabaseName(String databaseName) {
         this.databaseName = databaseName;
     }
@@ -205,6 +316,9 @@ public class Web3jConfiguration implements Cloneable {
         return keyName;
     }
 
+    /**
+     * The key name in the database.
+     */
     public void setKeyName(String keyName) {
         this.keyName = keyName;
     }
@@ -213,6 +327,9 @@ public class Web3jConfiguration implements Cloneable {
         return filterId;
     }
 
+    /**
+     * The filter id to use.
+     */
     public void setFilterId(BigInteger filterId) {
         this.filterId = filterId;
     }
@@ -221,6 +338,9 @@ public class Web3jConfiguration implements Cloneable {
         return transactionIndex;
     }
 
+    /**
+     * The transactions index position in the block.
+     */
     public void setTransactionIndex(BigInteger transactionIndex) {
         this.transactionIndex = transactionIndex;
     }
@@ -229,6 +349,9 @@ public class Web3jConfiguration implements Cloneable {
         return signedTransactionData;
     }
 
+    /**
+     * The signed transaction data for a new message call transaction or a 
contract creation for signed transactions.
+     */
     public void setSignedTransactionData(String signedTransactionData) {
         this.signedTransactionData = signedTransactionData;
     }
@@ -237,6 +360,9 @@ public class Web3jConfiguration implements Cloneable {
         return blockHash;
     }
 
+    /**
+     * Hash of the block where this transaction was in.
+     */
     public void setBlockHash(String blockHash) {
         this.blockHash = blockHash;
     }
@@ -245,6 +371,9 @@ public class Web3jConfiguration implements Cloneable {
         return sha3HashOfDataToSign;
     }
 
+    /**
+     * Message to sign by calculating an Ethereum specific signature.
+     */
     public void setSha3HashOfDataToSign(String sha3HashOfDataToSign) {
         this.sha3HashOfDataToSign = sha3HashOfDataToSign;
     }
@@ -253,6 +382,9 @@ public class Web3jConfiguration implements Cloneable {
         return position;
     }
 
+    /**
+     * The transaction index position withing a block.
+     */
     public void setPosition(BigInteger position) {
         this.position = position;
     }
@@ -261,10 +393,16 @@ public class Web3jConfiguration implements Cloneable {
         return fromBlock;
     }
 
+    /**
+     * The block number, or the string "latest" for the last mined block or 
"pending", "earliest" for not yet mined transactions.
+     */
     public void setFromBlock(String block) {
         this.fromBlock = toDefaultBlockParameter(block);
     }
 
+    /**
+     * The block number, or the string "latest" for the last mined block or 
"pending", "earliest" for not yet mined transactions.
+     */
     public void setToBlock(String block) {
         this.toBlock = toDefaultBlockParameter(block);
     }
@@ -294,6 +432,9 @@ public class Web3jConfiguration implements Cloneable {
         return atBlock;
     }
 
+    /**
+     * The block number, or the string "latest" for the last mined block or 
"pending", "earliest" for not yet mined transactions.
+     */
     public void setAtBlock(String block) {
         this.atBlock = toDefaultBlockParameter(block);
     }
@@ -302,6 +443,9 @@ public class Web3jConfiguration implements Cloneable {
         return addresses;
     }
 
+    /**
+     * Contract address or a list of addresses.
+     */
     public void setAddresses(List<String> addresses) {
         this.addresses = addresses;
     }
@@ -310,6 +454,9 @@ public class Web3jConfiguration implements Cloneable {
         return topics;
     }
 
+    /**
+     * Topics are order-dependent. Each topic can also be a list of topics.
+     */
     public void setTopics(List<String> topics) {
         this.topics = topics;
     }
@@ -318,6 +465,9 @@ public class Web3jConfiguration implements Cloneable {
         return address;
     }
 
+    /**
+     * Contract address.
+     */
     public void setAddress(String address) {
         this.address = address;
     }
@@ -326,6 +476,9 @@ public class Web3jConfiguration implements Cloneable {
         return fullTransactionObjects;
     }
 
+    /**
+     *  If true it returns the full transaction objects, if false only the 
hashes of the transactions.
+     */
     public void setFullTransactionObjects(boolean fullTransactionObjects) {
         this.fullTransactionObjects = fullTransactionObjects;
     }
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 59e26ba..1158c6b 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
@@ -46,19 +46,22 @@ import org.web3j.protocol.ipc.WindowsIpcService;
 /**
  * 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.22.0", scheme = "web3j", title = "web3j", 
syntax = "web3j:cmsUrl", consumerClass = Web3jConsumer.class, label = 
"web3j,blockchain")
+@UriEndpoint(firstVersion = "2.22.0", scheme = "web3j", title = "Web3j client 
for Ethereum blockchain", syntax = "web3j:host:port", consumerClass = 
Web3jConsumer.class, label = "blockchain, ethereum")
 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;
+
+    @UriPath @Metadata(required = "true")
+    private String nodeAddress;
+
     @UriParam
     private Web3jConfiguration configuration;
 
     public Web3jEndpoint(String uri, String remaining, Web3jComponent 
component, Web3jConfiguration configuration) {
         super(uri, component);
         this.configuration = configuration;
+        this.nodeAddress = remaining;
         this.web3j = buildService(remaining, configuration);
     }
 
@@ -103,6 +106,17 @@ public class Web3jEndpoint extends DefaultEndpoint {
         return Web3j.build(web3jService);
     }
 
+    public String getNodeAddress() {
+        return nodeAddress;
+    }
+
+    /**
+     * Sets the node address used to communicate
+     */
+    public void setNodeAddress(String nodeAddress) {
+        this.nodeAddress = nodeAddress;
+    }
+
     public static EthFilter buildEthFilter(DefaultBlockParameter fromBlock, 
DefaultBlockParameter toBlock, List<String> addresses, List<String> topics) {
         EthFilter filter = new EthFilter(fromBlock, toBlock, addresses);
         addTopics(filter, topics);

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

Reply via email to