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

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


The following commit(s) were added to refs/heads/main by this push:
     new c79153125ab CAMEL-18979: Add delimiter and prefix to 
ListObjectsRequest (#9233)
c79153125ab is described below

commit c79153125ab5d69e0854cab9b890f6b0045593bb
Author: Alexandre Davi Zanelatto <[email protected]>
AuthorDate: Sat Jan 28 03:49:24 2023 -0300

    CAMEL-18979: Add delimiter and prefix to ListObjectsRequest (#9233)
    
    * CAMEL-18979: Add delimiter and prefix to ListObjectsRequest
    
    * CAMEL-18979: Remove label from delimiter and prefix on AWS2S3Configuration
    
    * CAMEL-18979: Get delimiter and prefix from Headers or else get from 
configuration for AWS2S3Producer listObjects
    
    ---------
    
    Co-authored-by: Alexandre Zanelatto <[email protected]>
---
 .../org/apache/camel/component/aws2/s3/aws2-s3.json         | 12 +++++++-----
 .../apache/camel/component/aws2/s3/AWS2S3Configuration.java |  4 ++--
 .../org/apache/camel/component/aws2/s3/AWS2S3Constants.java |  6 ++++++
 .../org/apache/camel/component/aws2/s3/AWS2S3Producer.java  | 13 ++++++++++++-
 4 files changed, 27 insertions(+), 8 deletions(-)

diff --git 
a/components/camel-aws/camel-aws2-s3/src/generated/resources/org/apache/camel/component/aws2/s3/aws2-s3.json
 
b/components/camel-aws/camel-aws2-s3/src/generated/resources/org/apache/camel/component/aws2/s3/aws2-s3.json
index 98172808cb6..2b9bebb4d45 100644
--- 
a/components/camel-aws/camel-aws2-s3/src/generated/resources/org/apache/camel/component/aws2/s3/aws2-s3.json
+++ 
b/components/camel-aws/camel-aws2-s3/src/generated/resources/org/apache/camel/component/aws2/s3/aws2-s3.json
@@ -26,9 +26,11 @@
     "amazonS3Presigner": { "kind": "property", "displayName": "Amazon S3 
Presigner", "group": "common", "label": "", "required": false, "type": 
"object", "javaType": 
"software.amazon.awssdk.services.s3.presigner.S3Presigner", "deprecated": 
false, "deprecationNote": "", "autowired": true, "secret": false, 
"configurationClass": "org.apache.camel.component.aws2.s3.AWS2S3Configuration", 
"configurationField": "configuration", "description": "An S3 Presigner for 
Request, used mainly in createD [...]
     "autoCreateBucket": { "kind": "property", "displayName": "Auto Create 
Bucket", "group": "common", "label": "common", "required": false, "type": 
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": false, "configurationClass": 
"org.apache.camel.component.aws2.s3.AWS2S3Configuration", "configurationField": 
"configuration", "description": "Setting the autocreation of the S3 bucket 
bucketName. This will apply also in case of moveAfte [...]
     "configuration": { "kind": "property", "displayName": "Configuration", 
"group": "common", "label": "", "required": false, "type": "object", 
"javaType": "org.apache.camel.component.aws2.s3.AWS2S3Configuration", 
"deprecated": false, "autowired": false, "secret": false, "description": "The 
component configuration" },
+    "delimiter": { "kind": "property", "displayName": "Delimiter", "group": 
"common", "label": "", "required": false, "type": "string", "javaType": 
"java.lang.String", "deprecated": false, "autowired": false, "secret": false, 
"configurationClass": "org.apache.camel.component.aws2.s3.AWS2S3Configuration", 
"configurationField": "configuration", "description": "The delimiter which is 
used in the com.amazonaws.services.s3.model.ListObjectsRequest to only consume 
objects we are interested in." },
     "overrideEndpoint": { "kind": "property", "displayName": "Override 
Endpoint", "group": "common", "label": "", "required": false, "type": 
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": false, "configurationClass": 
"org.apache.camel.component.aws2.s3.AWS2S3Configuration", "configurationField": 
"configuration", "description": "Set the need for overidding the endpoint. This 
option needs to be used in combination with uriEndpoin [...]
     "pojoRequest": { "kind": "property", "displayName": "Pojo Request", 
"group": "common", "label": "", "required": false, "type": "boolean", 
"javaType": "boolean", "deprecated": false, "autowired": false, "secret": 
false, "defaultValue": false, "configurationClass": 
"org.apache.camel.component.aws2.s3.AWS2S3Configuration", "configurationField": 
"configuration", "description": "If we want to use a POJO request as body or 
not" },
     "policy": { "kind": "property", "displayName": "Policy", "group": 
"common", "label": "", "required": false, "type": "string", "javaType": 
"java.lang.String", "deprecated": false, "autowired": false, "secret": false, 
"configurationClass": "org.apache.camel.component.aws2.s3.AWS2S3Configuration", 
"configurationField": "configuration", "description": "The policy for this 
queue to set in the com.amazonaws.services.s3.AmazonS3#setBucketPolicy() 
method." },
+    "prefix": { "kind": "property", "displayName": "Prefix", "group": 
"common", "label": "", "required": false, "type": "string", "javaType": 
"java.lang.String", "deprecated": false, "autowired": false, "secret": false, 
"configurationClass": "org.apache.camel.component.aws2.s3.AWS2S3Configuration", 
"configurationField": "configuration", "description": "The prefix which is used 
in the com.amazonaws.services.s3.model.ListObjectsRequest to only consume 
objects we are interested in." },
     "proxyHost": { "kind": "property", "displayName": "Proxy Host", "group": 
"common", "label": "", "required": false, "type": "string", "javaType": 
"java.lang.String", "deprecated": false, "autowired": false, "secret": false, 
"configurationClass": "org.apache.camel.component.aws2.s3.AWS2S3Configuration", 
"configurationField": "configuration", "description": "To define a proxy host 
when instantiating the SQS client" },
     "proxyPort": { "kind": "property", "displayName": "Proxy Port", "group": 
"common", "label": "", "required": false, "type": "integer", "javaType": 
"java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, 
"configurationClass": "org.apache.camel.component.aws2.s3.AWS2S3Configuration", 
"configurationField": "configuration", "description": "Specify a proxy port to 
be used inside the client definition." },
     "proxyProtocol": { "kind": "property", "displayName": "Proxy Protocol", 
"group": "common", "label": "", "required": false, "type": "object", 
"javaType": "software.amazon.awssdk.core.Protocol", "enum": [ "HTTP", "HTTPS" 
], "deprecated": false, "autowired": false, "secret": false, "defaultValue": 
"HTTPS", "configurationClass": 
"org.apache.camel.component.aws2.s3.AWS2S3Configuration", "configurationField": 
"configuration", "description": "To define a proxy protocol when instantiating 
th [...]
@@ -41,7 +43,6 @@
     "customerKeyMD5": { "kind": "property", "displayName": "Customer Key MD5", 
"group": "common (advanced)", "label": "common,advanced", "required": false, 
"type": "string", "javaType": "java.lang.String", "deprecated": false, 
"autowired": false, "secret": false, "configurationClass": 
"org.apache.camel.component.aws2.s3.AWS2S3Configuration", "configurationField": 
"configuration", "description": "Define the MD5 of Customer key to use in case 
CustomerKey is enabled" },
     "bridgeErrorHandler": { "kind": "property", "displayName": "Bridge Error 
Handler", "group": "consumer", "label": "consumer", "required": false, "type": 
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": false, "description": "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 me [...]
     "deleteAfterRead": { "kind": "property", "displayName": "Delete After 
Read", "group": "consumer", "label": "consumer", "required": false, "type": 
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": true, "configurationClass": 
"org.apache.camel.component.aws2.s3.AWS2S3Configuration", "configurationField": 
"configuration", "description": "Delete objects from S3 after they have been 
retrieved. The delete is only performed if the Ex [...]
-    "delimiter": { "kind": "property", "displayName": "Delimiter", "group": 
"consumer", "label": "consumer", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": false, "configurationClass": 
"org.apache.camel.component.aws2.s3.AWS2S3Configuration", "configurationField": 
"configuration", "description": "The delimiter which is used in the 
com.amazonaws.services.s3.model.ListObjectsRequest to only consume objects we 
are inte [...]
     "destinationBucket": { "kind": "property", "displayName": "Destination 
Bucket", "group": "consumer", "label": "consumer", "required": false, "type": 
"string", "javaType": "java.lang.String", "deprecated": false, "autowired": 
false, "secret": false, "configurationClass": 
"org.apache.camel.component.aws2.s3.AWS2S3Configuration", "configurationField": 
"configuration", "description": "Define the destination bucket where an object 
must be moved when moveAfterRead is set to true." },
     "destinationBucketPrefix": { "kind": "property", "displayName": 
"Destination Bucket Prefix", "group": "consumer", "label": "consumer", 
"required": false, "type": "string", "javaType": "java.lang.String", 
"deprecated": false, "autowired": false, "secret": false, "configurationClass": 
"org.apache.camel.component.aws2.s3.AWS2S3Configuration", "configurationField": 
"configuration", "description": "Define the destination bucket prefix to use 
when an object must be moved and moveAfterRead  [...]
     "destinationBucketSuffix": { "kind": "property", "displayName": 
"Destination Bucket Suffix", "group": "consumer", "label": "consumer", 
"required": false, "type": "string", "javaType": "java.lang.String", 
"deprecated": false, "autowired": false, "secret": false, "configurationClass": 
"org.apache.camel.component.aws2.s3.AWS2S3Configuration", "configurationField": 
"configuration", "description": "Define the destination bucket suffix to use 
when an object must be moved and moveAfterRead  [...]
@@ -51,7 +52,6 @@
     "includeBody": { "kind": "property", "displayName": "Include Body", 
"group": "consumer", "label": "consumer", "required": false, "type": "boolean", 
"javaType": "boolean", "deprecated": false, "autowired": false, "secret": 
false, "defaultValue": true, "configurationClass": 
"org.apache.camel.component.aws2.s3.AWS2S3Configuration", "configurationField": 
"configuration", "description": "If it is true, the S3Object exchange will be 
consumed and put into the body and closed. If false the S [...]
     "includeFolders": { "kind": "property", "displayName": "Include Folders", 
"group": "consumer", "label": "consumer", "required": false, "type": "boolean", 
"javaType": "boolean", "deprecated": false, "autowired": false, "secret": 
false, "defaultValue": true, "configurationClass": 
"org.apache.camel.component.aws2.s3.AWS2S3Configuration", "configurationField": 
"configuration", "description": "If it is true, the folders\/directories will 
be consumed. If it is false, they will be ignored,  [...]
     "moveAfterRead": { "kind": "property", "displayName": "Move After Read", 
"group": "consumer", "label": "consumer", "required": false, "type": "boolean", 
"javaType": "boolean", "deprecated": false, "autowired": false, "secret": 
false, "defaultValue": false, "configurationClass": 
"org.apache.camel.component.aws2.s3.AWS2S3Configuration", "configurationField": 
"configuration", "description": "Move objects from S3 bucket to a different 
bucket after they have been retrieved. To accomplish  [...]
-    "prefix": { "kind": "property", "displayName": "Prefix", "group": 
"consumer", "label": "consumer", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": false, "configurationClass": 
"org.apache.camel.component.aws2.s3.AWS2S3Configuration", "configurationField": 
"configuration", "description": "The prefix which is used in the 
com.amazonaws.services.s3.model.ListObjectsRequest to only consume objects we 
are interested in." },
     "autocloseBody": { "kind": "property", "displayName": "Autoclose Body", 
"group": "consumer (advanced)", "label": "consumer,advanced", "required": 
false, "type": "boolean", "javaType": "boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": true, 
"configurationClass": "org.apache.camel.component.aws2.s3.AWS2S3Configuration", 
"configurationField": "configuration", "description": "If this option is true 
and includeBody is false, then the S3Object.close() met [...]
     "batchMessageNumber": { "kind": "property", "displayName": "Batch Message 
Number", "group": "producer", "label": "producer", "required": false, "type": 
"integer", "javaType": "int", "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": 10, "configurationClass": 
"org.apache.camel.component.aws2.s3.AWS2S3Configuration", "configurationField": 
"configuration", "description": "The number of messages composing a batch in 
streaming upload mode" },
     "batchSize": { "kind": "property", "displayName": "Batch Size", "group": 
"producer", "label": "producer", "required": false, "type": "integer", 
"javaType": "int", "deprecated": false, "autowired": false, "secret": false, 
"defaultValue": 1000000, "configurationClass": 
"org.apache.camel.component.aws2.s3.AWS2S3Configuration", "configurationField": 
"configuration", "description": "The batch size (in bytes) in streaming upload 
mode" },
@@ -102,16 +102,20 @@
     "CamelAwsS3DownloadLinkHttpRequestHeaders": { "kind": "header", 
"displayName": "", "group": "producer", "label": "producer", "required": false, 
"javaType": "Map<String, List<String>>", "deprecated": false, 
"deprecationNote": "", "autowired": false, "secret": false, "description": "The 
headers that are needed by the service (not needed when BrowserCompatible is 
true)", "constantName": 
"org.apache.camel.component.aws2.s3.AWS2S3Constants#DOWNLOAD_LINK_HTTP_REQUEST_HEADERS"
 },
     "CamelAwsS3DownloadLinkSignedPayload": { "kind": "header", "displayName": 
"", "group": "producer", "label": "producer", "required": false, "javaType": 
"String", "deprecated": false, "deprecationNote": "", "autowired": false, 
"secret": false, "description": "The request payload that is needed by the 
service (not needed when BrowserCompatible is true)", "constantName": 
"org.apache.camel.component.aws2.s3.AWS2S3Constants#DOWNLOAD_LINK_SIGNED_PAYLOAD"
 },
     "CamelAwsS3Metadata": { "kind": "header", "displayName": "", "group": 
"common", "label": "", "required": false, "javaType": "Map<String, String>", 
"deprecated": false, "deprecationNote": "", "autowired": false, "secret": 
false, "description": "A map of metadata to be stored or stored with the object 
in S3. More details about metadata 
https:\/\/docs.aws.amazon.com\/AmazonS3\/latest\/userguide\/UsingMetadata.htmlhere.",
 "constantName": "org.apache.camel.component.aws2.s3.AWS2S3Constant [...]
-    "CamelMessageTimestamp": { "kind": "header", "displayName": "", "group": 
"consumer", "label": "consumer", "required": false, "javaType": "long", 
"deprecated": false, "deprecationNote": "", "autowired": false, "secret": 
false, "description": "The timestamp of the message", "constantName": 
"org.apache.camel.component.aws2.s3.AWS2S3Constants#MESSAGE_TIMESTAMP" }
+    "CamelMessageTimestamp": { "kind": "header", "displayName": "", "group": 
"consumer", "label": "consumer", "required": false, "javaType": "long", 
"deprecated": false, "deprecationNote": "", "autowired": false, "secret": 
false, "description": "The timestamp of the message", "constantName": 
"org.apache.camel.component.aws2.s3.AWS2S3Constants#MESSAGE_TIMESTAMP" },
+    "CamelAwsS3Prefix": { "kind": "header", "displayName": "", "group": 
"common", "label": "", "required": false, "javaType": "", "deprecated": false, 
"deprecationNote": "", "autowired": false, "secret": false, "description": "The 
prefix which is used in the com.amazonaws.services.s3.model.ListObjectsRequest 
to only list objects we are interested in", "constantName": 
"org.apache.camel.component.aws2.s3.AWS2S3Constants#PREFIX" },
+    "CamelAwsS3Delimiter": { "kind": "header", "displayName": "", "group": 
"common", "label": "", "required": false, "javaType": "String", "deprecated": 
false, "deprecationNote": "", "autowired": false, "secret": false, 
"description": "The delimiter which is used in the 
com.amazonaws.services.s3.model.ListObjectsRequest to only list objects we are 
interested in", "constantName": 
"org.apache.camel.component.aws2.s3.AWS2S3Constants#DELIMITER" }
   },
   "properties": {
     "bucketNameOrArn": { "kind": "path", "displayName": "Bucket Name Or Arn", 
"group": "common", "label": "", "required": true, "type": "string", "javaType": 
"java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": 
false, "secret": false, "description": "Bucket name or ARN" },
     "amazonS3Client": { "kind": "parameter", "displayName": "Amazon S3 
Client", "group": "common", "label": "", "required": false, "type": "object", 
"javaType": "software.amazon.awssdk.services.s3.S3Client", "deprecated": false, 
"deprecationNote": "", "autowired": true, "secret": false, 
"configurationClass": "org.apache.camel.component.aws2.s3.AWS2S3Configuration", 
"configurationField": "configuration", "description": "Reference to a 
com.amazonaws.services.s3.AmazonS3 in the registry." },
     "amazonS3Presigner": { "kind": "parameter", "displayName": "Amazon S3 
Presigner", "group": "common", "label": "", "required": false, "type": 
"object", "javaType": 
"software.amazon.awssdk.services.s3.presigner.S3Presigner", "deprecated": 
false, "deprecationNote": "", "autowired": true, "secret": false, 
"configurationClass": "org.apache.camel.component.aws2.s3.AWS2S3Configuration", 
"configurationField": "configuration", "description": "An S3 Presigner for 
Request, used mainly in create [...]
     "autoCreateBucket": { "kind": "parameter", "displayName": "Auto Create 
Bucket", "group": "common", "label": "common", "required": false, "type": 
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": false, "configurationClass": 
"org.apache.camel.component.aws2.s3.AWS2S3Configuration", "configurationField": 
"configuration", "description": "Setting the autocreation of the S3 bucket 
bucketName. This will apply also in case of moveAft [...]
+    "delimiter": { "kind": "parameter", "displayName": "Delimiter", "group": 
"common", "label": "", "required": false, "type": "string", "javaType": 
"java.lang.String", "deprecated": false, "autowired": false, "secret": false, 
"configurationClass": "org.apache.camel.component.aws2.s3.AWS2S3Configuration", 
"configurationField": "configuration", "description": "The delimiter which is 
used in the com.amazonaws.services.s3.model.ListObjectsRequest to only consume 
objects we are interested in." },
     "overrideEndpoint": { "kind": "parameter", "displayName": "Override 
Endpoint", "group": "common", "label": "", "required": false, "type": 
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": false, "configurationClass": 
"org.apache.camel.component.aws2.s3.AWS2S3Configuration", "configurationField": 
"configuration", "description": "Set the need for overidding the endpoint. This 
option needs to be used in combination with uriEndpoi [...]
     "pojoRequest": { "kind": "parameter", "displayName": "Pojo Request", 
"group": "common", "label": "", "required": false, "type": "boolean", 
"javaType": "boolean", "deprecated": false, "autowired": false, "secret": 
false, "defaultValue": false, "configurationClass": 
"org.apache.camel.component.aws2.s3.AWS2S3Configuration", "configurationField": 
"configuration", "description": "If we want to use a POJO request as body or 
not" },
     "policy": { "kind": "parameter", "displayName": "Policy", "group": 
"common", "label": "", "required": false, "type": "string", "javaType": 
"java.lang.String", "deprecated": false, "autowired": false, "secret": false, 
"configurationClass": "org.apache.camel.component.aws2.s3.AWS2S3Configuration", 
"configurationField": "configuration", "description": "The policy for this 
queue to set in the com.amazonaws.services.s3.AmazonS3#setBucketPolicy() 
method." },
+    "prefix": { "kind": "parameter", "displayName": "Prefix", "group": 
"common", "label": "", "required": false, "type": "string", "javaType": 
"java.lang.String", "deprecated": false, "autowired": false, "secret": false, 
"configurationClass": "org.apache.camel.component.aws2.s3.AWS2S3Configuration", 
"configurationField": "configuration", "description": "The prefix which is used 
in the com.amazonaws.services.s3.model.ListObjectsRequest to only consume 
objects we are interested in." },
     "proxyHost": { "kind": "parameter", "displayName": "Proxy Host", "group": 
"common", "label": "", "required": false, "type": "string", "javaType": 
"java.lang.String", "deprecated": false, "autowired": false, "secret": false, 
"configurationClass": "org.apache.camel.component.aws2.s3.AWS2S3Configuration", 
"configurationField": "configuration", "description": "To define a proxy host 
when instantiating the SQS client" },
     "proxyPort": { "kind": "parameter", "displayName": "Proxy Port", "group": 
"common", "label": "", "required": false, "type": "integer", "javaType": 
"java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, 
"configurationClass": "org.apache.camel.component.aws2.s3.AWS2S3Configuration", 
"configurationField": "configuration", "description": "Specify a proxy port to 
be used inside the client definition." },
     "proxyProtocol": { "kind": "parameter", "displayName": "Proxy Protocol", 
"group": "common", "label": "", "required": false, "type": "object", 
"javaType": "software.amazon.awssdk.core.Protocol", "enum": [ "HTTP", "HTTPS" 
], "deprecated": false, "autowired": false, "secret": false, "defaultValue": 
"HTTPS", "configurationClass": 
"org.apache.camel.component.aws2.s3.AWS2S3Configuration", "configurationField": 
"configuration", "description": "To define a proxy protocol when instantiating 
t [...]
@@ -123,7 +127,6 @@
     "customerKeyId": { "kind": "parameter", "displayName": "Customer Key Id", 
"group": "common (advanced)", "label": "common,advanced", "required": false, 
"type": "string", "javaType": "java.lang.String", "deprecated": false, 
"autowired": false, "secret": false, "configurationClass": 
"org.apache.camel.component.aws2.s3.AWS2S3Configuration", "configurationField": 
"configuration", "description": "Define the id of Customer key to use in case 
CustomerKey is enabled" },
     "customerKeyMD5": { "kind": "parameter", "displayName": "Customer Key 
MD5", "group": "common (advanced)", "label": "common,advanced", "required": 
false, "type": "string", "javaType": "java.lang.String", "deprecated": false, 
"autowired": false, "secret": false, "configurationClass": 
"org.apache.camel.component.aws2.s3.AWS2S3Configuration", "configurationField": 
"configuration", "description": "Define the MD5 of Customer key to use in case 
CustomerKey is enabled" },
     "deleteAfterRead": { "kind": "parameter", "displayName": "Delete After 
Read", "group": "consumer", "label": "consumer", "required": false, "type": 
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": true, "configurationClass": 
"org.apache.camel.component.aws2.s3.AWS2S3Configuration", "configurationField": 
"configuration", "description": "Delete objects from S3 after they have been 
retrieved. The delete is only performed if the E [...]
-    "delimiter": { "kind": "parameter", "displayName": "Delimiter", "group": 
"consumer", "label": "consumer", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": false, "configurationClass": 
"org.apache.camel.component.aws2.s3.AWS2S3Configuration", "configurationField": 
"configuration", "description": "The delimiter which is used in the 
com.amazonaws.services.s3.model.ListObjectsRequest to only consume objects we 
are int [...]
     "destinationBucket": { "kind": "parameter", "displayName": "Destination 
Bucket", "group": "consumer", "label": "consumer", "required": false, "type": 
"string", "javaType": "java.lang.String", "deprecated": false, "autowired": 
false, "secret": false, "configurationClass": 
"org.apache.camel.component.aws2.s3.AWS2S3Configuration", "configurationField": 
"configuration", "description": "Define the destination bucket where an object 
must be moved when moveAfterRead is set to true." },
     "destinationBucketPrefix": { "kind": "parameter", "displayName": 
"Destination Bucket Prefix", "group": "consumer", "label": "consumer", 
"required": false, "type": "string", "javaType": "java.lang.String", 
"deprecated": false, "autowired": false, "secret": false, "configurationClass": 
"org.apache.camel.component.aws2.s3.AWS2S3Configuration", "configurationField": 
"configuration", "description": "Define the destination bucket prefix to use 
when an object must be moved and moveAfterRead [...]
     "destinationBucketSuffix": { "kind": "parameter", "displayName": 
"Destination Bucket Suffix", "group": "consumer", "label": "consumer", 
"required": false, "type": "string", "javaType": "java.lang.String", 
"deprecated": false, "autowired": false, "secret": false, "configurationClass": 
"org.apache.camel.component.aws2.s3.AWS2S3Configuration", "configurationField": 
"configuration", "description": "Define the destination bucket suffix to use 
when an object must be moved and moveAfterRead [...]
@@ -135,7 +138,6 @@
     "maxConnections": { "kind": "parameter", "displayName": "Max Connections", 
"group": "consumer", "label": "consumer", "required": false, "type": "integer", 
"javaType": "int", "deprecated": false, "autowired": false, "secret": false, 
"defaultValue": 60, "description": "Set the maxConnections parameter in the S3 
client configuration" },
     "maxMessagesPerPoll": { "kind": "parameter", "displayName": "Max Messages 
Per Poll", "group": "consumer", "label": "consumer", "required": false, "type": 
"integer", "javaType": "int", "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": 10, "description": "Gets the maximum number of 
messages as a limit to poll at each polling. Gets the maximum number of 
messages as a limit to poll at each polling. The default value is 10. Use 0 or 
a negative number to set it as u [...]
     "moveAfterRead": { "kind": "parameter", "displayName": "Move After Read", 
"group": "consumer", "label": "consumer", "required": false, "type": "boolean", 
"javaType": "boolean", "deprecated": false, "autowired": false, "secret": 
false, "defaultValue": false, "configurationClass": 
"org.apache.camel.component.aws2.s3.AWS2S3Configuration", "configurationField": 
"configuration", "description": "Move objects from S3 bucket to a different 
bucket after they have been retrieved. To accomplish [...]
-    "prefix": { "kind": "parameter", "displayName": "Prefix", "group": 
"consumer", "label": "consumer", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": false, "configurationClass": 
"org.apache.camel.component.aws2.s3.AWS2S3Configuration", "configurationField": 
"configuration", "description": "The prefix which is used in the 
com.amazonaws.services.s3.model.ListObjectsRequest to only consume objects we 
are interested in." },
     "sendEmptyMessageWhenIdle": { "kind": "parameter", "displayName": "Send 
Empty Message When Idle", "group": "consumer", "label": "consumer", "required": 
false, "type": "boolean", "javaType": "boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": false, "description": "If 
the polling consumer did not poll any files, you can enable this option to send 
an empty message (no body) instead." },
     "autocloseBody": { "kind": "parameter", "displayName": "Autoclose Body", 
"group": "consumer (advanced)", "label": "consumer,advanced", "required": 
false, "type": "boolean", "javaType": "boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": true, 
"configurationClass": "org.apache.camel.component.aws2.s3.AWS2S3Configuration", 
"configurationField": "configuration", "description": "If this option is true 
and includeBody is false, then the S3Object.close() me [...]
     "bridgeErrorHandler": { "kind": "parameter", "displayName": "Bridge Error 
Handler", "group": "consumer (advanced)", "label": "consumer,advanced", 
"required": false, "type": "boolean", "javaType": "boolean", "deprecated": 
false, "autowired": false, "secret": false, "defaultValue": false, 
"description": "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 [...]
diff --git 
a/components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/AWS2S3Configuration.java
 
b/components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/AWS2S3Configuration.java
index 881c5ba1ca4..0301f0fcdde 100644
--- 
a/components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/AWS2S3Configuration.java
+++ 
b/components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/AWS2S3Configuration.java
@@ -42,9 +42,9 @@ public class AWS2S3Configuration implements Cloneable {
     private String secretKey;
     @UriParam(label = "consumer")
     private String fileName;
-    @UriParam(label = "consumer")
+    @UriParam
     private String prefix;
-    @UriParam(label = "consumer")
+    @UriParam
     private String delimiter;
     @UriParam(label = "consumer")
     private String doneFileName;
diff --git 
a/components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/AWS2S3Constants.java
 
b/components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/AWS2S3Constants.java
index 112184f7d5e..ba9dfd2c786 100644
--- 
a/components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/AWS2S3Constants.java
+++ 
b/components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/AWS2S3Constants.java
@@ -129,4 +129,10 @@ public interface AWS2S3Constants {
     String METADATA = "CamelAwsS3Metadata";
     @Metadata(label = "consumer", description = "The timestamp of the 
message", javaType = "long")
     String MESSAGE_TIMESTAMP = Exchange.MESSAGE_TIMESTAMP;
+
+    @Metadata(description = "The prefix which is used in the 
com.amazonaws.services.s3.model.ListObjectsRequest to only list objects we are 
interested in")
+    String PREFIX = "CamelAwsS3Prefix";
+    @Metadata(description = "The delimiter which is used in the 
com.amazonaws.services.s3.model.ListObjectsRequest to only list objects we are 
interested in",
+              javaType = "String")
+    String DELIMITER = "CamelAwsS3Delimiter";
 }
diff --git 
a/components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/AWS2S3Producer.java
 
b/components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/AWS2S3Producer.java
index 4d825d69628..1394b26ff6a 100644
--- 
a/components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/AWS2S3Producer.java
+++ 
b/components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/AWS2S3Producer.java
@@ -562,7 +562,18 @@ public class AWS2S3Producer extends DefaultProducer {
                 message.setBody(objectList.contents());
             }
         } else {
-            ListObjectsResponse objectList = 
s3Client.listObjects(ListObjectsRequest.builder().bucket(bucketName).build());
+            final String delimiter
+                    = exchange.getIn().getHeader(AWS2S3Constants.DELIMITER, 
getConfiguration().getDelimiter(), String.class);
+            final String prefix
+                    = exchange.getIn().getHeader(AWS2S3Constants.PREFIX, 
getConfiguration().getPrefix(), String.class);
+
+            final ListObjectsRequest listObjectsRequest = ListObjectsRequest
+                    .builder()
+                    .bucket(bucketName)
+                    .delimiter(delimiter)
+                    .prefix(prefix)
+                    .build();
+            ListObjectsResponse objectList = 
s3Client.listObjects(listObjectsRequest);
 
             Message message = getMessageForResponse(exchange);
             message.setBody(objectList.contents());

Reply via email to