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
commit 193b7b30c2bc3852c7cee324b165d939a195b076 Author: Claus Ibsen <[email protected]> AuthorDate: Fri Nov 27 16:28:15 2026 +0100 CAMEL-23832: camel-mongodb-gridfs - improve the component and option descriptions This commit rewrites the component description and the texts of 13 endpoint options and 7 headers of mongodb-gridfs. The queryStrategy text now explains each strategy, the delay and query texts say what the consumer does with them, and the operation text lists the operations and says that the header does not replace the option. The headers say which operation sets or reads them, and the CamelGridFsObjectId text says how remove picks the file. Documentation only, no behavior change. The component JSON, the catalog copy, the doc page header and the DSL are regenerated. camel-mongodb-gridfs is marked as done in tasks/component-descriptions.md. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Claus Ibsen <[email protected]> --- .../camel/catalog/components/mongodb-gridfs.json | 42 ++-- .../catalog/docs/mongodb-gridfs-component.adoc | 2 +- .../component/mongodb/gridfs/mongodb-gridfs.json | 42 ++-- .../src/main/docs/mongodb-gridfs-component.adoc | 2 +- .../component/mongodb/gridfs/GridFsConstants.java | 31 ++- .../component/mongodb/gridfs/GridFsEndpoint.java | 138 ++++--------- .../component/ComponentsBuilderFactory.java | 3 +- .../dsl/MongodbGridfsComponentBuilderFactory.java | 6 +- .../builder/endpoint/EndpointHeaderBuilders.java | 3 +- .../builder/endpoint/StaticEndpointBuilders.java | 12 +- .../endpoint/dsl/GridFsEndpointBuilderFactory.java | 221 ++++++++++++--------- tasks/component-descriptions.md | 2 +- 12 files changed, 255 insertions(+), 249 deletions(-) diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/mongodb-gridfs.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/mongodb-gridfs.json index 7efbc7939e72..c2b3fb3e202e 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/mongodb-gridfs.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/mongodb-gridfs.json @@ -3,7 +3,7 @@ "kind": "component", "name": "mongodb-gridfs", "title": "MongoDB GridFS", - "description": "Interact with MongoDB GridFS.", + "description": "Store, read and remove files in a MongoDB GridFS bucket, and receive the files that are uploaded to it.", "deprecated": false, "firstVersion": "2.18.0", "label": "database,file", @@ -33,13 +33,13 @@ "CamelFileLength": { "index": 1, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "long", "deprecated": false, "autowired": false, "secret": false, "description": "(producer) The size of the file that findOne found. (consumer) The size of the file.", "constantName": "org.apache.camel.component.mongodb.gridfs.GridFsConstants#FILE_LENGTH" }, "CamelFileLastModified": { "index": 2, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "Date", "deprecated": false, "autowired": false, "secret": false, "description": "(producer) The upload date of the file that findOne found. (consumer) The upload date of the file.", "constantName": "org.apache.camel.component.mongodb.gridfs.GridFsConstants#FILE_LAST_MODIFIED" }, "CamelFileName": { "index": 3, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "(producer) The name of the file: the name that create gives the file, and the file that findOne, remove, listAll and count look for. (consumer) The name of the file that was found.", "constantName": "org.apache.camel.component.mongodb.gridfs.GridFsConstants#FILE_NAME" }, - "Content-Type": { "index": 4, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The content type to store in the metadata of the file that create uploads.", "constantName": "org.apache.camel.component.mongodb.gridfs.GridFsConstants#CONTENT_TYPE" }, - "CamelFileNameProduced": { "index": 5, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The file name produced.", "constantName": "org.apache.camel.component.mongodb.gridfs.GridFsConstants#FILE_NAME_PRODUCED" }, - "CamelGridFsMetadata": { "index": 6, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "Any additional metadata stored along with the file in JSON format.", "constantName": "org.apache.camel.component.mongodb.gridfs.GridFsConstants#GRIDFS_METADATA" }, - "CamelGridFsOperation": { "index": 7, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The operation to perform.", "constantName": "org.apache.camel.component.mongodb.gridfs.GridFsConstants#GRIDFS_OPERATION" }, - "CamelGridFsChunkSize": { "index": 8, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "Integer", "deprecated": false, "autowired": false, "secret": false, "description": "The number of bytes per chunk for the uploaded file.", "constantName": "org.apache.camel.component.mongodb.gridfs.GridFsConstants#GRIDFS_CHUNKSIZE" }, - "CamelGridFsFileId": { "index": 9, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "org.bson.types.ObjectId", "deprecated": false, "autowired": false, "secret": false, "description": "The ObjectId of the file produced", "constantName": "org.apache.camel.component.mongodb.gridfs.GridFsConstants#GRIDFS_FILE_ID_PRODUCED" }, - "CamelGridFsObjectId": { "index": 10, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "org.bson.types.ObjectId", "deprecated": false, "autowired": false, "secret": false, "description": "The ObjectId of the file.", "constantName": "org.apache.camel.component.mongodb.gridfs.GridFsConstants#GRIDFS_OBJECT_ID" } + "Content-Type": { "index": 4, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The content type to store in the metadata of the file that create uploads. It replaces the contentType field of the CamelGridFsMetadata header.", "constantName": "org.apache.camel.component.mongodb.gridfs.GridFsConstants#CONTENT_TYPE" }, + "CamelFileNameProduced": { "index": 5, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The name of the file that create uploaded, from the CamelFileName header.", "constantName": "org.apache.camel.component.mongodb.gridfs.GridFsConstants#FILE_NAME_PRODUCED" }, + "CamelGridFsMetadata": { "index": 6, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "(producer) The metadata to store with the file that create uploads, as a JSON document, and the metadata of the file that findOne found. (consumer) The metadata of the file as a JSON document.", "constantName": "org.apache.camel.component.mongodb.gridfs.GridFsConstan [...] + "CamelGridFsOperation": { "index": 7, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The operation that the producer performs when the operation option is not set: create, remove, findOne, listAll or count.", "constantName": "org.apache.camel.component.mongodb.gridfs.GridFsConstants#GRIDFS_OPERATION" }, + "CamelGridFsChunkSize": { "index": 8, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "Integer", "deprecated": false, "autowired": false, "secret": false, "description": "The size in bytes of the chunks of the file that create uploads. If not set, or not greater than 0, the chunk size of the bucket is used, which is 255 KiB by default.", "constantName": "org.apache.camel.component.mongodb.gridfs.GridFsConstants#GRIDFS_CHUN [...] + "CamelGridFsFileId": { "index": 9, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "org.bson.types.ObjectId", "deprecated": false, "autowired": false, "secret": false, "description": "The ObjectId of the file that create uploaded.", "constantName": "org.apache.camel.component.mongodb.gridfs.GridFsConstants#GRIDFS_FILE_ID_PRODUCED" }, + "CamelGridFsObjectId": { "index": 10, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "org.bson.types.ObjectId", "deprecated": false, "autowired": false, "secret": false, "description": "The ObjectId of the file. create sets it to the id of the file it uploaded, and remove deletes the file with this id. If it is not set, remove deletes the first file it finds with the name in the CamelFileName header.", "constantName": "or [...] }, "bodyTypes": { "consumerOut": { "carriers": [ "stream" ], "description": "One message per new file: a stream of the content of the file (the stream cache when stream caching is on), closed when the exchange is done, with its name, length, upload date, content type and metadata in headers" }, @@ -47,22 +47,22 @@ "producerOut": { "carriers": [ "unchanged" ], "byOption": [ { "option": "operation", "value": "findOne", "carriers": [ "stream" ] }, { "option": "operation", "value": "listAll", "carriers": [ "stream" ] }, { "option": "operation", "value": "count", "carriers": [ "value" ], "javaType": "java.lang.Long" }, { "option": "operation", "value": "remove", "carriers": [ "unchanged" ] } ], "description": "create, the default, leaves the body unchanged, with the id of the file in the CamelGridF [...] }, "properties": { - "connectionBean": { "index": 0, "kind": "path", "displayName": "Connection Bean", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Name of com.mongodb.client.MongoClient to use." }, - "bucket": { "index": 1, "kind": "parameter", "displayName": "Bucket", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "fs", "description": "Sets the name of the GridFS bucket within the database. Default is fs." }, - "database": { "index": 2, "kind": "parameter", "displayName": "Database", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "endpointIdentity": true, "description": "Sets the name of the MongoDB database to target" }, - "readPreference": { "index": 3, "kind": "parameter", "displayName": "Read Preference", "group": "common", "label": "", "required": false, "type": "object", "javaType": "com.mongodb.ReadPreference", "deprecated": false, "autowired": false, "secret": false, "description": "Sets a MongoDB ReadPreference on the Mongo connection. Read preferences set directly on the connection will be overridden by this setting. The com.mongodb.ReadPreference#valueOf(String) utility method is used to reso [...] - "writeConcern": { "index": 4, "kind": "parameter", "displayName": "Write Concern", "group": "common", "label": "", "required": false, "type": "enum", "javaType": "com.mongodb.WriteConcern", "enum": [ "ACKNOWLEDGED", "W1", "W2", "W3", "UNACKNOWLEDGED", "JOURNALED", "MAJORITY" ], "deprecated": false, "autowired": false, "secret": false, "description": "Set the WriteConcern for write operations on MongoDB using the standard ones. Resolved from the fields of the WriteConcern class by cal [...] - "delay": { "index": 5, "kind": "parameter", "displayName": "Delay", "group": "consumer", "label": "consumer", "required": false, "type": "duration", "javaType": "long", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "500", "description": "Sets the delay between polls within the Consumer. Default is 500ms" }, - "fileAttributeName": { "index": 6, "kind": "parameter", "displayName": "File Attribute Name", "group": "consumer", "label": "consumer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "camel-processed", "description": "If the QueryType uses a FileAttribute, this sets the name of the attribute that is used. Default is camel-processed." }, - "initialDelay": { "index": 7, "kind": "parameter", "displayName": "Initial Delay", "group": "consumer", "label": "consumer", "required": false, "type": "duration", "javaType": "long", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "1000", "description": "Sets the initialDelay before the consumer will start polling. Default is 1000ms" }, - "persistentTSCollection": { "index": 8, "kind": "parameter", "displayName": "Persistent TSCollection", "group": "consumer", "label": "consumer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "camel-timestamps", "description": "If the QueryType uses a persistent timestamp, this sets the name of the collection within the DB to store the timestamp." }, - "persistentTSObject": { "index": 9, "kind": "parameter", "displayName": "Persistent TSObject", "group": "consumer", "label": "consumer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "camel-timestamp", "description": "If the QueryType uses a persistent timestamp, this is the ID of the object in the collection to store the timestamp." }, - "query": { "index": 10, "kind": "parameter", "displayName": "Query", "group": "consumer", "label": "consumer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Additional query parameters (in JSON) that are used to configure the query used for finding files in the GridFsConsumer" }, - "queryStrategy": { "index": 11, "kind": "parameter", "displayName": "Query Strategy", "group": "consumer", "label": "consumer", "required": false, "type": "enum", "javaType": "org.apache.camel.component.mongodb.gridfs.QueryStrategy", "enum": [ "TimeStamp", "PersistentTimestamp", "FileAttribute", "TimeStampAndFileAttribute", "PersistentTimestampAndFileAttribute" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "TimeStamp", "description": "Sets the QueryStra [...] + "connectionBean": { "index": 0, "kind": "path", "displayName": "Connection Bean", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The name of the com.mongodb.client.MongoClient bean in the registry that connects to MongoDB. The endpoint closes this client when it shuts down." }, + "bucket": { "index": 1, "kind": "parameter", "displayName": "Bucket", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "fs", "description": "The name of the GridFS bucket. GridFS stores the files of the bucket in the two collections named after it with the suffixes .files and .chunks, such as fs.files and fs.chunks." }, + "database": { "index": 2, "kind": "parameter", "displayName": "Database", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "endpointIdentity": true, "description": "The name of the MongoDB database that holds the GridFS bucket, and the collection of the persistent timestamp of the consumer." }, + "readPreference": { "index": 3, "kind": "parameter", "displayName": "Read Preference", "group": "common", "label": "", "required": false, "type": "object", "javaType": "com.mongodb.ReadPreference", "deprecated": false, "autowired": false, "secret": false, "description": "The read preference for the reads of the endpoint, as a name that com.mongodb.ReadPreference.valueOf(String) accepts, such as primary, secondary or nearest. If not set, the read preference of the MongoClient is used." }, + "writeConcern": { "index": 4, "kind": "parameter", "displayName": "Write Concern", "group": "common", "label": "", "required": false, "type": "enum", "javaType": "com.mongodb.WriteConcern", "enum": [ "ACKNOWLEDGED", "W1", "W2", "W3", "UNACKNOWLEDGED", "JOURNALED", "MAJORITY" ], "deprecated": false, "autowired": false, "secret": false, "description": "The write concern for the writes of the endpoint, as the name of a constant of com.mongodb.WriteConcern. If not set, the write concern [...] + "delay": { "index": 5, "kind": "parameter", "displayName": "Delay", "group": "consumer", "label": "consumer", "required": false, "type": "duration", "javaType": "long", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "500", "description": "The time in milliseconds from the end of one poll to the start of the next poll." }, + "fileAttributeName": { "index": 6, "kind": "parameter", "displayName": "File Attribute Name", "group": "consumer", "label": "consumer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "camel-processed", "description": "The name of the field that the strategies with a file attribute set in the document of a file: processing while the file is routed, and done after it. The consumer removes th [...] + "initialDelay": { "index": 7, "kind": "parameter", "displayName": "Initial Delay", "group": "consumer", "label": "consumer", "required": false, "type": "duration", "javaType": "long", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "1000", "description": "The time in milliseconds from the start of the consumer to its first poll." }, + "persistentTSCollection": { "index": 8, "kind": "parameter", "displayName": "Persistent TSCollection", "group": "consumer", "label": "consumer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "camel-timestamps", "description": "The name of the collection in the database that stores the timestamp of the PersistentTimestamp and PersistentTimestampAndFileAttribute strategies." }, + "persistentTSObject": { "index": 9, "kind": "parameter", "displayName": "Persistent TSObject", "group": "consumer", "label": "consumer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "camel-timestamp", "description": "The value of the id field of the document that stores the timestamp in the collection of the persistentTSCollection option. Consumers that keep separate timestamps need diff [...] + "query": { "index": 10, "kind": "parameter", "displayName": "Query", "group": "consumer", "label": "consumer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "A query document in JSON that the consumer combines with the query of the queryStrategy option, to route only the matching files. Its fields are those of the document of a file in the bucket, such as filename or metadata.type." }, + "queryStrategy": { "index": 11, "kind": "parameter", "displayName": "Query Strategy", "group": "consumer", "label": "consumer", "required": false, "type": "enum", "javaType": "org.apache.camel.component.mongodb.gridfs.QueryStrategy", "enum": [ "TimeStamp", "PersistentTimestamp", "FileAttribute", "TimeStampAndFileAttribute", "PersistentTimestampAndFileAttribute" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "TimeStamp", "description": "How the consumer f [...] "bridgeErrorHandler": { "index": 12, "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 (if possible) occurred while the Camel consumer is trying to pickup incoming [...] "exceptionHandler": { "index": 13, "kind": "parameter", "displayName": "Exception Handler", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "object", "javaType": "org.apache.camel.spi.ExceptionHandler", "optionalPrefix": "consumer.", "deprecated": false, "autowired": false, "secret": false, "description": "To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this option is not in use. By de [...] "exchangePattern": { "index": 14, "kind": "parameter", "displayName": "Exchange Pattern", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "enum", "javaType": "org.apache.camel.ExchangePattern", "enum": [ "InOnly", "InOut" ], "deprecated": false, "autowired": false, "secret": false, "description": "Sets the exchange pattern when the consumer creates an exchange." }, - "operation": { "index": 15, "kind": "parameter", "displayName": "Operation", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the operation this endpoint will execute against GridFs." }, + "operation": { "index": 15, "kind": "parameter", "displayName": "Operation", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The operation that the producer performs: create (the default), remove, findOne, listAll or count. If this option is not set, the CamelGridFsOperation header chooses the operation; the header does not replace this option." }, "lazyStartProducer": { "index": 16, "kind": "parameter", "displayName": "Lazy Start Producer", "group": "producer (advanced)", "label": "producer,advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a produ [...] } } diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/mongodb-gridfs-component.adoc b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/mongodb-gridfs-component.adoc index c4569730e750..49ac33f48352 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/mongodb-gridfs-component.adoc +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/mongodb-gridfs-component.adoc @@ -2,7 +2,7 @@ :doctitle: MongoDB GridFS :shortname: mongodb-gridfs :artifactid: camel-mongodb-gridfs -:description: Interact with MongoDB GridFS. +:description: Store, read and remove files in a MongoDB GridFS bucket, and receive the files that are uploaded to it. :since: 2.18 :supportlevel: Stable :tabs-sync-option: diff --git a/components/camel-mongodb-gridfs/src/generated/resources/META-INF/org/apache/camel/component/mongodb/gridfs/mongodb-gridfs.json b/components/camel-mongodb-gridfs/src/generated/resources/META-INF/org/apache/camel/component/mongodb/gridfs/mongodb-gridfs.json index 7efbc7939e72..c2b3fb3e202e 100644 --- a/components/camel-mongodb-gridfs/src/generated/resources/META-INF/org/apache/camel/component/mongodb/gridfs/mongodb-gridfs.json +++ b/components/camel-mongodb-gridfs/src/generated/resources/META-INF/org/apache/camel/component/mongodb/gridfs/mongodb-gridfs.json @@ -3,7 +3,7 @@ "kind": "component", "name": "mongodb-gridfs", "title": "MongoDB GridFS", - "description": "Interact with MongoDB GridFS.", + "description": "Store, read and remove files in a MongoDB GridFS bucket, and receive the files that are uploaded to it.", "deprecated": false, "firstVersion": "2.18.0", "label": "database,file", @@ -33,13 +33,13 @@ "CamelFileLength": { "index": 1, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "long", "deprecated": false, "autowired": false, "secret": false, "description": "(producer) The size of the file that findOne found. (consumer) The size of the file.", "constantName": "org.apache.camel.component.mongodb.gridfs.GridFsConstants#FILE_LENGTH" }, "CamelFileLastModified": { "index": 2, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "Date", "deprecated": false, "autowired": false, "secret": false, "description": "(producer) The upload date of the file that findOne found. (consumer) The upload date of the file.", "constantName": "org.apache.camel.component.mongodb.gridfs.GridFsConstants#FILE_LAST_MODIFIED" }, "CamelFileName": { "index": 3, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "(producer) The name of the file: the name that create gives the file, and the file that findOne, remove, listAll and count look for. (consumer) The name of the file that was found.", "constantName": "org.apache.camel.component.mongodb.gridfs.GridFsConstants#FILE_NAME" }, - "Content-Type": { "index": 4, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The content type to store in the metadata of the file that create uploads.", "constantName": "org.apache.camel.component.mongodb.gridfs.GridFsConstants#CONTENT_TYPE" }, - "CamelFileNameProduced": { "index": 5, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The file name produced.", "constantName": "org.apache.camel.component.mongodb.gridfs.GridFsConstants#FILE_NAME_PRODUCED" }, - "CamelGridFsMetadata": { "index": 6, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "Any additional metadata stored along with the file in JSON format.", "constantName": "org.apache.camel.component.mongodb.gridfs.GridFsConstants#GRIDFS_METADATA" }, - "CamelGridFsOperation": { "index": 7, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The operation to perform.", "constantName": "org.apache.camel.component.mongodb.gridfs.GridFsConstants#GRIDFS_OPERATION" }, - "CamelGridFsChunkSize": { "index": 8, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "Integer", "deprecated": false, "autowired": false, "secret": false, "description": "The number of bytes per chunk for the uploaded file.", "constantName": "org.apache.camel.component.mongodb.gridfs.GridFsConstants#GRIDFS_CHUNKSIZE" }, - "CamelGridFsFileId": { "index": 9, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "org.bson.types.ObjectId", "deprecated": false, "autowired": false, "secret": false, "description": "The ObjectId of the file produced", "constantName": "org.apache.camel.component.mongodb.gridfs.GridFsConstants#GRIDFS_FILE_ID_PRODUCED" }, - "CamelGridFsObjectId": { "index": 10, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "org.bson.types.ObjectId", "deprecated": false, "autowired": false, "secret": false, "description": "The ObjectId of the file.", "constantName": "org.apache.camel.component.mongodb.gridfs.GridFsConstants#GRIDFS_OBJECT_ID" } + "Content-Type": { "index": 4, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The content type to store in the metadata of the file that create uploads. It replaces the contentType field of the CamelGridFsMetadata header.", "constantName": "org.apache.camel.component.mongodb.gridfs.GridFsConstants#CONTENT_TYPE" }, + "CamelFileNameProduced": { "index": 5, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The name of the file that create uploaded, from the CamelFileName header.", "constantName": "org.apache.camel.component.mongodb.gridfs.GridFsConstants#FILE_NAME_PRODUCED" }, + "CamelGridFsMetadata": { "index": 6, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "(producer) The metadata to store with the file that create uploads, as a JSON document, and the metadata of the file that findOne found. (consumer) The metadata of the file as a JSON document.", "constantName": "org.apache.camel.component.mongodb.gridfs.GridFsConstan [...] + "CamelGridFsOperation": { "index": 7, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The operation that the producer performs when the operation option is not set: create, remove, findOne, listAll or count.", "constantName": "org.apache.camel.component.mongodb.gridfs.GridFsConstants#GRIDFS_OPERATION" }, + "CamelGridFsChunkSize": { "index": 8, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "Integer", "deprecated": false, "autowired": false, "secret": false, "description": "The size in bytes of the chunks of the file that create uploads. If not set, or not greater than 0, the chunk size of the bucket is used, which is 255 KiB by default.", "constantName": "org.apache.camel.component.mongodb.gridfs.GridFsConstants#GRIDFS_CHUN [...] + "CamelGridFsFileId": { "index": 9, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "org.bson.types.ObjectId", "deprecated": false, "autowired": false, "secret": false, "description": "The ObjectId of the file that create uploaded.", "constantName": "org.apache.camel.component.mongodb.gridfs.GridFsConstants#GRIDFS_FILE_ID_PRODUCED" }, + "CamelGridFsObjectId": { "index": 10, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "org.bson.types.ObjectId", "deprecated": false, "autowired": false, "secret": false, "description": "The ObjectId of the file. create sets it to the id of the file it uploaded, and remove deletes the file with this id. If it is not set, remove deletes the first file it finds with the name in the CamelFileName header.", "constantName": "or [...] }, "bodyTypes": { "consumerOut": { "carriers": [ "stream" ], "description": "One message per new file: a stream of the content of the file (the stream cache when stream caching is on), closed when the exchange is done, with its name, length, upload date, content type and metadata in headers" }, @@ -47,22 +47,22 @@ "producerOut": { "carriers": [ "unchanged" ], "byOption": [ { "option": "operation", "value": "findOne", "carriers": [ "stream" ] }, { "option": "operation", "value": "listAll", "carriers": [ "stream" ] }, { "option": "operation", "value": "count", "carriers": [ "value" ], "javaType": "java.lang.Long" }, { "option": "operation", "value": "remove", "carriers": [ "unchanged" ] } ], "description": "create, the default, leaves the body unchanged, with the id of the file in the CamelGridF [...] }, "properties": { - "connectionBean": { "index": 0, "kind": "path", "displayName": "Connection Bean", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Name of com.mongodb.client.MongoClient to use." }, - "bucket": { "index": 1, "kind": "parameter", "displayName": "Bucket", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "fs", "description": "Sets the name of the GridFS bucket within the database. Default is fs." }, - "database": { "index": 2, "kind": "parameter", "displayName": "Database", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "endpointIdentity": true, "description": "Sets the name of the MongoDB database to target" }, - "readPreference": { "index": 3, "kind": "parameter", "displayName": "Read Preference", "group": "common", "label": "", "required": false, "type": "object", "javaType": "com.mongodb.ReadPreference", "deprecated": false, "autowired": false, "secret": false, "description": "Sets a MongoDB ReadPreference on the Mongo connection. Read preferences set directly on the connection will be overridden by this setting. The com.mongodb.ReadPreference#valueOf(String) utility method is used to reso [...] - "writeConcern": { "index": 4, "kind": "parameter", "displayName": "Write Concern", "group": "common", "label": "", "required": false, "type": "enum", "javaType": "com.mongodb.WriteConcern", "enum": [ "ACKNOWLEDGED", "W1", "W2", "W3", "UNACKNOWLEDGED", "JOURNALED", "MAJORITY" ], "deprecated": false, "autowired": false, "secret": false, "description": "Set the WriteConcern for write operations on MongoDB using the standard ones. Resolved from the fields of the WriteConcern class by cal [...] - "delay": { "index": 5, "kind": "parameter", "displayName": "Delay", "group": "consumer", "label": "consumer", "required": false, "type": "duration", "javaType": "long", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "500", "description": "Sets the delay between polls within the Consumer. Default is 500ms" }, - "fileAttributeName": { "index": 6, "kind": "parameter", "displayName": "File Attribute Name", "group": "consumer", "label": "consumer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "camel-processed", "description": "If the QueryType uses a FileAttribute, this sets the name of the attribute that is used. Default is camel-processed." }, - "initialDelay": { "index": 7, "kind": "parameter", "displayName": "Initial Delay", "group": "consumer", "label": "consumer", "required": false, "type": "duration", "javaType": "long", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "1000", "description": "Sets the initialDelay before the consumer will start polling. Default is 1000ms" }, - "persistentTSCollection": { "index": 8, "kind": "parameter", "displayName": "Persistent TSCollection", "group": "consumer", "label": "consumer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "camel-timestamps", "description": "If the QueryType uses a persistent timestamp, this sets the name of the collection within the DB to store the timestamp." }, - "persistentTSObject": { "index": 9, "kind": "parameter", "displayName": "Persistent TSObject", "group": "consumer", "label": "consumer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "camel-timestamp", "description": "If the QueryType uses a persistent timestamp, this is the ID of the object in the collection to store the timestamp." }, - "query": { "index": 10, "kind": "parameter", "displayName": "Query", "group": "consumer", "label": "consumer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Additional query parameters (in JSON) that are used to configure the query used for finding files in the GridFsConsumer" }, - "queryStrategy": { "index": 11, "kind": "parameter", "displayName": "Query Strategy", "group": "consumer", "label": "consumer", "required": false, "type": "enum", "javaType": "org.apache.camel.component.mongodb.gridfs.QueryStrategy", "enum": [ "TimeStamp", "PersistentTimestamp", "FileAttribute", "TimeStampAndFileAttribute", "PersistentTimestampAndFileAttribute" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "TimeStamp", "description": "Sets the QueryStra [...] + "connectionBean": { "index": 0, "kind": "path", "displayName": "Connection Bean", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The name of the com.mongodb.client.MongoClient bean in the registry that connects to MongoDB. The endpoint closes this client when it shuts down." }, + "bucket": { "index": 1, "kind": "parameter", "displayName": "Bucket", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "fs", "description": "The name of the GridFS bucket. GridFS stores the files of the bucket in the two collections named after it with the suffixes .files and .chunks, such as fs.files and fs.chunks." }, + "database": { "index": 2, "kind": "parameter", "displayName": "Database", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "endpointIdentity": true, "description": "The name of the MongoDB database that holds the GridFS bucket, and the collection of the persistent timestamp of the consumer." }, + "readPreference": { "index": 3, "kind": "parameter", "displayName": "Read Preference", "group": "common", "label": "", "required": false, "type": "object", "javaType": "com.mongodb.ReadPreference", "deprecated": false, "autowired": false, "secret": false, "description": "The read preference for the reads of the endpoint, as a name that com.mongodb.ReadPreference.valueOf(String) accepts, such as primary, secondary or nearest. If not set, the read preference of the MongoClient is used." }, + "writeConcern": { "index": 4, "kind": "parameter", "displayName": "Write Concern", "group": "common", "label": "", "required": false, "type": "enum", "javaType": "com.mongodb.WriteConcern", "enum": [ "ACKNOWLEDGED", "W1", "W2", "W3", "UNACKNOWLEDGED", "JOURNALED", "MAJORITY" ], "deprecated": false, "autowired": false, "secret": false, "description": "The write concern for the writes of the endpoint, as the name of a constant of com.mongodb.WriteConcern. If not set, the write concern [...] + "delay": { "index": 5, "kind": "parameter", "displayName": "Delay", "group": "consumer", "label": "consumer", "required": false, "type": "duration", "javaType": "long", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "500", "description": "The time in milliseconds from the end of one poll to the start of the next poll." }, + "fileAttributeName": { "index": 6, "kind": "parameter", "displayName": "File Attribute Name", "group": "consumer", "label": "consumer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "camel-processed", "description": "The name of the field that the strategies with a file attribute set in the document of a file: processing while the file is routed, and done after it. The consumer removes th [...] + "initialDelay": { "index": 7, "kind": "parameter", "displayName": "Initial Delay", "group": "consumer", "label": "consumer", "required": false, "type": "duration", "javaType": "long", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "1000", "description": "The time in milliseconds from the start of the consumer to its first poll." }, + "persistentTSCollection": { "index": 8, "kind": "parameter", "displayName": "Persistent TSCollection", "group": "consumer", "label": "consumer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "camel-timestamps", "description": "The name of the collection in the database that stores the timestamp of the PersistentTimestamp and PersistentTimestampAndFileAttribute strategies." }, + "persistentTSObject": { "index": 9, "kind": "parameter", "displayName": "Persistent TSObject", "group": "consumer", "label": "consumer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "camel-timestamp", "description": "The value of the id field of the document that stores the timestamp in the collection of the persistentTSCollection option. Consumers that keep separate timestamps need diff [...] + "query": { "index": 10, "kind": "parameter", "displayName": "Query", "group": "consumer", "label": "consumer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "A query document in JSON that the consumer combines with the query of the queryStrategy option, to route only the matching files. Its fields are those of the document of a file in the bucket, such as filename or metadata.type." }, + "queryStrategy": { "index": 11, "kind": "parameter", "displayName": "Query Strategy", "group": "consumer", "label": "consumer", "required": false, "type": "enum", "javaType": "org.apache.camel.component.mongodb.gridfs.QueryStrategy", "enum": [ "TimeStamp", "PersistentTimestamp", "FileAttribute", "TimeStampAndFileAttribute", "PersistentTimestampAndFileAttribute" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "TimeStamp", "description": "How the consumer f [...] "bridgeErrorHandler": { "index": 12, "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 (if possible) occurred while the Camel consumer is trying to pickup incoming [...] "exceptionHandler": { "index": 13, "kind": "parameter", "displayName": "Exception Handler", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "object", "javaType": "org.apache.camel.spi.ExceptionHandler", "optionalPrefix": "consumer.", "deprecated": false, "autowired": false, "secret": false, "description": "To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this option is not in use. By de [...] "exchangePattern": { "index": 14, "kind": "parameter", "displayName": "Exchange Pattern", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "enum", "javaType": "org.apache.camel.ExchangePattern", "enum": [ "InOnly", "InOut" ], "deprecated": false, "autowired": false, "secret": false, "description": "Sets the exchange pattern when the consumer creates an exchange." }, - "operation": { "index": 15, "kind": "parameter", "displayName": "Operation", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the operation this endpoint will execute against GridFs." }, + "operation": { "index": 15, "kind": "parameter", "displayName": "Operation", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The operation that the producer performs: create (the default), remove, findOne, listAll or count. If this option is not set, the CamelGridFsOperation header chooses the operation; the header does not replace this option." }, "lazyStartProducer": { "index": 16, "kind": "parameter", "displayName": "Lazy Start Producer", "group": "producer (advanced)", "label": "producer,advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a produ [...] } } diff --git a/components/camel-mongodb-gridfs/src/main/docs/mongodb-gridfs-component.adoc b/components/camel-mongodb-gridfs/src/main/docs/mongodb-gridfs-component.adoc index c4569730e750..49ac33f48352 100644 --- a/components/camel-mongodb-gridfs/src/main/docs/mongodb-gridfs-component.adoc +++ b/components/camel-mongodb-gridfs/src/main/docs/mongodb-gridfs-component.adoc @@ -2,7 +2,7 @@ :doctitle: MongoDB GridFS :shortname: mongodb-gridfs :artifactid: camel-mongodb-gridfs -:description: Interact with MongoDB GridFS. +:description: Store, read and remove files in a MongoDB GridFS bucket, and receive the files that are uploaded to it. :since: 2.18 :supportlevel: Stable :tabs-sync-option: diff --git a/components/camel-mongodb-gridfs/src/main/java/org/apache/camel/component/mongodb/gridfs/GridFsConstants.java b/components/camel-mongodb-gridfs/src/main/java/org/apache/camel/component/mongodb/gridfs/GridFsConstants.java index adf363054a98..baecccb84e6f 100644 --- a/components/camel-mongodb-gridfs/src/main/java/org/apache/camel/component/mongodb/gridfs/GridFsConstants.java +++ b/components/camel-mongodb-gridfs/src/main/java/org/apache/camel/component/mongodb/gridfs/GridFsConstants.java @@ -37,10 +37,13 @@ public final class GridFsConstants { javaType = "String") public static final String FILE_NAME = Exchange.FILE_NAME; @Metadata(label = "producer", - description = "The content type to store in the metadata of the file that create uploads.", + description = "The content type to store in the metadata of the file that create uploads. It replaces the" + + " contentType field of the CamelGridFsMetadata header.", javaType = "String") public static final String CONTENT_TYPE = Exchange.CONTENT_TYPE; - @Metadata(label = "producer", description = "The file name produced.", javaType = "String") + @Metadata(label = "producer", + description = "The name of the file that create uploaded, from the CamelFileName header.", + javaType = "String") public static final String FILE_NAME_PRODUCED = Exchange.FILE_NAME_PRODUCED; public static final String GRIDFS_FILE_ATTRIBUTE_DONE = "done"; @@ -49,15 +52,29 @@ public final class GridFsConstants { public static final String GRIDFS_FILE_KEY_FILENAME = "filename"; public static final String GRIDFS_FILE_KEY_UPLOAD_DATE = "uploadDate"; public static final String PERSISTENT_TIMESTAMP_KEY = "timestamp"; - @Metadata(description = "Any additional metadata stored along with the file in JSON format.", javaType = "String") + @Metadata(description = "(producer) The metadata to store with the file that create uploads, as a JSON document, and" + + " the metadata of the file that findOne found. (consumer) The metadata of the file as a JSON" + + " document.", + javaType = "String") public static final String GRIDFS_METADATA = "CamelGridFsMetadata"; - @Metadata(label = "producer", description = "The operation to perform.", javaType = "String") + @Metadata(label = "producer", + description = "The operation that the producer performs when the operation option is not set: create," + + " remove, findOne, listAll or count.", + javaType = "String") public static final String GRIDFS_OPERATION = "CamelGridFsOperation"; - @Metadata(label = "producer", description = "The number of bytes per chunk for the uploaded file.", javaType = "Integer") + @Metadata(label = "producer", + description = "The size in bytes of the chunks of the file that create uploads. If not set, or not greater" + + " than 0, the chunk size of the bucket is used, which is 255 KiB by default.", + javaType = "Integer") public static final String GRIDFS_CHUNKSIZE = "CamelGridFsChunkSize"; - @Metadata(label = "producer", description = "The ObjectId of the file produced", javaType = "org.bson.types.ObjectId") + @Metadata(label = "producer", description = "The ObjectId of the file that create uploaded.", + javaType = "org.bson.types.ObjectId") public static final String GRIDFS_FILE_ID_PRODUCED = "CamelGridFsFileId"; - @Metadata(label = "producer", description = "The ObjectId of the file.", javaType = "org.bson.types.ObjectId") + @Metadata(label = "producer", + description = "The ObjectId of the file. create sets it to the id of the file it uploaded, and remove deletes" + + " the file with this id. If it is not set, remove deletes the first file it finds with the name" + + " in the CamelFileName header.", + javaType = "org.bson.types.ObjectId") public static final String GRIDFS_OBJECT_ID = "CamelGridFsObjectId"; private GridFsConstants() { diff --git a/components/camel-mongodb-gridfs/src/main/java/org/apache/camel/component/mongodb/gridfs/GridFsEndpoint.java b/components/camel-mongodb-gridfs/src/main/java/org/apache/camel/component/mongodb/gridfs/GridFsEndpoint.java index ef07bcf9eb2c..2be7ae928692 100644 --- a/components/camel-mongodb-gridfs/src/main/java/org/apache/camel/component/mongodb/gridfs/GridFsEndpoint.java +++ b/components/camel-mongodb-gridfs/src/main/java/org/apache/camel/component/mongodb/gridfs/GridFsEndpoint.java @@ -41,7 +41,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** - * Interact with MongoDB GridFS. + * Store, read and remove files in a MongoDB GridFS bucket, and receive the files that are uploaded to it. */ @UriEndpoint(firstVersion = "2.18.0", scheme = "mongodb-gridfs", title = "MongoDB GridFS", syntax = "mongodb-gridfs:connectionBean", category = { Category.DATABASE, Category.FILE }, @@ -82,35 +82,65 @@ public class GridFsEndpoint extends DefaultEndpoint { private static final Logger LOG = LoggerFactory.getLogger(GridFsEndpoint.class); - @UriPath + @UriPath(description = "The name of the com.mongodb.client.MongoClient bean in the registry that connects to MongoDB." + + " The endpoint closes this client when it shuts down.") @Metadata(required = true) private String connectionBean; - @UriParam(endpointIdentity = true) + @UriParam(endpointIdentity = true, + description = "The name of the MongoDB database that holds the GridFS bucket, and the collection of the" + + " persistent timestamp of the consumer.") @Metadata(required = true) private String database; - @UriParam(defaultValue = "fs") + @UriParam(defaultValue = "fs", + description = "The name of the GridFS bucket. GridFS stores the files of the bucket in the two collections" + + " named after it with the suffixes .files and .chunks, such as fs.files and fs.chunks.") private String bucket; - @UriParam(enums = "ACKNOWLEDGED,W1,W2,W3,UNACKNOWLEDGED,JOURNALED,MAJORITY") + @UriParam(enums = "ACKNOWLEDGED,W1,W2,W3,UNACKNOWLEDGED,JOURNALED,MAJORITY", + description = "The write concern for the writes of the endpoint, as the name of a constant of" + + " com.mongodb.WriteConcern. If not set, the write concern of the MongoClient is used.") private WriteConcern writeConcern; - @UriParam + @UriParam(description = "The read preference for the reads of the endpoint, as a name that" + + " com.mongodb.ReadPreference.valueOf(String) accepts, such as primary, secondary or nearest. If" + + " not set, the read preference of the MongoClient is used.") private ReadPreference readPreference; - @UriParam(label = "producer") + @UriParam(label = "producer", + description = "The operation that the producer performs: create (the default), remove, findOne, listAll or" + + " count. If this option is not set, the CamelGridFsOperation header chooses the operation; the" + + " header does not replace this option.") private String operation; - @UriParam(label = "consumer") + @UriParam(label = "consumer", + description = "A query document in JSON that the consumer combines with the query of the queryStrategy" + + " option, to route only the matching files. Its fields are those of the document of a file in" + + " the bucket, such as filename or metadata.type.") private String query; - @UriParam(label = "consumer", defaultValue = "1000", javaType = "java.time.Duration") + @UriParam(label = "consumer", defaultValue = "1000", javaType = "java.time.Duration", + description = "The time in milliseconds from the start of the consumer to its first poll.") private long initialDelay = 1000; - @UriParam(label = "consumer", defaultValue = "500", javaType = "java.time.Duration") + @UriParam(label = "consumer", defaultValue = "500", javaType = "java.time.Duration", + description = "The time in milliseconds from the end of one poll to the start of the next poll.") private long delay = 500; - @UriParam(label = "consumer", defaultValue = "TimeStamp") + @UriParam(label = "consumer", defaultValue = "TimeStamp", + description = "How the consumer finds the new files. TimeStamp routes the files uploaded after the consumer" + + " started or after the last file it routed, and PersistentTimestamp stores that timestamp in" + + " MongoDB, so that it survives a restart. FileAttribute routes the files that do not have the" + + " field of the fileAttributeName option, and the strategies ending in AndFileAttribute require" + + " both.") private QueryStrategy queryStrategy = QueryStrategy.TimeStamp; - @UriParam(label = "consumer", defaultValue = "camel-timestamps") + @UriParam(label = "consumer", defaultValue = "camel-timestamps", + description = "The name of the collection in the database that stores the timestamp of the" + + " PersistentTimestamp and PersistentTimestampAndFileAttribute strategies.") private String persistentTSCollection = "camel-timestamps"; - @UriParam(label = "consumer", defaultValue = "camel-timestamp") + @UriParam(label = "consumer", defaultValue = "camel-timestamp", + description = "The value of the id field of the document that stores the timestamp in the collection of the" + + " persistentTSCollection option. Consumers that keep separate timestamps need different" + + " values.") private String persistentTSObject = "camel-timestamp"; - @UriParam(label = "consumer", defaultValue = "camel-processed") + @UriParam(label = "consumer", defaultValue = "camel-processed", + description = "The name of the field that the strategies with a file attribute set in the document of a file:" + + " processing while the file is routed, and done after it. The consumer removes the field when" + + " the exchange fails, so that the next poll offers the file again.") private String fileAttributeName = "camel-processed"; private MongoClient mongoConnection; @@ -191,9 +221,6 @@ public class GridFsEndpoint extends DefaultEndpoint { return connectionBean; } - /** - * Name of {@link com.mongodb.client.MongoClient} to use. - */ public void setConnectionBean(String connectionBean) { this.connectionBean = connectionBean; } @@ -219,18 +246,10 @@ public class GridFsEndpoint extends DefaultEndpoint { return database; } - /** - * Sets the name of the MongoDB database to target - * - * @param database name of the MongoDB database - */ public void setDatabase(String database) { this.database = database; } - /** - * Sets the name of the GridFS bucket within the database. Default is fs. - */ public String getBucket() { return bucket; } @@ -243,10 +262,6 @@ public class GridFsEndpoint extends DefaultEndpoint { return query; } - /** - * Additional query parameters (in JSON) that are used to configure the query used for finding files in the - * GridFsConsumer - */ public void setQuery(String query) { this.query = query; } @@ -255,9 +270,6 @@ public class GridFsEndpoint extends DefaultEndpoint { return delay; } - /** - * Sets the delay between polls within the Consumer. Default is 500ms - */ public void setDelay(long delay) { this.delay = delay; } @@ -266,23 +278,14 @@ public class GridFsEndpoint extends DefaultEndpoint { return initialDelay; } - /** - * Sets the initialDelay before the consumer will start polling. Default is 1000ms - */ public void setInitialDelay(long initialDelay) { this.initialDelay = initialDelay; } - /** - * Sets the QueryStrategy that is used for polling for new files. Default is Timestamp - */ public void setQueryStrategy(String s) { queryStrategy = QueryStrategy.valueOf(s); } - /** - * Sets the QueryStrategy that is used for polling for new files. Default is Timestamp - */ public void setQueryStrategy(QueryStrategy queryStrategy) { this.queryStrategy = queryStrategy; } @@ -291,10 +294,6 @@ public class GridFsEndpoint extends DefaultEndpoint { return queryStrategy; } - /** - * If the QueryType uses a persistent timestamp, this sets the name of the collection within the DB to store the - * timestamp. - */ public void setPersistentTSCollection(String s) { persistentTSCollection = s; } @@ -303,10 +302,6 @@ public class GridFsEndpoint extends DefaultEndpoint { return persistentTSCollection; } - /** - * If the QueryType uses a persistent timestamp, this is the ID of the object in the collection to store the - * timestamp. - */ public void setPersistentTSObject(String id) { persistentTSObject = id; } @@ -315,10 +310,6 @@ public class GridFsEndpoint extends DefaultEndpoint { return persistentTSObject; } - /** - * If the QueryType uses a FileAttribute, this sets the name of the attribute that is used. Default is - * "camel-processed". - */ public void setFileAttributeName(String f) { fileAttributeName = f; } @@ -327,28 +318,10 @@ public class GridFsEndpoint extends DefaultEndpoint { return fileAttributeName; } - /** - * Set the {@link WriteConcern} for write operations on MongoDB using the standard ones. Resolved from the fields of - * the WriteConcern class by calling the {@link WriteConcern#valueOf(String)} method. - * - * @param writeConcern the standard name of the WriteConcern - * @see <a href= - * "http://api.mongodb.org/java/current/com/mongodb/WriteConcern.html#valueOf(java.lang.String)">possible - * options</a> - */ public void setWriteConcern(String writeConcern) { this.writeConcern = WriteConcern.valueOf(writeConcern); } - /** - * Set the {@link WriteConcern} for write operations on MongoDB using the standard ones. Resolved from the fields of - * the WriteConcern class by calling the {@link WriteConcern#valueOf(String)} method. - * - * @param writeConcern the standard name of the WriteConcern - * @see <a href= - * "http://api.mongodb.org/java/current/com/mongodb/WriteConcern.html#valueOf(java.lang.String)">possible - * options</a> - */ public void setWriteConcern(WriteConcern writeConcern) { this.writeConcern = writeConcern; } @@ -357,30 +330,10 @@ public class GridFsEndpoint extends DefaultEndpoint { return writeConcern; } - /** - * Sets a MongoDB {@link ReadPreference} on the Mongo connection. Read preferences set directly on the connection - * will be overridden by this setting. - * <p/> - * The {@link com.mongodb.ReadPreference#valueOf(String)} utility method is used to resolve the passed - * {@code readPreference} value. Some examples for the possible values are {@code nearest}, {@code primary} or - * {@code secondary} etc. - * - * @param readPreference the name of the read preference to set - */ public void setReadPreference(String readPreference) { this.readPreference = ReadPreference.valueOf(readPreference); } - /** - * Sets a MongoDB {@link ReadPreference} on the Mongo connection. Read preferences set directly on the connection - * will be overridden by this setting. - * <p/> - * The {@link com.mongodb.ReadPreference#valueOf(String)} utility method is used to resolve the passed - * {@code readPreference} value. Some examples for the possible values are {@code nearest}, {@code primary} or - * {@code secondary} etc. - * - * @param readPreference the name of the read preference to set - */ public void setReadPreference(ReadPreference readPreference) { this.readPreference = readPreference; } @@ -389,9 +342,6 @@ public class GridFsEndpoint extends DefaultEndpoint { return readPreference; } - /** - * Sets the operation this endpoint will execute against GridFs. - */ public void setOperation(String operation) { this.operation = operation; } diff --git a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/ComponentsBuilderFactory.java b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/ComponentsBuilderFactory.java index c64d99d28493..6278c6accb8f 100644 --- a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/ComponentsBuilderFactory.java +++ b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/ComponentsBuilderFactory.java @@ -3817,7 +3817,8 @@ public interface ComponentsBuilderFactory { } /** * MongoDB GridFS (camel-mongodb-gridfs) - * Interact with MongoDB GridFS. + * Store, read and remove files in a MongoDB GridFS bucket, and receive the + * files that are uploaded to it. * * Category: database,file * Since: 2.18 diff --git a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/MongodbGridfsComponentBuilderFactory.java b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/MongodbGridfsComponentBuilderFactory.java index 317924f65df6..4e892a15dc5f 100644 --- a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/MongodbGridfsComponentBuilderFactory.java +++ b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/MongodbGridfsComponentBuilderFactory.java @@ -24,7 +24,8 @@ import org.apache.camel.builder.component.ComponentBuilder; import org.apache.camel.component.mongodb.gridfs.GridFsComponent; /** - * Interact with MongoDB GridFS. + * Store, read and remove files in a MongoDB GridFS bucket, and receive the + * files that are uploaded to it. * * Generated by camel build tools - do NOT edit this file! */ @@ -33,7 +34,8 @@ public interface MongodbGridfsComponentBuilderFactory { /** * MongoDB GridFS (camel-mongodb-gridfs) - * Interact with MongoDB GridFS. + * Store, read and remove files in a MongoDB GridFS bucket, and receive the + * files that are uploaded to it. * * Category: database,file * Since: 2.18 diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointHeaderBuilders.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointHeaderBuilders.java index 0e1c49e552ae..447fd9e2ea9d 100644 --- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointHeaderBuilders.java +++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointHeaderBuilders.java @@ -3044,7 +3044,8 @@ public class EndpointHeaderBuilders { } /** * MongoDB GridFS (camel-mongodb-gridfs) - * Interact with MongoDB GridFS. + * Store, read and remove files in a MongoDB GridFS bucket, and receive the + * files that are uploaded to it. * * Category: database,file * Since: 2.18 diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java index 3c0a214206e7..910ab2e3d83c 100644 --- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java +++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java @@ -12842,7 +12842,8 @@ public class StaticEndpointBuilders { } /** * MongoDB GridFS (camel-mongodb-gridfs) - * Interact with MongoDB GridFS. + * Store, read and remove files in a MongoDB GridFS bucket, and receive the + * files that are uploaded to it. * * Category: database,file * Since: 2.18 @@ -12851,7 +12852,8 @@ public class StaticEndpointBuilders { * Syntax: <code>mongodb-gridfs:connectionBean</code> * * Path parameter: connectionBean (required) - * Name of com.mongodb.client.MongoClient to use. + * The name of the com.mongodb.client.MongoClient bean in the registry that + * connects to MongoDB. The endpoint closes this client when it shuts down. * * @param path connectionBean * @return the dsl builder @@ -12861,7 +12863,8 @@ public class StaticEndpointBuilders { } /** * MongoDB GridFS (camel-mongodb-gridfs) - * Interact with MongoDB GridFS. + * Store, read and remove files in a MongoDB GridFS bucket, and receive the + * files that are uploaded to it. * * Category: database,file * Since: 2.18 @@ -12870,7 +12873,8 @@ public class StaticEndpointBuilders { * Syntax: <code>mongodb-gridfs:connectionBean</code> * * Path parameter: connectionBean (required) - * Name of com.mongodb.client.MongoClient to use. + * The name of the com.mongodb.client.MongoClient bean in the registry that + * connects to MongoDB. The endpoint closes this client when it shuts down. * * @param componentName to use a custom component name for the endpoint * instead of the default name diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/GridFsEndpointBuilderFactory.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/GridFsEndpointBuilderFactory.java index e906a04db4fd..34dfab605536 100644 --- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/GridFsEndpointBuilderFactory.java +++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/GridFsEndpointBuilderFactory.java @@ -27,7 +27,8 @@ import org.apache.camel.builder.EndpointProducerBuilder; import org.apache.camel.builder.endpoint.AbstractEndpointBuilder; /** - * Interact with MongoDB GridFS. + * Store, read and remove files in a MongoDB GridFS bucket, and receive the + * files that are uploaded to it. * * Generated by camel build tools - do NOT edit this file! */ @@ -44,8 +45,9 @@ public interface GridFsEndpointBuilderFactory { return (AdvancedGridFsEndpointConsumerBuilder) this; } /** - * Sets the name of the GridFS bucket within the database. Default is - * fs. + * The name of the GridFS bucket. GridFS stores the files of the bucket + * in the two collections named after it with the suffixes .files and + * .chunks, such as fs.files and fs.chunks. * * The option is a: <code>java.lang.String</code> type. * @@ -60,7 +62,8 @@ public interface GridFsEndpointBuilderFactory { return this; } /** - * Sets the name of the MongoDB database to target. + * The name of the MongoDB database that holds the GridFS bucket, and + * the collection of the persistent timestamp of the consumer. * * The option is a: <code>java.lang.String</code> type. * @@ -75,12 +78,10 @@ public interface GridFsEndpointBuilderFactory { return this; } /** - * Sets a MongoDB ReadPreference on the Mongo connection. Read - * preferences set directly on the connection will be overridden by this - * setting. The com.mongodb.ReadPreference#valueOf(String) utility - * method is used to resolve the passed readPreference value. Some - * examples for the possible values are nearest, primary or secondary - * etc. + * The read preference for the reads of the endpoint, as a name that + * com.mongodb.ReadPreference.valueOf(String) accepts, such as primary, + * secondary or nearest. If not set, the read preference of the + * MongoClient is used. * * The option is a: <code>com.mongodb.ReadPreference</code> type. * @@ -94,12 +95,10 @@ public interface GridFsEndpointBuilderFactory { return this; } /** - * Sets a MongoDB ReadPreference on the Mongo connection. Read - * preferences set directly on the connection will be overridden by this - * setting. The com.mongodb.ReadPreference#valueOf(String) utility - * method is used to resolve the passed readPreference value. Some - * examples for the possible values are nearest, primary or secondary - * etc. + * The read preference for the reads of the endpoint, as a name that + * com.mongodb.ReadPreference.valueOf(String) accepts, such as primary, + * secondary or nearest. If not set, the read preference of the + * MongoClient is used. * * The option will be converted to a * <code>com.mongodb.ReadPreference</code> type. @@ -114,9 +113,9 @@ public interface GridFsEndpointBuilderFactory { return this; } /** - * Set the WriteConcern for write operations on MongoDB using the - * standard ones. Resolved from the fields of the WriteConcern class by - * calling the WriteConcern#valueOf(String) method. + * The write concern for the writes of the endpoint, as the name of a + * constant of com.mongodb.WriteConcern. If not set, the write concern + * of the MongoClient is used. * * The option is a: <code>com.mongodb.WriteConcern</code> type. * @@ -130,9 +129,9 @@ public interface GridFsEndpointBuilderFactory { return this; } /** - * Set the WriteConcern for write operations on MongoDB using the - * standard ones. Resolved from the fields of the WriteConcern class by - * calling the WriteConcern#valueOf(String) method. + * The write concern for the writes of the endpoint, as the name of a + * constant of com.mongodb.WriteConcern. If not set, the write concern + * of the MongoClient is used. * * The option will be converted to a * <code>com.mongodb.WriteConcern</code> type. @@ -147,7 +146,8 @@ public interface GridFsEndpointBuilderFactory { return this; } /** - * Sets the delay between polls within the Consumer. Default is 500ms. + * The time in milliseconds from the end of one poll to the start of the + * next poll. * * The option is a: <code>long</code> type. * @@ -162,7 +162,8 @@ public interface GridFsEndpointBuilderFactory { return this; } /** - * Sets the delay between polls within the Consumer. Default is 500ms. + * The time in milliseconds from the end of one poll to the start of the + * next poll. * * The option will be converted to a <code>long</code> type. * @@ -177,8 +178,10 @@ public interface GridFsEndpointBuilderFactory { return this; } /** - * If the QueryType uses a FileAttribute, this sets the name of the - * attribute that is used. Default is camel-processed. + * The name of the field that the strategies with a file attribute set + * in the document of a file: processing while the file is routed, and + * done after it. The consumer removes the field when the exchange + * fails, so that the next poll offers the file again. * * The option is a: <code>java.lang.String</code> type. * @@ -193,8 +196,8 @@ public interface GridFsEndpointBuilderFactory { return this; } /** - * Sets the initialDelay before the consumer will start polling. Default - * is 1000ms. + * The time in milliseconds from the start of the consumer to its first + * poll. * * The option is a: <code>long</code> type. * @@ -209,8 +212,8 @@ public interface GridFsEndpointBuilderFactory { return this; } /** - * Sets the initialDelay before the consumer will start polling. Default - * is 1000ms. + * The time in milliseconds from the start of the consumer to its first + * poll. * * The option will be converted to a <code>long</code> type. * @@ -225,8 +228,9 @@ public interface GridFsEndpointBuilderFactory { return this; } /** - * If the QueryType uses a persistent timestamp, this sets the name of - * the collection within the DB to store the timestamp. + * The name of the collection in the database that stores the timestamp + * of the PersistentTimestamp and PersistentTimestampAndFileAttribute + * strategies. * * The option is a: <code>java.lang.String</code> type. * @@ -241,8 +245,9 @@ public interface GridFsEndpointBuilderFactory { return this; } /** - * If the QueryType uses a persistent timestamp, this is the ID of the - * object in the collection to store the timestamp. + * The value of the id field of the document that stores the timestamp + * in the collection of the persistentTSCollection option. Consumers + * that keep separate timestamps need different values. * * The option is a: <code>java.lang.String</code> type. * @@ -257,8 +262,10 @@ public interface GridFsEndpointBuilderFactory { return this; } /** - * Additional query parameters (in JSON) that are used to configure the - * query used for finding files in the GridFsConsumer. + * A query document in JSON that the consumer combines with the query of + * the queryStrategy option, to route only the matching files. Its + * fields are those of the document of a file in the bucket, such as + * filename or metadata.type. * * The option is a: <code>java.lang.String</code> type. * @@ -272,8 +279,12 @@ public interface GridFsEndpointBuilderFactory { return this; } /** - * Sets the QueryStrategy that is used for polling for new files. - * Default is Timestamp. + * How the consumer finds the new files. TimeStamp routes the files + * uploaded after the consumer started or after the last file it routed, + * and PersistentTimestamp stores that timestamp in MongoDB, so that it + * survives a restart. FileAttribute routes the files that do not have + * the field of the fileAttributeName option, and the strategies ending + * in AndFileAttribute require both. * * The option is a: * <code>org.apache.camel.component.mongodb.gridfs.QueryStrategy</code> @@ -290,8 +301,12 @@ public interface GridFsEndpointBuilderFactory { return this; } /** - * Sets the QueryStrategy that is used for polling for new files. - * Default is Timestamp. + * How the consumer finds the new files. TimeStamp routes the files + * uploaded after the consumer started or after the last file it routed, + * and PersistentTimestamp stores that timestamp in MongoDB, so that it + * survives a restart. FileAttribute routes the files that do not have + * the field of the fileAttributeName option, and the strategies ending + * in AndFileAttribute require both. * * The option will be converted to a * <code>org.apache.camel.component.mongodb.gridfs.QueryStrategy</code> @@ -448,8 +463,9 @@ public interface GridFsEndpointBuilderFactory { } /** - * Sets the name of the GridFS bucket within the database. Default is - * fs. + * The name of the GridFS bucket. GridFS stores the files of the bucket + * in the two collections named after it with the suffixes .files and + * .chunks, such as fs.files and fs.chunks. * * The option is a: <code>java.lang.String</code> type. * @@ -464,7 +480,8 @@ public interface GridFsEndpointBuilderFactory { return this; } /** - * Sets the name of the MongoDB database to target. + * The name of the MongoDB database that holds the GridFS bucket, and + * the collection of the persistent timestamp of the consumer. * * The option is a: <code>java.lang.String</code> type. * @@ -479,12 +496,10 @@ public interface GridFsEndpointBuilderFactory { return this; } /** - * Sets a MongoDB ReadPreference on the Mongo connection. Read - * preferences set directly on the connection will be overridden by this - * setting. The com.mongodb.ReadPreference#valueOf(String) utility - * method is used to resolve the passed readPreference value. Some - * examples for the possible values are nearest, primary or secondary - * etc. + * The read preference for the reads of the endpoint, as a name that + * com.mongodb.ReadPreference.valueOf(String) accepts, such as primary, + * secondary or nearest. If not set, the read preference of the + * MongoClient is used. * * The option is a: <code>com.mongodb.ReadPreference</code> type. * @@ -498,12 +513,10 @@ public interface GridFsEndpointBuilderFactory { return this; } /** - * Sets a MongoDB ReadPreference on the Mongo connection. Read - * preferences set directly on the connection will be overridden by this - * setting. The com.mongodb.ReadPreference#valueOf(String) utility - * method is used to resolve the passed readPreference value. Some - * examples for the possible values are nearest, primary or secondary - * etc. + * The read preference for the reads of the endpoint, as a name that + * com.mongodb.ReadPreference.valueOf(String) accepts, such as primary, + * secondary or nearest. If not set, the read preference of the + * MongoClient is used. * * The option will be converted to a * <code>com.mongodb.ReadPreference</code> type. @@ -518,9 +531,9 @@ public interface GridFsEndpointBuilderFactory { return this; } /** - * Set the WriteConcern for write operations on MongoDB using the - * standard ones. Resolved from the fields of the WriteConcern class by - * calling the WriteConcern#valueOf(String) method. + * The write concern for the writes of the endpoint, as the name of a + * constant of com.mongodb.WriteConcern. If not set, the write concern + * of the MongoClient is used. * * The option is a: <code>com.mongodb.WriteConcern</code> type. * @@ -534,9 +547,9 @@ public interface GridFsEndpointBuilderFactory { return this; } /** - * Set the WriteConcern for write operations on MongoDB using the - * standard ones. Resolved from the fields of the WriteConcern class by - * calling the WriteConcern#valueOf(String) method. + * The write concern for the writes of the endpoint, as the name of a + * constant of com.mongodb.WriteConcern. If not set, the write concern + * of the MongoClient is used. * * The option will be converted to a * <code>com.mongodb.WriteConcern</code> type. @@ -551,7 +564,10 @@ public interface GridFsEndpointBuilderFactory { return this; } /** - * Sets the operation this endpoint will execute against GridFs. + * The operation that the producer performs: create (the default), + * remove, findOne, listAll or count. If this option is not set, the + * CamelGridFsOperation header chooses the operation; the header does + * not replace this option. * * The option is a: <code>java.lang.String</code> type. * @@ -634,8 +650,9 @@ public interface GridFsEndpointBuilderFactory { } /** - * Sets the name of the GridFS bucket within the database. Default is - * fs. + * The name of the GridFS bucket. GridFS stores the files of the bucket + * in the two collections named after it with the suffixes .files and + * .chunks, such as fs.files and fs.chunks. * * The option is a: <code>java.lang.String</code> type. * @@ -650,7 +667,8 @@ public interface GridFsEndpointBuilderFactory { return this; } /** - * Sets the name of the MongoDB database to target. + * The name of the MongoDB database that holds the GridFS bucket, and + * the collection of the persistent timestamp of the consumer. * * The option is a: <code>java.lang.String</code> type. * @@ -665,12 +683,10 @@ public interface GridFsEndpointBuilderFactory { return this; } /** - * Sets a MongoDB ReadPreference on the Mongo connection. Read - * preferences set directly on the connection will be overridden by this - * setting. The com.mongodb.ReadPreference#valueOf(String) utility - * method is used to resolve the passed readPreference value. Some - * examples for the possible values are nearest, primary or secondary - * etc. + * The read preference for the reads of the endpoint, as a name that + * com.mongodb.ReadPreference.valueOf(String) accepts, such as primary, + * secondary or nearest. If not set, the read preference of the + * MongoClient is used. * * The option is a: <code>com.mongodb.ReadPreference</code> type. * @@ -684,12 +700,10 @@ public interface GridFsEndpointBuilderFactory { return this; } /** - * Sets a MongoDB ReadPreference on the Mongo connection. Read - * preferences set directly on the connection will be overridden by this - * setting. The com.mongodb.ReadPreference#valueOf(String) utility - * method is used to resolve the passed readPreference value. Some - * examples for the possible values are nearest, primary or secondary - * etc. + * The read preference for the reads of the endpoint, as a name that + * com.mongodb.ReadPreference.valueOf(String) accepts, such as primary, + * secondary or nearest. If not set, the read preference of the + * MongoClient is used. * * The option will be converted to a * <code>com.mongodb.ReadPreference</code> type. @@ -704,9 +718,9 @@ public interface GridFsEndpointBuilderFactory { return this; } /** - * Set the WriteConcern for write operations on MongoDB using the - * standard ones. Resolved from the fields of the WriteConcern class by - * calling the WriteConcern#valueOf(String) method. + * The write concern for the writes of the endpoint, as the name of a + * constant of com.mongodb.WriteConcern. If not set, the write concern + * of the MongoClient is used. * * The option is a: <code>com.mongodb.WriteConcern</code> type. * @@ -720,9 +734,9 @@ public interface GridFsEndpointBuilderFactory { return this; } /** - * Set the WriteConcern for write operations on MongoDB using the - * standard ones. Resolved from the fields of the WriteConcern class by - * calling the WriteConcern#valueOf(String) method. + * The write concern for the writes of the endpoint, as the name of a + * constant of com.mongodb.WriteConcern. If not set, the write concern + * of the MongoClient is used. * * The option will be converted to a * <code>com.mongodb.WriteConcern</code> type. @@ -754,7 +768,8 @@ public interface GridFsEndpointBuilderFactory { public interface GridFsBuilders { /** * MongoDB GridFS (camel-mongodb-gridfs) - * Interact with MongoDB GridFS. + * Store, read and remove files in a MongoDB GridFS bucket, and receive + * the files that are uploaded to it. * * Category: database,file * Since: 2.18 @@ -767,7 +782,8 @@ public interface GridFsEndpointBuilderFactory { } /** * MongoDB GridFS (camel-mongodb-gridfs) - * Interact with MongoDB GridFS. + * Store, read and remove files in a MongoDB GridFS bucket, and receive + * the files that are uploaded to it. * * Category: database,file * Since: 2.18 @@ -776,7 +792,9 @@ public interface GridFsEndpointBuilderFactory { * Syntax: <code>mongodb-gridfs:connectionBean</code> * * Path parameter: connectionBean (required) - * Name of com.mongodb.client.MongoClient to use. + * The name of the com.mongodb.client.MongoClient bean in the registry + * that connects to MongoDB. The endpoint closes this client when it + * shuts down. * * @param path connectionBean * @return the dsl builder @@ -786,7 +804,8 @@ public interface GridFsEndpointBuilderFactory { } /** * MongoDB GridFS (camel-mongodb-gridfs) - * Interact with MongoDB GridFS. + * Store, read and remove files in a MongoDB GridFS bucket, and receive + * the files that are uploaded to it. * * Category: database,file * Since: 2.18 @@ -795,7 +814,9 @@ public interface GridFsEndpointBuilderFactory { * Syntax: <code>mongodb-gridfs:connectionBean</code> * * Path parameter: connectionBean (required) - * Name of com.mongodb.client.MongoClient to use. + * The name of the com.mongodb.client.MongoClient bean in the registry + * that connects to MongoDB. The endpoint closes this client when it + * shuts down. * * @param componentName to use a custom component name for the endpoint * instead of the default name @@ -872,7 +893,8 @@ public interface GridFsEndpointBuilderFactory { } /** * The content type to store in the metadata of the file that create - * uploads. + * uploads. It replaces the contentType field of the CamelGridFsMetadata + * header. * * The option is a: {@code String} type. * @@ -884,7 +906,8 @@ public interface GridFsEndpointBuilderFactory { return "Content-Type"; } /** - * The file name produced. + * The name of the file that create uploaded, from the CamelFileName + * header. * * The option is a: {@code String} type. * @@ -896,7 +919,9 @@ public interface GridFsEndpointBuilderFactory { return "CamelFileNameProduced"; } /** - * Any additional metadata stored along with the file in JSON format. + * (producer) The metadata to store with the file that create uploads, + * as a JSON document, and the metadata of the file that findOne found. + * (consumer) The metadata of the file as a JSON document. * * The option is a: {@code String} type. * @@ -908,7 +933,8 @@ public interface GridFsEndpointBuilderFactory { return "CamelGridFsMetadata"; } /** - * The operation to perform. + * The operation that the producer performs when the operation option is + * not set: create, remove, findOne, listAll or count. * * The option is a: {@code String} type. * @@ -920,7 +946,9 @@ public interface GridFsEndpointBuilderFactory { return "CamelGridFsOperation"; } /** - * The number of bytes per chunk for the uploaded file. + * The size in bytes of the chunks of the file that create uploads. If + * not set, or not greater than 0, the chunk size of the bucket is used, + * which is 255 KiB by default. * * The option is a: {@code Integer} type. * @@ -932,7 +960,7 @@ public interface GridFsEndpointBuilderFactory { return "CamelGridFsChunkSize"; } /** - * The ObjectId of the file produced. + * The ObjectId of the file that create uploaded. * * The option is a: {@code org.bson.types.ObjectId} type. * @@ -944,7 +972,10 @@ public interface GridFsEndpointBuilderFactory { return "CamelGridFsFileId"; } /** - * The ObjectId of the file. + * The ObjectId of the file. create sets it to the id of the file it + * uploaded, and remove deletes the file with this id. If it is not set, + * remove deletes the first file it finds with the name in the + * CamelFileName header. * * The option is a: {@code org.bson.types.ObjectId} type. * diff --git a/tasks/component-descriptions.md b/tasks/component-descriptions.md index 36fc190d66e2..b50a4aff0e87 100644 --- a/tasks/component-descriptions.md +++ b/tasks/component-descriptions.md @@ -277,7 +277,7 @@ or removes its row. | camel-mllp | mllp | | | camel-mock | mock | | | camel-mongodb | mongodb | | -| camel-mongodb-gridfs | mongodb-gridfs | | +| camel-mongodb-gridfs | mongodb-gridfs | yes | | camel-mtconnect | mtconnect | | | camel-mustache | mustache | yes | | camel-mvel | mvel | |
