Repository: camel
Updated Branches:
  refs/heads/master 5c2ec8534 -> 2c11b4e4f


First cut of mvn goal to generate/update component readme.md file. Make the 
plugin update the existing adoc file to keep the endpoint options up to date.


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

Branch: refs/heads/master
Commit: 2c11b4e4f822c8c511518325c32e9e205bcc03d7
Parents: 5c2ec85
Author: Claus Ibsen <[email protected]>
Authored: Wed Jan 27 11:19:38 2016 +0100
Committer: Claus Ibsen <[email protected]>
Committed: Wed Jan 27 11:19:38 2016 +0100

----------------------------------------------------------------------
 components/camel-ahc/src/main/docs/ahc.adoc     | 28 +++++++++++---------
 .../maven/packaging/model/ComponentModel.java   |  7 +++++
 .../packaging/model/ComponentOptionModel.java   |  7 +++++
 .../packaging/model/EndpointOptionModel.java    |  7 +++++
 .../src/main/resources/component-options.mvel   |  2 +-
 .../src/main/resources/endpoint-options.mvel    |  4 +--
 6 files changed, 39 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/2c11b4e4/components/camel-ahc/src/main/docs/ahc.adoc
----------------------------------------------------------------------
diff --git a/components/camel-ahc/src/main/docs/ahc.adoc 
b/components/camel-ahc/src/main/docs/ahc.adoc
index f861458..07a2b4e 100644
--- a/components/camel-ahc/src/main/docs/ahc.adoc
+++ b/components/camel-ahc/src/main/docs/ahc.adoc
@@ -45,30 +45,32 @@ AhcEndpoint Options
 
 
 
+
 // endpoint options: START
 The AHC component supports 12 endpoint options which are listed below:
 
-[width="100%",cols="10%,5%,5%,10%,5%,65%",options="header",]
+[width="100%",cols="2s,1,1,1m,1m,4",options="header",]
 |=======================================================================
 | Name | Group | Required | Default | Java Type | Description
