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 2020/03/20 07:28:08 UTC

[camel] branch master updated: Added more docs for XML DSL

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 496e97d  Added more docs for XML DSL
496e97d is described below

commit 496e97da7858ba6c9a441f20a221b827c7370683
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Fri Mar 20 08:27:49 2020 +0100

    Added more docs for XML DSL
---
 .../util/jsse/AbstractBaseSSLContextParametersFactoryBean.java |  2 ++
 .../util/jsse/AbstractKeyManagersParametersFactoryBean.java    |  8 ++++++++
 .../xml/util/jsse/AbstractKeyStoreParametersFactoryBean.java   | 10 ++++++----
 .../xml/util/jsse/AbstractSSLContextParametersFactoryBean.java |  5 +++++
 .../jsse/AbstractSSLContextServerParametersFactoryBean.java    |  2 ++
 .../util/jsse/AbstractSecureRandomParametersFactoryBean.java   |  7 ++++++-
 .../util/jsse/AbstractTrustManagersParametersFactoryBean.java  |  7 +++++++
 .../org/apache/camel/maven/EipDocumentationEnricherMojo.java   |  5 ++++-
 8 files changed, 40 insertions(+), 6 deletions(-)

diff --git a/core/camel-core-xml/src/main/java/org/apache/camel/core/xml/util/jsse/AbstractBaseSSLContextParametersFactoryBean.java b/core/camel-core-xml/src/main/java/org/apache/camel/core/xml/util/jsse/AbstractBaseSSLContextParametersFactoryBean.java
index f079ab4..7d15ea5 100644
--- a/core/camel-core-xml/src/main/java/org/apache/camel/core/xml/util/jsse/AbstractBaseSSLContextParametersFactoryBean.java
+++ b/core/camel-core-xml/src/main/java/org/apache/camel/core/xml/util/jsse/AbstractBaseSSLContextParametersFactoryBean.java
@@ -19,6 +19,7 @@ package org.apache.camel.core.xml.util.jsse;
 import javax.xml.bind.annotation.XmlAttribute;
 import javax.xml.bind.annotation.XmlTransient;
 
+import org.apache.camel.spi.Metadata;
 import org.apache.camel.support.jsse.BaseSSLContextParameters;
 import org.apache.camel.support.jsse.CipherSuitesParameters;
 import org.apache.camel.support.jsse.FilterParameters;
@@ -36,6 +37,7 @@ public abstract class AbstractBaseSSLContextParametersFactoryBean<T extends Base
     private FilterParametersDefinition secureSocketProtocolsFilter;
 
     @XmlAttribute
+    @Metadata(description = "The optional SSLSessionContext timeout time for javax.net.ssl.SSLSession in seconds.")
     private String sessionTimeout;
 
     @XmlTransient
diff --git a/core/camel-core-xml/src/main/java/org/apache/camel/core/xml/util/jsse/AbstractKeyManagersParametersFactoryBean.java b/core/camel-core-xml/src/main/java/org/apache/camel/core/xml/util/jsse/AbstractKeyManagersParametersFactoryBean.java
index 9f01f60..be2dc62 100644
--- a/core/camel-core-xml/src/main/java/org/apache/camel/core/xml/util/jsse/AbstractKeyManagersParametersFactoryBean.java
+++ b/core/camel-core-xml/src/main/java/org/apache/camel/core/xml/util/jsse/AbstractKeyManagersParametersFactoryBean.java
@@ -22,6 +22,7 @@ import javax.xml.bind.annotation.XmlAccessorType;
 import javax.xml.bind.annotation.XmlAttribute;
 import javax.xml.bind.annotation.XmlTransient;
 
