You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2025/01/31 09:09:55 UTC

(camel) 01/01: CAMEL-21768 - Camel-Minio: Introducing Override Bucket Header in Producer operations - Docs

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

acosentino pushed a commit to branch 21768-docs
in repository https://gitbox.apache.org/repos/asf/camel.git

commit c6b85a1686a03d268f7ccb197c9e9577b39f6803
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Fri Jan 31 10:09:22 2025 +0100

    CAMEL-21768 - Camel-Minio: Introducing Override Bucket Header in Producer operations - Docs
    
    Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
 .../resources/org/apache/camel/catalog/components/minio.json        | 2 +-
 .../resources/META-INF/org/apache/camel/component/minio/minio.json  | 2 +-
 .../main/java/org/apache/camel/component/minio/MinioConstants.java  | 4 +---
 .../java/org/apache/camel/main/MetricsConfigurationProperties.java  | 4 ++--
 .../user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_10.adoc | 6 ++++++
 .../camel/builder/endpoint/dsl/MinioEndpointBuilderFactory.java     | 4 +---
 6 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/minio.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/minio.json
index 2883af458dd..484b83a89fc 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/minio.json
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/minio.json
@@ -75,7 +75,7 @@
     "serverSideEncryptionCustomerKey": { "index": 48, "kind": "property", "displayName": "Server Side Encryption Customer Key", "group": "security", "label": "security", "required": false, "type": "object", "javaType": "io.minio.ServerSideEncryptionCustomerKey", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.minio.MinioConfiguration", "configurationField": "configuration", "description": "Server-side encryption for source objec [...]
   },
   "headers": {
-    "CamelMinioBucketName": { "index": 0, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Producer: The bucket Name which this object will be stored or which will be used for the current operation. Consumer: The name of the bucket in which this object is contained.", "constantName": "org.apache.camel.component.minio.MinioConstants# [...]
+    "CamelMinioBucketName": { "index": 0, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Consumer: The name of the bucket in which this object is contained.", "constantName": "org.apache.camel.component.minio.MinioConstants#BUCKET_NAME" },
     "CamelMinioDestinationBucketName": { "index": 1, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The bucket Destination Name which will be used for the current operation.", "constantName": "org.apache.camel.component.minio.MinioConstants#DESTINATION_BUCKET_NAME" },
     "CamelMinioContentControl": { "index": 2, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Producer: The content control of this object. Consumer: The optional Cache-Control HTTP header which allows the user to specify caching behavior along the HTTP request\/reply chain.", "constantName": "org.apache.camel.component.minio.Minio [...]
     "CamelMinioContentDisposition": { "index": 3, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Producer: The content disposition of this object. Consumer: The optional Content-Disposition HTTP header, which specifies presentational information such as the recommended filename for the object to be saved as.", "constantName": "org [...]
diff --git a/components/camel-minio/src/generated/resources/META-INF/org/apache/camel/component/minio/minio.json b/components/camel-minio/src/generated/resources/META-INF/org/apache/camel/component/minio/minio.json
index 2883af458dd..484b83a89fc 100644
--- a/components/camel-minio/src/generated/resources/META-INF/org/apache/camel/component/minio/minio.json
+++ b/components/camel-minio/src/generated/resources/META-INF/org/apache/camel/component/minio/minio.json
@@ -75,7 +75,7 @@
     "serverSideEncryptionCustomerKey": { "index": 48, "kind": "property", "displayName": "Server Side Encryption Customer Key", "group": "security", "label": "security", "required": false, "type": "object", "javaType": "io.minio.ServerSideEncryptionCustomerKey", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.minio.MinioConfiguration", "configurationField": "configuration", "description": "Server-side encryption for source objec [...]
   },
   "headers": {
-    "CamelMinioBucketName": { "index": 0, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Producer: The bucket Name which this object will be stored or which will be used for the current operation. Consumer: The name of the bucket in which this object is contained.", "constantName": "org.apache.camel.component.minio.MinioConstants# [...]
+    "CamelMinioBucketName": { "index": 0, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Consumer: The name of the bucket in which this object is contained.", "constantName": "org.apache.camel.component.minio.MinioConstants#BUCKET_NAME" },
     "CamelMinioDestinationBucketName": { "index": 1, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The bucket Destination Name which will be used for the current operation.", "constantName": "org.apache.camel.component.minio.MinioConstants#DESTINATION_BUCKET_NAME" },
     "CamelMinioContentControl": { "index": 2, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Producer: The content control of this object. Consumer: The optional Cache-Control HTTP header which allows the user to specify caching behavior along the HTTP request\/reply chain.", "constantName": "org.apache.camel.component.minio.Minio [...]
     "CamelMinioContentDisposition": { "index": 3, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Producer: The content disposition of this object. Consumer: The optional Content-Disposition HTTP header, which specifies presentational information such as the recommended filename for the object to be saved as.", "constantName": "org [...]
diff --git a/components/camel-minio/src/main/java/org/apache/camel/component/minio/MinioConstants.java b/components/camel-minio/src/main/java/org/apache/camel/component/minio/MinioConstants.java
index f47ce64682f..5d41795b4af 100644
--- a/components/camel-minio/src/main/java/org/apache/camel/component/minio/MinioConstants.java
+++ b/components/camel-minio/src/main/java/org/apache/camel/component/minio/MinioConstants.java
@@ -24,9 +24,7 @@ import org.apache.camel.spi.Metadata;
 public interface MinioConstants {
 
     int BYTE_ARRAY_LENGTH = 1024;
-    @Metadata(description = "*Producer:* The bucket Name which this object will be stored or which will be used for the current operation. "
-                            +
-                            "*Consumer:* The name of the bucket in which this object is contained.",
+    @Metadata(description = "*Consumer:* The name of the bucket in which this object is contained.",
               javaType = "String")
     String BUCKET_NAME = "CamelMinioBucketName";
     @Metadata(label = "producer", description = "The bucket Destination Name which will be used for the current operation.",
diff --git a/core/camel-main/src/main/java/org/apache/camel/main/MetricsConfigurationProperties.java b/core/camel-main/src/main/java/org/apache/camel/main/MetricsConfigurationProperties.java
index 7c5ed5e4588..9518af3fdce 100644
--- a/core/camel-main/src/main/java/org/apache/camel/main/MetricsConfigurationProperties.java
+++ b/core/camel-main/src/main/java/org/apache/camel/main/MetricsConfigurationProperties.java
@@ -142,8 +142,8 @@ public class MetricsConfigurationProperties implements BootstrapCloseable {
      *
      * By default, static values are used.
      *
-     * When using dynamic tags, then a dynamic to (toD) can compute many different endpoint URIs that,
-     * can lead to many tags as the URI is dynamic, so use this with care if setting this option to false.
+     * When using dynamic tags, then a dynamic to (toD) can compute many different endpoint URIs that, can lead to many
+     * tags as the URI is dynamic, so use this with care if setting this option to false.
      */
     public void setBaseEndpointURIExchangeEventNotifier(boolean baseEndpointURIExchangeEventNotifier) {
         this.baseEndpointURIExchangeEventNotifier = baseEndpointURIExchangeEventNotifier;
diff --git a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_10.adoc b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_10.adoc
index d6b1024b5c8..f12028095d0 100644
--- a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_10.adoc
+++ b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_10.adoc
@@ -202,6 +202,12 @@ We have fixed a flawed behavior when using dynamic endpoints which made the gene
 If using object codec, then you should configure the `objectCodecPattern` configuration to specify
 which java classes (FQN) to allow for Object serialization. You can use `*` to accept all patterns.
 
+=== camel-minio
+
+The header `CamelMinioBucketName` for setting a bucket to write to, on the producer side, cannot be used anymore: the header `CamelMinioOverrideBucketName` must be used 
+instead. This was done to avoid situation in which you're moving a file from a bucket to a different one, and the header coming from the Minio consumer is used as bucket name for Minio Producer.
+You can find more information on CAMEL-21678. 
+
 === camel-google-pubsub-lite
 
 The component `camel-google-pubsub-lite` has been deprecated following the deprecation of the corresponding service by Google Cloud Platform.
diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/MinioEndpointBuilderFactory.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/MinioEndpointBuilderFactory.java
index 893572f15c5..2314992c755 100644
--- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/MinioEndpointBuilderFactory.java
+++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/MinioEndpointBuilderFactory.java
@@ -2575,9 +2575,7 @@ public interface MinioEndpointBuilderFactory {
         private static final MinioHeaderNameBuilder INSTANCE = new MinioHeaderNameBuilder();
 
         /**
-         * Producer: The bucket Name which this object will be stored or which
-         * will be used for the current operation. Consumer: The name of the
-         * bucket in which this object is contained.
+         * Consumer: The name of the bucket in which this object is contained.
          * 
          * The option is a: {@code String} type.
          *