-| `httpUri` | producer | `true` | `` | `URI` | The URI to use such as 
http://hostname:port/path
-| `binding` | producer | `` | `` | `AhcBinding` | To use a custom AhcBinding 
which allows to control how to bind between AHC and Camel.
-| `bridgeEndpoint` | producer | `` | `false` | `boolean` | If the option is 
true then the Exchange.HTTP_URI header is ignored and use the endpoint's URI 
for request. You may also set the throwExceptionOnFailure to be false to let 
the AhcProducer send all the fault response back.
-| `bufferSize` | producer | `` | `4096` | `int` | The initial in-memory buffer 
size used when transferring data between Camel and AHC Client.
-| `headerFilterStrategy` | producer | `` | `` | `HeaderFilterStrategy` | To 
use a custom HeaderFilterStrategy to filter header to and from Camel message.
-| `throwExceptionOnFailure` | producer | `` | `true` | `boolean` | Option to 
disable throwing the AhcOperationFailedException in case of failed responses 
from the remote server. This allows you to get all responses regardless of the 
HTTP status code.
-| `transferException` | producer | `` | `false` | `boolean` | If enabled and 
an Exchange failed processing on the consumer side and if the caused Exception 
was send back serialized in the response as a 
application/x-java-serialized-object content type (for example using Jetty or 
Servlet Camel components). On the producer side the exception will be 
deserialized and thrown as is instead of the AhcOperationFailedException. The 
caused exception is required to be serialized. This is by default turned off. 
If you enable this then be aware that Java will deserialize the incoming data 
from the request to Java and that can be a potential security risk.
-| `clientConfig` | advanced | `` | `` | `AsyncHttpClientConfig` | To configure 
the AsyncHttpClient to use a custom com.ning.http.client.AsyncHttpClientConfig 
instance.
-| `clientConfigOptions` | advanced | `` | `` | `Object>` | To configure the 
AsyncHttpClientConfig using the key/values from the Map.
-| `exchangePattern` | advanced | `` | `InOnly` | `ExchangePattern` | Sets the 
default exchange pattern when creating an exchange
-| `synchronous` | advanced | `` | `false` | `boolean` | Sets whether 
synchronous processing should be strictly used or Camel is allowed to use 
asynchronous processing (if supported).
-| `sslContextParameters` | security | `` | `` | `SSLContextParameters` | 
Reference to a org.apache.camel.util.jsse.SSLContextParameters in the Registry. 
This reference overrides any configured SSLContextParameters at the component 
level. See Using the JSSE Configuration Utility. Note that configuring this 
option will override any SSL/TLS configuration options provided through the 
clientConfig option at the endpoint or component level.
+| httpUri | producer | true |  | URI | The URI to use such as 
http://hostname:port/path
+| binding | producer |  |  | AhcBinding | To use a custom AhcBinding which 
allows to control how to bind between AHC and Camel.
+| bridgeEndpoint | producer |  | false | boolean | If the option is true then 
the Exchange.HTTP_URI header is ignored and use the endpoint's URI for request. 
You may also set the throwExceptionOnFailure to be false to let the AhcProducer 
send all the fault response back.
+| bufferSize | producer |  | 4096 | int | The initial in-memory buffer size 
used when transferring data between Camel and AHC Client.
+| headerFilterStrategy | producer |  |  | HeaderFilterStrategy | To use a 
custom HeaderFilterStrategy to filter header to and from Camel message.
+| throwExceptionOnFailure | producer |  | true | boolean | Option to disable 
throwing the AhcOperationFailedException in case of failed responses from the 
remote server. This allows you to get all responses regardless of the HTTP 
status code.
+| transferException | producer |  | false | boolean | If enabled and an 
Exchange failed processing on the consumer side and if the caused Exception was 
send back serialized in the response as a application/x-java-serialized-object 
content type (for example using Jetty or Servlet Camel components). On the 
producer side the exception will be deserialized and thrown as is instead of 
the AhcOperationFailedException. The caused exception is required to be 
serialized. This is by default turned off. If you enable this then be aware 
that Java will deserialize the incoming data from the request to Java and that 
can be a potential security risk.
+| clientConfig | advanced |  |  | AsyncHttpClientConfig | To configure the 
AsyncHttpClient to use a custom com.ning.http.client.AsyncHttpClientConfig 
instance.
+| clientConfigOptions | advanced |  |  | Map | To configure the 
AsyncHttpClientConfig using the key/values from the Map.
+| exchangePattern | advanced |  | InOnly | ExchangePattern | Sets the default 
exchange pattern when creating an exchange
+| synchronous | advanced |  | false | boolean | Sets whether synchronous 
processing should be strictly used or Camel is allowed to use asynchronous 
processing (if supported).
+| sslContextParameters | security |  |  | SSLContextParameters | Reference to 
a org.apache.camel.util.jsse.SSLContextParameters in the Registry. This 
reference overrides any configured SSLContextParameters at the component level. 
See Using the JSSE Configuration Utility. Note that configuring this option 
will override any SSL/TLS configuration options provided through the 
clientConfig option at the endpoint or component level.
 |=======================================================================
 // endpoint options: END
 
 
 
 
+
 [[AHC-AhcComponentOptions]]
 AhcComponent Options
 ^^^^^^^^^^^^^^^^^^^^

http://git-wip-us.apache.org/repos/asf/camel/blob/2c11b4e4/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/model/ComponentModel.java
----------------------------------------------------------------------
diff --git 
a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/model/ComponentModel.java
 
