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/08/12 12:06:19 UTC

[camel] 03/03: CAMEL-15400: crypto-cms endpoint recipient should not be marked as multivalued.

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

commit ae3698bdb583669199298d689d4d05397c1c1ee1
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Wed Aug 12 14:00:45 2020 +0200

    CAMEL-15400: crypto-cms endpoint recipient should not be marked as multivalued.
---
 .../apache/camel/component/crypto/cms/crypto-cms.json   |  2 +-
 .../cms/crypt/EnvelopedDataEncryptorConfiguration.java  |  2 +-
 .../endpoint/dsl/CryptoCmsEndpointBuilderFactory.java   | 17 +++++------------
 3 files changed, 7 insertions(+), 14 deletions(-)

diff --git a/components/camel-crypto-cms/src/generated/resources/org/apache/camel/component/crypto/cms/crypto-cms.json b/components/camel-crypto-cms/src/generated/resources/org/apache/camel/component/crypto/cms/crypto-cms.json
index f556cd8..dafcf02 100644
--- a/components/camel-crypto-cms/src/generated/resources/org/apache/camel/component/crypto/cms/crypto-cms.json
+++ b/components/camel-crypto-cms/src/generated/resources/org/apache/camel/component/crypto/cms/crypto-cms.json
@@ -39,7 +39,7 @@
     "fromBase64": { "kind": "parameter", "displayName": "From Base64", "group": "decrypt_verify", "label": "decrypt_verify", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.crypto.cms.sig.DefaultSignedDataVerifierConfiguration", "configurationField": "verifyConfig", "description": "If true then the CMS message is base 64 encoded and must be decoded during the proces [...]
     "contentEncryptionAlgorithm": { "kind": "parameter", "displayName": "Content Encryption Algorithm", "group": "encrypt", "label": "encrypt", "required": false, "type": "string", "javaType": "java.lang.String", "enum": [ "AES\/CBC\/PKCS5Padding", "DESede\/CBC\/PKCS5Padding", "Camellia\/CBC\/PKCS5Padding", "CAST5\/CBC\/PKCS5Padding" ], "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.crypto.cms.crypt.EnvelopedDataEncryptorConfiguration", "configura [...]
     "originatorInformationProvider": { "kind": "parameter", "displayName": "Originator Information Provider", "group": "encrypt", "label": "encrypt", "required": false, "type": "object", "javaType": "org.apache.camel.component.crypto.cms.common.OriginatorInformationProvider", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.crypto.cms.crypt.EnvelopedDataEncryptorConfiguration", "configurationField": "encryptConfig", "description": "Provider for the  [...]
-    "recipient": { "kind": "parameter", "displayName": "Recipient", "group": "encrypt", "label": "encrypt", "required": false, "type": "array", "javaType": "java.util.List<org.apache.camel.component.crypto.cms.crypt.RecipientInfo>", "multiValue": true, "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.crypto.cms.crypt.EnvelopedDataEncryptorConfiguration", "configurationField": "encryptConfig", "description": "Recipient Info: reference to a bean which [...]
+    "recipient": { "kind": "parameter", "displayName": "Recipient", "group": "encrypt", "label": "encrypt", "required": false, "type": "array", "javaType": "java.util.List<org.apache.camel.component.crypto.cms.crypt.RecipientInfo>", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.crypto.cms.crypt.EnvelopedDataEncryptorConfiguration", "configurationField": "encryptConfig", "description": "Recipient Info: reference to a bean which implements the inte [...]
     "secretKeyLength": { "kind": "parameter", "displayName": "Secret Key Length", "group": "encrypt", "label": "encrypt", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.crypto.cms.crypt.EnvelopedDataEncryptorConfiguration", "configurationField": "encryptConfig", "description": "Key length for the secret symmetric key used for the content encryption. Only used if the specified content-encrypt [...]
     "unprotectedAttributesGeneratorProvider": { "kind": "parameter", "displayName": "Unprotected Attributes Generator Provider", "group": "encrypt", "label": "encrypt", "required": false, "type": "object", "javaType": "org.apache.camel.component.crypto.cms.common.AttributesGeneratorProvider", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.crypto.cms.crypt.EnvelopedDataEncryptorConfiguration", "configurationField": "encryptConfig", "description": " [...]
     "toBase64": { "kind": "parameter", "displayName": "To Base64", "group": "encrypt_sign", "label": "encrypt_sign", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "secret": false, "defaultValue": "false", "configurationClass": "org.apache.camel.component.crypto.cms.sig.SignedDataCreatorConfiguration", "configurationField": "signConfig", "description": "Indicates whether the Signed Data or Enveloped Data instance shall be base 64 encoded. Defa [...]
diff --git a/components/camel-crypto-cms/src/main/java/org/apache/camel/component/crypto/cms/crypt/EnvelopedDataEncryptorConfiguration.java b/components/camel-crypto-cms/src/main/java/org/apache/camel/component/crypto/cms/crypt/EnvelopedDataEncryptorConfiguration.java
index d891450..e0cad4e 100644
--- a/components/camel-crypto-cms/src/main/java/org/apache/camel/component/crypto/cms/crypt/EnvelopedDataEncryptorConfiguration.java
+++ b/components/camel-crypto-cms/src/main/java/org/apache/camel/component/crypto/cms/crypt/EnvelopedDataEncryptorConfiguration.java
@@ -73,7 +73,7 @@ public class EnvelopedDataEncryptorConfiguration extends CryptoCmsMarshallerConf
         SUPPORTED_ENCRYPTION_ALGORITHMS.put(CAST5_CBC_PKCS5_PADDING, Arrays.asList(new Integer[] {128, 120, 112, 104, 96, 88, 80, 72, 64, 56, 48, 40}));
     }
 
-    @UriParam(label = "encrypt", multiValue = true, description = "Recipient Info: reference to a bean which implements the interface org.apache.camel.component.crypto.cms.api.TransRecipientInfo")
+    @UriParam(label = "encrypt", description = "Recipient Info: reference to a bean which implements the interface org.apache.camel.component.crypto.cms.api.TransRecipientInfo")
     private final List<RecipientInfo> recipient = new ArrayList<>(3);
 
     @UriParam(label = "encrypt", enums = "AES/CBC/PKCS5Padding,DESede/CBC/PKCS5Padding,Camellia/CBC/PKCS5Padding,CAST5/CBC/PKCS5Padding")
diff --git a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/CryptoCmsEndpointBuilderFactory.java b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/CryptoCmsEndpointBuilderFactory.java
index e9e396b..76eb8e8 100644
--- a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/CryptoCmsEndpointBuilderFactory.java
+++ b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/CryptoCmsEndpointBuilderFactory.java
@@ -18,7 +18,6 @@ package org.apache.camel.builder.endpoint.dsl;
 
 import java.security.KeyStore;
 import java.util.List;
-import java.util.Map;
 import javax.annotation.Generated;
 import org.apache.camel.builder.EndpointConsumerBuilder;
 import org.apache.camel.builder.EndpointProducerBuilder;
@@ -245,30 +244,24 @@ public interface CryptoCmsEndpointBuilderFactory {
          * 
          * The option is a:
          * <code>java.util.List&lt;org.apache.camel.component.crypto.cms.crypt.RecipientInfo&gt;</code> type.
-         * The option is multivalued, and you can use the recipient(String,
-         * Object) method to add a value (call the method multiple times to set
-         * more values).
          * 
          * Group: encrypt
          */
-        default CryptoCmsEndpointBuilder recipient(String key, Object value) {
-            doSetMultiValueProperty("recipient", "null" + key, value);
+        default CryptoCmsEndpointBuilder recipient(List<Object> recipient) {
+            doSetProperty("recipient", recipient);
             return this;
         }
         /**
          * Recipient Info: reference to a bean which implements the interface
          * org.apache.camel.component.crypto.cms.api.TransRecipientInfo.
          * 
-         * The option is a:
+         * The option will be converted to a
          * <code>java.util.List&lt;org.apache.camel.component.crypto.cms.crypt.RecipientInfo&gt;</code> type.
-         * The option is multivalued, and you can use the recipient(String,
-         * Object) method to add a value (call the method multiple times to set
-         * more values).
          * 
          * Group: encrypt
          */
-        default CryptoCmsEndpointBuilder recipient(Map values) {
-            doSetMultiValueProperties("recipient", "null", values);
+        default CryptoCmsEndpointBuilder recipient(String recipient) {
+            doSetProperty("recipient", recipient);
             return this;
         }
         /**