+import org.apache.camel.spi.Metadata;
 import org.apache.camel.support.jsse.KeyManagersParameters;
 
 /**
@@ -32,12 +33,19 @@ import org.apache.camel.support.jsse.KeyManagersParameters;
 public abstract class AbstractKeyManagersParametersFactoryBean extends AbstractJsseUtilFactoryBean<KeyManagersParameters> {
     
     @XmlAttribute
+    @Metadata(description = "The optional password for recovering keys in the key store. Used by the KeyManagerFactory"
+            + " that creates the KeyManagers represented by this object's configuration.")
     protected String keyPassword;
     
     @XmlAttribute
+    @Metadata(description = "The optional provider identifier for the KeyManagerFactory"
+            + " used to create the KeyManagers represented by this object's configuration.")
     protected String provider;
     
     @XmlAttribute
+    @Metadata(description = "The optional algorithm name for the KeyManagerFactory used to create"
+            + " the KeyManagers represented by this object's configuration."
+            + " See the Java Secure Socket Extension Reference Guide</a> for information about standard algorithm names.")
     protected String algorithm;
     
     @XmlTransient
diff --git a/core/camel-core-xml/src/main/java/org/apache/camel/core/xml/util/jsse/AbstractKeyStoreParametersFactoryBean.java b/core/camel-core-xml/src/main/java/org/apache/camel/core/xml/util/jsse/AbstractKeyStoreParametersFactoryBean.java
index ecb7cdf..908695c 100644
--- a/core/camel-core-xml/src/main/java/org/apache/camel/core/xml/util/jsse/AbstractKeyStoreParametersFactoryBean.java
+++ b/core/camel-core-xml/src/main/java/org/apache/camel/core/xml/util/jsse/AbstractKeyStoreParametersFactoryBean.java
@@ -21,21 +21,23 @@ import javax.xml.bind.annotation.XmlAccessorType;
 import javax.xml.bind.annotation.XmlAttribute;
 import javax.xml.bind.annotation.XmlTransient;
 
+import org.apache.camel.spi.Metadata;
 import org.apache.camel.support.jsse.KeyStoreParameters;
 
 @XmlAccessorType(XmlAccessType.FIELD)
 public abstract class AbstractKeyStoreParametersFactoryBean extends AbstractJsseUtilFactoryBean<KeyStoreParameters> {
 
-    @XmlAttribute
+    @XmlAttribute @Metadata(description = "The optional type of the key store to load."
+            + " See Appendix A in the Java Cryptography Architecture Standard Algorithm Name Documentation for more information on standard names.")
     protected String type;
     
-    @XmlAttribute
+    @XmlAttribute @Metadata(description = "The optional password for reading/opening/verifying the key store")
     protected String password;
     
-    @XmlAttribute
+    @XmlAttribute @Metadata(description = "The optional provider identifier for instantiating the key store")
     protected String provider;
     
-    @XmlAttribute
+    @XmlAttribute @Metadata(description = "The optional file path, class path resource, or URL of the resource used to load the key store")
     protected String resource;
     
     @XmlTransient
diff --git a/core/camel-core-xml/src/main/java/org/apache/camel/core/xml/util/jsse/AbstractSSLContextParametersFactoryBean.java b/core/camel-core-xml/src/main/java/org/apache/camel/core/xml/util/jsse/AbstractSSLContextParametersFactoryBean.java
index b1ccdce..b4b95b8 100644
--- a/core/camel-core-xml/src/main/java/org/apache/camel/core/xml/util/jsse/AbstractSSLContextParametersFactoryBean.java
+++ b/core/camel-core-xml/src/main/java/org/apache/camel/core/xml/util/jsse/AbstractSSLContextParametersFactoryBean.java
@@ -21,6 +21,7 @@ import javax.xml.bind.annotation.XmlAccessorType;
 import javax.xml.bind.annotation.XmlAttribute;
 import javax.xml.bind.annotation.XmlTransient;
 
+import org.apache.camel.spi.Metadata;
 import org.apache.camel.support.jsse.SSLContextParameters;
 
 @XmlAccessorType(XmlAccessType.FIELD)
@@ -28,12 +29,16 @@ import org.apache.camel.support.jsse.SSLContextParameters;
 public abstract class AbstractSSLContextParametersFactoryBean extends AbstractBaseSSLContextParametersFactoryBean<SSLContextParameters> {
     
     @XmlAttribute
+    @Metadata(description = "The optional provider identifier for the JSSE implementation to use when constructing an SSLContext.")
     private String provider;
 
     @XmlAttribute
+    @Metadata(description = "The optional protocol for the secure sockets created by the SSLContext"
+            + " represented by this instance's configuration. See Appendix A in the Java Secure Socket Extension Reference Guide for information about standard protocol names.")
     private String secureSocketProtocol;
     
     @XmlAttribute
+    @Metadata(description = "An optional certificate alias to use. This is useful when the keystore has multiple certificates.")
     private String certAlias;
 
     @Override
diff --git a/core/camel-core-xml/src/main/java/org/apache/camel/core/xml/util/jsse/AbstractSSLContextServerParametersFactoryBean.java b/core/camel-core-xml/src/main/java/org/apache/camel/core/xml/util/jsse/AbstractSSLContextServerParametersFactoryBean.java
index 56eaae4..27baf97 100644
--- a/core/camel-core-xml/src/main/java/org/apache/camel/core/xml/util/jsse/AbstractSSLContextServerParametersFactoryBean.java
+++ b/core/camel-core-xml/src/main/java/org/apache/camel/core/xml/util/jsse/AbstractSSLContextServerParametersFactoryBean.java
@@ -21,6 +21,7 @@ import javax.xml.bind.annotation.XmlAccessorType;
 import javax.xml.bind.annotation.XmlAttribute;
 import javax.xml.bind.annotation.XmlTransient;
 
+import org.apache.camel.spi.Metadata;
 import org.apache.camel.support.jsse.SSLContextServerParameters;
 
 @XmlAccessorType(XmlAccessType.FIELD)
@@ -28,6 +29,7 @@ import org.apache.camel.support.jsse.SSLContextServerParameters;
 public abstract class AbstractSSLContextServerParametersFactoryBean extends AbstractBaseSSLContextParametersFactoryBean<SSLContextServerParameters> {
 
     @XmlAttribute
+    @Metadata(description = "The optional configuration options for server-side client-authentication requirements.")
     protected String clientAuthentication;
 
     public String getClientAuthentication() {
diff --git a/core/camel-core-xml/src/main/java/org/apache/camel/core/xml/util/jsse/AbstractSecureRandomParametersFactoryBean.java b/core/camel-core-xml/src/main/java/org/apache/camel/core/xml/util/jsse/AbstractSecureRandomParametersFactoryBean.java
index 3767641..7abbc57 100644
--- a/core/camel-core-xml/src/main/java/org/apache/camel/core/xml/util/jsse/AbstractSecureRandomParametersFactoryBean.java
+++ b/core/camel-core-xml/src/main/java/org/apache/camel/core/xml/util/jsse/AbstractSecureRandomParametersFactoryBean.java
@@ -21,15 +21,20 @@ import javax.xml.bind.annotation.XmlAccessorType;
 import javax.xml.bind.annotation.XmlAttribute;
 import javax.xml.bind.annotation.XmlTransient;
 
+import org.apache.camel.spi.Metadata;
 import org.apache.camel.support.jsse.SecureRandomParameters;
 
 @XmlAccessorType(XmlAccessType.FIELD)
 public abstract class AbstractSecureRandomParametersFactoryBean extends AbstractJsseUtilFactoryBean<SecureRandomParameters> {
 
     @XmlAttribute(required = true)
+    @Metadata(description = "The Random Number Generator algorithm identifier for the SecureRandom factory method used to create the SecureRandom represented by this object's configuration. "
+            + "See Appendix A in the Java Cryptography Architecture API Specification and Reference guide for information about standard RNG algorithm names.")
     protected String algorithm;
-    
+
     @XmlAttribute
+    @Metadata(description = "The optional provider identifier for the SecureRandom factory"
+            + " method used to create the SecureRandom represented by this object's configuration.")
     protected String provider;
     
     @XmlTransient
diff --git a/core/camel-core-xml/src/main/java/org/apache/camel/core/xml/util/jsse/AbstractTrustManagersParametersFactoryBean.java b/core/camel-core-xml/src/main/java/org/apache/camel/core/xml/util/jsse/AbstractTrustManagersParametersFactoryBean.java
index 12054cd..c4ffc0e 100644
--- a/core/camel-core-xml/src/main/java/org/apache/camel/core/xml/util/jsse/AbstractTrustManagersParametersFactoryBean.java
+++ b/core/camel-core-xml/src/main/java/org/apache/camel/core/xml/util/jsse/AbstractTrustManagersParametersFactoryBean.java
@@ -22,6 +22,7 @@ import javax.xml.bind.annotation.XmlAccessorType;
 import javax.xml.bind.annotation.XmlAttribute;
 import javax.xml.bind.annotation.XmlTransient;
 
+import org.apache.camel.spi.Metadata;
 import org.apache.camel.support.CamelContextHelper;
 import org.apache.camel.support.jsse.TrustManagersParameters;
 
@@ -29,12 +30,18 @@ import org.apache.camel.support.jsse.TrustManagersParameters;
 public abstract class AbstractTrustManagersParametersFactoryBean extends AbstractJsseUtilFactoryBean<TrustManagersParameters> {
 
     @XmlAttribute
+    @Metadata(description = "The optional provider identifier for the TrustManagerFactory used to create"
+            + " TrustManagers represented by this object's configuration.")
     protected String provider;
     
     @XmlAttribute
+    @Metadata(description = "The optional algorithm name for the TrustManagerFactory used to"
+            + " create the TrustManagers represented by this objects configuration."
+            + " See the Java Secure Socket Extension Reference Guide for information about standard algorithm names.")
     protected String algorithm;
     
     @XmlAttribute
+    @Metadata(description = "To use a existing configured trust manager instead of using TrustManagerFactory to get the TrustManager.")
     protected String trustManager;
 
     @XmlTransient
diff --git a/tooling/maven/camel-eip-documentation-enricher-maven-plugin/src/main/java/org/apache/camel/maven/EipDocumentationEnricherMojo.java b/tooling/maven/camel-eip-documentation-enricher-maven-plugin/src/main/java/org/apache/camel/maven/EipDocumentationEnricherMojo.java
index 2a44901..249f1e2 100644
--- a/tooling/maven/camel-eip-documentation-enricher-maven-plugin/src/main/java/org/apache/camel/maven/EipDocumentationEnricherMojo.java
+++ b/tooling/maven/camel-eip-documentation-enricher-maven-plugin/src/main/java/org/apache/camel/maven/EipDocumentationEnricherMojo.java
@@ -171,7 +171,10 @@ public class EipDocumentationEnricherMojo extends AbstractMojo {
                 File file = jsonFiles.get(elementName);
                 injectAttributesDocumentation(domFinder, documentationEnricher, file, elementType, injectedTypes);
             } else {
-                getLog().warn("Cannot find json metadata to use for enriching element " + elementName);
+                boolean ignore = "ExpressionDefinition".equalsIgnoreCase(elementName);
+                if (!ignore) {
+                    getLog().warn("Cannot find json metadata to use for enriching element " + elementName);
+                }
             }
         }
         getLog().info("Enriched " + enriched + " models out of " + typeToNameMap.size() + " models");