b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/model/ComponentModel.java
index ee1f463..045e227 100644
--- 
a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/model/ComponentModel.java
+++ 
b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/model/ComponentModel.java
@@ -166,6 +166,13 @@ public class ComponentModel {
     }
 
     public String getShortJavaType() {
+        if (javaType.startsWith("java.util.Map")) {
+            return "Map";
+        } else if (javaType.startsWith("java.util.Set")) {
+            return "Set";
+        } else if (javaType.startsWith("java.util.List")) {
+            return "List";
+        }
         int pos = javaType.lastIndexOf(".");
         if (pos != -1) {
             return javaType.substring(pos + 1);

http://git-wip-us.apache.org/repos/asf/camel/blob/2c11b4e4/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/model/ComponentOptionModel.java
----------------------------------------------------------------------
diff --git 
a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/model/ComponentOptionModel.java
 
b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/model/ComponentOptionModel.java
index a9b6734..e0e58f5 100644
--- 
a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/model/ComponentOptionModel.java
+++ 
b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/model/ComponentOptionModel.java
@@ -74,6 +74,13 @@ public class ComponentOptionModel {
     }
 
     public String getShortJavaType() {
+        if (javaType.startsWith("java.util.Map")) {
+            return "Map";
+        } else if (javaType.startsWith("java.util.Set")) {
+            return "Set";
+        } else if (javaType.startsWith("java.util.List")) {
+            return "List";
+        }
         int pos = javaType.lastIndexOf(".");
         if (pos != -1) {
             return javaType.substring(pos + 1);

http://git-wip-us.apache.org/repos/asf/camel/blob/2c11b4e4/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/model/EndpointOptionModel.java
----------------------------------------------------------------------
diff --git 
a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/model/EndpointOptionModel.java
 
b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/model/EndpointOptionModel.java
index 5ae2a27..01ab383 100644
--- 
a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/model/EndpointOptionModel.java
+++ 
b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/model/EndpointOptionModel.java
@@ -128,6 +128,13 @@ public class EndpointOptionModel {
     }
 
     public String getShortJavaType() {
+        if (javaType.startsWith("java.util.Map")) {
+            return "Map";
+        } else if (javaType.startsWith("java.util.Set")) {
+            return "Set";
+        } else if (javaType.startsWith("java.util.List")) {
+            return "List";
+        }
         int pos = javaType.lastIndexOf(".");
         if (pos != -1) {
             return javaType.substring(pos + 1);

http://git-wip-us.apache.org/repos/asf/camel/blob/2c11b4e4/tooling/maven/camel-package-maven-plugin/src/main/resources/component-options.mvel
----------------------------------------------------------------------
diff --git 
a/tooling/maven/camel-package-maven-plugin/src/main/resources/component-options.mvel
 
b/tooling/maven/camel-package-maven-plugin/src/main/resources/component-options.mvel
index 974a642..2fef2fa 100644
--- 
a/tooling/maven/camel-package-maven-plugin/src/main/resources/component-options.mvel
+++ 
b/tooling/maven/camel-package-maven-plugin/src/main/resources/component-options.mvel
@@ -7,7 +7,7 @@ The @{title} component supports @{componentOptions.size()} 
options which are lis
 
 | Name | Java Type | Description |
 | ---- | --------- | ----------- |
-@foreach{row : componentOptions}| @{row.name} | @{row.shortJavaType} | 
@{row.description} |
+@foreach{row : componentOptions}| @{row.name} | `@{row.shortJavaType}` | 
@{row.description} |
 @end{}
 
 #### Configuring component options

http://git-wip-us.apache.org/repos/asf/camel/blob/2c11b4e4/tooling/maven/camel-package-maven-plugin/src/main/resources/endpoint-options.mvel
----------------------------------------------------------------------
diff --git 
a/tooling/maven/camel-package-maven-plugin/src/main/resources/endpoint-options.mvel
 
b/tooling/maven/camel-package-maven-plugin/src/main/resources/endpoint-options.mvel
index d462ec9..59fb1e3 100644
--- 
a/tooling/maven/camel-package-maven-plugin/src/main/resources/endpoint-options.mvel
+++ 
b/tooling/maven/camel-package-maven-plugin/src/main/resources/endpoint-options.mvel
@@ -1,7 +1,7 @@
 The @{title} component supports @{endpointOptions.size()} endpoint options 
which are listed below:
 
-[width="100%",cols="10%,5%,5%,10%,5%,65%",options="header",]
+[width="100%",cols="2s,1,1,1m,1m,4",options="header",]
 |=======================================================================
 | Name | Group | Required | Default | Java Type | Description
-@foreach{row : endpointOptions}| `@{row.name}` | @{row.group} | 
`@{row.required}` | `@{row.defaultValue}` | `@{row.shortJavaType}` | 
@{row.description}
+@foreach{row : endpointOptions}| @{row.name} | @{row.group} | @{row.required} 
| @{row.defaultValue} | @{row.shortJavaType} | @{row.description}
 @end{}|=======================================================================

Reply via email to