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 0c686da9a71 CAMEL-19470 camel-mongodb : add option fullDocument for 
changeStreams... (#10436)
0c686da9a71 is described below

commit 0c686da9a7185421f2f14ec4b0a79e9da45655de
Author: Claus Ibsen <claus.ib...@gmail.com>
AuthorDate: Wed Jun 21 13:36:56 2023 +0200

    CAMEL-19470 camel-mongodb : add option fullDocument for changeStreams... 
(#10436)
---
 .../apache/camel/catalog/components/mongodb.json   | 21 ++++++------
 .../dsl/MongoDbEndpointBuilderFactory.java         | 37 ++++++++++++++++++++++
 2 files changed, 48 insertions(+), 10 deletions(-)

diff --git 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/mongodb.json
 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/mongodb.json
index 681b813fbe3..1fdee0797f5 100644
--- 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/mongodb.json
+++ 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/mongodb.json
@@ -73,15 +73,16 @@
     "readPreference": { "index": 16, "kind": "parameter", "displayName": "Read 
Preference", "group": "advanced", "label": "advanced", "required": false, 
"type": "string", "javaType": "java.lang.String", "enum": [ "PRIMARY", 
"PRIMARY_PREFERRED", "SECONDARY", "SECONDARY_PREFERRED", "NEAREST" ], 
"deprecated": false, "autowired": false, "secret": false, "defaultValue": 
"PRIMARY", "description": "Configure how MongoDB clients route read operations 
to the members of a replica set. Possible val [...]
     "writeConcern": { "index": 17, "kind": "parameter", "displayName": "Write 
Concern", "group": "advanced", "label": "advanced", "required": false, "type": 
"string", "javaType": "java.lang.String", "enum": [ "ACKNOWLEDGED", "W1", "W2", 
"W3", "UNACKNOWLEDGED", "JOURNALED", "MAJORITY" ], "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": "ACKNOWLEDGED", 
"description": "Configure the connection bean with the level of acknowledgment 
requested from MongoDB for write op [...]
     "writeResultAsHeader": { "index": 18, "kind": "parameter", "displayName": 
"Write Result As Header", "group": "advanced", "label": "advanced", "required": 
false, "type": "boolean", "javaType": "boolean", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": false, "description": "In 
write operations, it determines whether instead of returning WriteResult as the 
body of the OUT message, we transfer the IN message to the OUT and attach the 
WriteResult as a header." },
-    "streamFilter": { "index": 19, "kind": "parameter", "displayName": "Stream 
Filter", "group": "changeStream", "label": "consumer,changeStream", "required": 
false, "type": "string", "javaType": "java.lang.String", "deprecated": false, 
"autowired": false, "secret": false, "description": "Filter condition for 
change streams consumer." },
-    "authSource": { "index": 20, "kind": "parameter", "displayName": "Auth 
Source", "group": "security", "label": "security", "required": false, "type": 
"string", "javaType": "java.lang.String", "deprecated": false, "autowired": 
false, "secret": false, "description": "The database name associated with the 
user's credentials." },
-    "password": { "index": 21, "kind": "parameter", "displayName": "Password", 
"group": "security", "label": "security", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": true, "description": "User password for mongodb connection" },
-    "username": { "index": 22, "kind": "parameter", "displayName": "Username", 
"group": "security", "label": "security", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": true, "description": "Username for mongodb connection" },
-    "persistentId": { "index": 23, "kind": "parameter", "displayName": 
"Persistent Id", "group": "tail", "label": "consumer,tail", "required": false, 
"type": "string", "javaType": "java.lang.String", "deprecated": false, 
"autowired": false, "secret": false, "description": "One tail tracking 
collection can host many trackers for several tailable consumers. To keep them 
separate, each tracker should have its own unique persistentId." },
-    "persistentTailTracking": { "index": 24, "kind": "parameter", 
"displayName": "Persistent Tail Tracking", "group": "tail", "label": 
"consumer,tail", "required": false, "type": "boolean", "javaType": "boolean", 
"deprecated": false, "autowired": false, "secret": false, "defaultValue": 
false, "description": "Enable persistent tail tracking, which is a mechanism to 
keep track of the last consumed message across system restarts. The next time 
the system is up, the endpoint will recover the [...]
-    "tailTrackCollection": { "index": 25, "kind": "parameter", "displayName": 
"Tail Track Collection", "group": "tail", "label": "consumer,tail", "required": 
false, "type": "string", "javaType": "java.lang.String", "deprecated": false, 
"autowired": false, "secret": false, "description": "Collection where tail 
tracking information will be persisted. If not specified, 
MongoDbTailTrackingConfig#DEFAULT_COLLECTION will be used by default." },
-    "tailTrackDb": { "index": 26, "kind": "parameter", "displayName": "Tail 
Track Db", "group": "tail", "label": "consumer,tail", "required": false, 
"type": "string", "javaType": "java.lang.String", "deprecated": false, 
"autowired": false, "secret": false, "description": "Indicates what database 
the tail tracking mechanism will persist to. If not specified, the current 
database will be picked by default. Dynamicity will not be taken into account 
even if enabled, i.e. the tail tracking da [...]
-    "tailTrackField": { "index": 27, "kind": "parameter", "displayName": "Tail 
Track Field", "group": "tail", "label": "consumer,tail", "required": false, 
"type": "string", "javaType": "java.lang.String", "deprecated": false, 
"autowired": false, "secret": false, "description": "Field where the last 
tracked value will be placed. If not specified, 
MongoDbTailTrackingConfig#DEFAULT_FIELD will be used by default." },
-    "tailTrackIncreasingField": { "index": 28, "kind": "parameter", 
"displayName": "Tail Track Increasing Field", "group": "tail", "label": 
"consumer,tail", "required": false, "type": "string", "javaType": 
"java.lang.String", "deprecated": false, "autowired": false, "secret": false, 
"description": "Correlation field in the incoming record which is of increasing 
nature and will be used to position the tailing cursor every time it is 
generated. The cursor will be (re)created with a query o [...]
+    "fullDocument": { "index": 19, "kind": "parameter", "displayName": "Full 
Document", "group": "changeStream", "label": "consumer,changeStream", 
"required": false, "type": "object", "javaType": 
"com.mongodb.client.model.changestream.FullDocument", "enum": [ "default", 
"updateLookup", "required", "whenAvailable" ], "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": "default", "description": 
"Specifies whether changeStream consumer include a copy of the full docume [...]
+    "streamFilter": { "index": 20, "kind": "parameter", "displayName": "Stream 
Filter", "group": "changeStream", "label": "consumer,changeStream", "required": 
false, "type": "string", "javaType": "java.lang.String", "deprecated": false, 
"autowired": false, "secret": false, "description": "Filter condition for 
change streams consumer." },
+    "authSource": { "index": 21, "kind": "parameter", "displayName": "Auth 
Source", "group": "security", "label": "security", "required": false, "type": 
"string", "javaType": "java.lang.String", "deprecated": false, "autowired": 
false, "secret": false, "description": "The database name associated with the 
user's credentials." },
+    "password": { "index": 22, "kind": "parameter", "displayName": "Password", 
"group": "security", "label": "security", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": true, "description": "User password for mongodb connection" },
+    "username": { "index": 23, "kind": "parameter", "displayName": "Username", 
"group": "security", "label": "security", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": true, "description": "Username for mongodb connection" },
+    "persistentId": { "index": 24, "kind": "parameter", "displayName": 
"Persistent Id", "group": "tail", "label": "consumer,tail", "required": false, 
"type": "string", "javaType": "java.lang.String", "deprecated": false, 
"autowired": false, "secret": false, "description": "One tail tracking 
collection can host many trackers for several tailable consumers. To keep them 
separate, each tracker should have its own unique persistentId." },
+    "persistentTailTracking": { "index": 25, "kind": "parameter", 
"displayName": "Persistent Tail Tracking", "group": "tail", "label": 
"consumer,tail", "required": false, "type": "boolean", "javaType": "boolean", 
"deprecated": false, "autowired": false, "secret": false, "defaultValue": 
false, "description": "Enable persistent tail tracking, which is a mechanism to 
keep track of the last consumed message across system restarts. The next time 
the system is up, the endpoint will recover the [...]
+    "tailTrackCollection": { "index": 26, "kind": "parameter", "displayName": 
"Tail Track Collection", "group": "tail", "label": "consumer,tail", "required": 
false, "type": "string", "javaType": "java.lang.String", "deprecated": false, 
"autowired": false, "secret": false, "description": "Collection where tail 
tracking information will be persisted. If not specified, 
MongoDbTailTrackingConfig#DEFAULT_COLLECTION will be used by default." },
+    "tailTrackDb": { "index": 27, "kind": "parameter", "displayName": "Tail 
Track Db", "group": "tail", "label": "consumer,tail", "required": false, 
"type": "string", "javaType": "java.lang.String", "deprecated": false, 
"autowired": false, "secret": false, "description": "Indicates what database 
the tail tracking mechanism will persist to. If not specified, the current 
database will be picked by default. Dynamicity will not be taken into account 
even if enabled, i.e. the tail tracking da [...]
+    "tailTrackField": { "index": 28, "kind": "parameter", "displayName": "Tail 
Track Field", "group": "tail", "label": "consumer,tail", "required": false, 
"type": "string", "javaType": "java.lang.String", "deprecated": false, 
"autowired": false, "secret": false, "description": "Field where the last 
tracked value will be placed. If not specified, 
MongoDbTailTrackingConfig#DEFAULT_FIELD will be used by default." },
+    "tailTrackIncreasingField": { "index": 29, "kind": "parameter", 
"displayName": "Tail Track Increasing Field", "group": "tail", "label": 
"consumer,tail", "required": false, "type": "string", "javaType": 
"java.lang.String", "deprecated": false, "autowired": false, "secret": false, 
"description": "Correlation field in the incoming record which is of increasing 
nature and will be used to position the tailing cursor every time it is 
generated. The cursor will be (re)created with a query o [...]
   }
 }
diff --git 
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/MongoDbEndpointBuilderFactory.java
 
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/MongoDbEndpointBuilderFactory.java
index cf2a20c3ed0..10d065fcf8a 100644
--- 
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/MongoDbEndpointBuilderFactory.java
+++ 
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/MongoDbEndpointBuilderFactory.java
@@ -255,6 +255,43 @@ public interface MongoDbEndpointBuilderFactory {
             doSetProperty("consumerType", consumerType);
             return this;
         }
+        /**
+         * Specifies whether changeStream consumer include a copy of the full
+         * document when modified by update operations. Possible values are
+         * default, updateLookup, required and whenAvailable.
+         * 
+         * The option is a:
+         * 
&lt;code&gt;com.mongodb.client.model.changestream.FullDocument&lt;/code&gt; 
type.
+         * 
+         * Default: default
+         * Group: changeStream
+         * 
+         * @param fullDocument the value to set
+         * @return the dsl builder
+         */
+        default MongoDbEndpointConsumerBuilder fullDocument(
+                com.mongodb.client.model.changestream.FullDocument 
fullDocument) {
+            doSetProperty("fullDocument", fullDocument);
+            return this;
+        }
+        /**
+         * Specifies whether changeStream consumer include a copy of the full
+         * document when modified by update operations. Possible values are
+         * default, updateLookup, required and whenAvailable.
+         * 
+         * The option will be converted to a
+         * 
&lt;code&gt;com.mongodb.client.model.changestream.FullDocument&lt;/code&gt; 
type.
+         * 
+         * Default: default
+         * Group: changeStream
+         * 
+         * @param fullDocument the value to set
+         * @return the dsl builder
+         */
+        default MongoDbEndpointConsumerBuilder fullDocument(String 
fullDocument) {
+            doSetProperty("fullDocument", fullDocument);
+            return this;
+        }
         /**
          * Filter condition for change streams consumer.
          * 

Reply via email to