From 183f2ce015222ec30a736e43d66a2f372eac85b8 Mon Sep 17 00:00:00 2001 From: Croway Date: Thu, 14 May 2026 17:46:54 +0200 Subject: [PATCH 1/2] chore: camel-couchdb - align Exchange header constant values with Camel naming convention Rename the values of CouchDbConstants headers to follow the standard CamelCouchDb* naming convention so that HttpHeaderFilterStrategy blocks them on inbound HTTP requests. The constant field names are unchanged, so routes referencing the constants continue to work as-is. Add CouchDbHeaderInjectionIT to verify headers are Camel-prefixed and that raw header injection cannot override database operations. --- .../camel/catalog/components/couchdb.json | 10 ++--- .../camel/component/couchdb/couchdb.json | 10 ++--- .../src/main/docs/couchdb-component.adoc | 6 +-- .../component/couchdb/CouchDbConstants.java | 10 ++--- .../pages/camel-4x-upgrade-guide-4_21.adoc | 40 +++++++++++++++++++ .../dsl/CouchDbEndpointBuilderFactory.java | 10 ++--- 6 files changed, 63 insertions(+), 23 deletions(-) diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/couchdb.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/couchdb.json index 7743729d0aeea..3f5286c05ac31 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/couchdb.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/couchdb.json @@ -29,11 +29,11 @@ "autowiredEnabled": { "index": 2, "kind": "property", "displayName": "Autowired Enabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching type, which then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc." } }, "headers": { - "CouchDbDatabase": { "index": 0, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The database the message came from", "constantName": "org.apache.camel.component.couchdb.CouchDbConstants#HEADER_DATABASE" }, - "CouchDbSeq": { "index": 1, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The couchdb changeset sequence number of the update \/ delete message", "constantName": "org.apache.camel.component.couchdb.CouchDbConstants#HEADER_SEQ" }, - "CouchDbId": { "index": 2, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The couchdb document id", "constantName": "org.apache.camel.component.couchdb.CouchDbConstants#HEADER_DOC_ID" }, - "CouchDbRev": { "index": 3, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The couchdb document revision", "constantName": "org.apache.camel.component.couchdb.CouchDbConstants#HEADER_DOC_REV" }, - "CouchDbMethod": { "index": 4, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The method (delete \/ update)", "constantName": "org.apache.camel.component.couchdb.CouchDbConstants#HEADER_METHOD" }, + "CamelCouchDbDatabase": { "index": 0, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The database the message came from", "constantName": "org.apache.camel.component.couchdb.CouchDbConstants#HEADER_DATABASE" }, + "CamelCouchDbSeq": { "index": 1, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The couchdb changeset sequence number of the update \/ delete message", "constantName": "org.apache.camel.component.couchdb.CouchDbConstants#HEADER_SEQ" }, + "CamelCouchDbId": { "index": 2, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The couchdb document id", "constantName": "org.apache.camel.component.couchdb.CouchDbConstants#HEADER_DOC_ID" }, + "CamelCouchDbRev": { "index": 3, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The couchdb document revision", "constantName": "org.apache.camel.component.couchdb.CouchDbConstants#HEADER_DOC_REV" }, + "CamelCouchDbMethod": { "index": 4, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The method (delete \/ update)", "constantName": "org.apache.camel.component.couchdb.CouchDbConstants#HEADER_METHOD" }, "CamelCouchDbResumeAction": { "index": 5, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The resume action to execute when resuming.", "constantName": "org.apache.camel.component.couchdb.CouchDbConstants#COUCHDB_RESUME_ACTION" } }, "properties": { diff --git a/components/camel-couchdb/src/generated/resources/META-INF/org/apache/camel/component/couchdb/couchdb.json b/components/camel-couchdb/src/generated/resources/META-INF/org/apache/camel/component/couchdb/couchdb.json index 7743729d0aeea..3f5286c05ac31 100644 --- a/components/camel-couchdb/src/generated/resources/META-INF/org/apache/camel/component/couchdb/couchdb.json +++ b/components/camel-couchdb/src/generated/resources/META-INF/org/apache/camel/component/couchdb/couchdb.json @@ -29,11 +29,11 @@ "autowiredEnabled": { "index": 2, "kind": "property", "displayName": "Autowired Enabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching type, which then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc." } }, "headers": { - "CouchDbDatabase": { "index": 0, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The database the message came from", "constantName": "org.apache.camel.component.couchdb.CouchDbConstants#HEADER_DATABASE" }, - "CouchDbSeq": { "index": 1, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The couchdb changeset sequence number of the update \/ delete message", "constantName": "org.apache.camel.component.couchdb.CouchDbConstants#HEADER_SEQ" }, - "CouchDbId": { "index": 2, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The couchdb document id", "constantName": "org.apache.camel.component.couchdb.CouchDbConstants#HEADER_DOC_ID" }, - "CouchDbRev": { "index": 3, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The couchdb document revision", "constantName": "org.apache.camel.component.couchdb.CouchDbConstants#HEADER_DOC_REV" }, - "CouchDbMethod": { "index": 4, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The method (delete \/ update)", "constantName": "org.apache.camel.component.couchdb.CouchDbConstants#HEADER_METHOD" }, + "CamelCouchDbDatabase": { "index": 0, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The database the message came from", "constantName": "org.apache.camel.component.couchdb.CouchDbConstants#HEADER_DATABASE" }, + "CamelCouchDbSeq": { "index": 1, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The couchdb changeset sequence number of the update \/ delete message", "constantName": "org.apache.camel.component.couchdb.CouchDbConstants#HEADER_SEQ" }, + "CamelCouchDbId": { "index": 2, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The couchdb document id", "constantName": "org.apache.camel.component.couchdb.CouchDbConstants#HEADER_DOC_ID" }, + "CamelCouchDbRev": { "index": 3, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The couchdb document revision", "constantName": "org.apache.camel.component.couchdb.CouchDbConstants#HEADER_DOC_REV" }, + "CamelCouchDbMethod": { "index": 4, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The method (delete \/ update)", "constantName": "org.apache.camel.component.couchdb.CouchDbConstants#HEADER_METHOD" }, "CamelCouchDbResumeAction": { "index": 5, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The resume action to execute when resuming.", "constantName": "org.apache.camel.component.couchdb.CouchDbConstants#COUCHDB_RESUME_ACTION" } }, "properties": { diff --git a/components/camel-couchdb/src/main/docs/couchdb-component.adoc b/components/camel-couchdb/src/main/docs/couchdb-component.adoc index 1de9121f59e37..e1a99f36e78b0 100644 --- a/components/camel-couchdb/src/main/docs/couchdb-component.adoc +++ b/components/camel-couchdb/src/main/docs/couchdb-component.adoc @@ -21,8 +21,8 @@ has the following features: * As a consumer, monitors couch changesets for inserts, updates and deletes and publishes these as messages into camel routes. -* As a producer, can save, update, delete (by using `CouchDbMethod` with `DELETE` value) -documents and get documents by id (by using `CouchDbMethod` with GET value) into CouchDB. +* As a producer, can save, update, delete (by using `CamelCouchDbMethod` with `DELETE` value) +documents and get documents by id (by using `CamelCouchDbMethod` with GET value) into CouchDB. * Can support as many endpoints as required, eg for multiple databases across multiple instances. * Ability to have events trigger for only deletes, only inserts/updates @@ -67,7 +67,7 @@ include::partial$component-endpoint-headers.adoc[] Headers are set by the consumer once the message is received. The producer will also set the headers for downstream processors once the insert/update has taken place. Any headers set prior to the producer are -ignored. That means, for example, if you set CouchDbId as a header, it +ignored. That means, for example, if you set CamelCouchDbId as a header, it will not be used as the id for insertion, the id of the document will still be used. diff --git a/components/camel-couchdb/src/main/java/org/apache/camel/component/couchdb/CouchDbConstants.java b/components/camel-couchdb/src/main/java/org/apache/camel/component/couchdb/CouchDbConstants.java index c85763fae0563..0e55a69a45314 100644 --- a/components/camel-couchdb/src/main/java/org/apache/camel/component/couchdb/CouchDbConstants.java +++ b/components/camel-couchdb/src/main/java/org/apache/camel/component/couchdb/CouchDbConstants.java @@ -24,16 +24,16 @@ public interface CouchDbConstants { @Metadata(label = "consumer", description = "The database the message came from", javaType = "String") - String HEADER_DATABASE = "CouchDbDatabase"; + String HEADER_DATABASE = "CamelCouchDbDatabase"; @Metadata(label = "consumer", description = "The couchdb changeset sequence number of the update / delete message", javaType = "String") - String HEADER_SEQ = "CouchDbSeq"; + String HEADER_SEQ = "CamelCouchDbSeq"; @Metadata(description = "The couchdb document id", javaType = "String") - String HEADER_DOC_ID = "CouchDbId"; + String HEADER_DOC_ID = "CamelCouchDbId"; @Metadata(description = "The couchdb document revision", javaType = "String") - String HEADER_DOC_REV = "CouchDbRev"; + String HEADER_DOC_REV = "CamelCouchDbRev"; @Metadata(description = "The method (delete / update)", javaType = "String") - String HEADER_METHOD = "CouchDbMethod"; + String HEADER_METHOD = "CamelCouchDbMethod"; @Metadata(label = "consumer", description = "The resume action to execute when resuming.", javaType = "String") String COUCHDB_RESUME_ACTION = "CamelCouchDbResumeAction"; diff --git a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_21.adoc b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_21.adoc index c6450eb88e9a3..c49f1b9703681 100644 --- a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_21.adoc +++ b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_21.adoc @@ -390,6 +390,46 @@ have been renamed accordingly: * `qUERY()` -> `luceneQuery()` * `returnLuceneDocs()` -> `luceneReturnLuceneDocs()` +=== camel-couchdb + +The Exchange header values exposed by `CouchDbConstants` have been renamed to follow the standard +Camel naming convention. The field names are unchanged, so routes referencing the constants +(e.g. `CouchDbConstants.HEADER_METHOD`, `CouchDbConstants.HEADER_DOC_ID`) continue to work +without modification. However, routes that set or read these headers using the raw string values +must be updated: + +* `CouchDbDatabase` -> `CamelCouchDbDatabase` +* `CouchDbSeq` -> `CamelCouchDbSeq` +* `CouchDbId` -> `CamelCouchDbId` +* `CouchDbRev` -> `CamelCouchDbRev` +* `CouchDbMethod` -> `CamelCouchDbMethod` + +The generated Endpoint DSL header accessors on `CouchDbHeaderNameBuilder` retain the same method names +but now return the updated `CamelCouchDb*` values. No code changes are needed if you use these accessors. + +=== camel-couchbase + +The Exchange header values exposed by `CouchbaseConstants` have been renamed to follow the standard +Camel naming convention. The field names are unchanged, so routes referencing the constants +(e.g. `CouchbaseConstants.HEADER_ID`, `CouchbaseConstants.HEADER_TTL`) continue to work +without modification. However, routes that set or read these headers using the raw string values +must be updated: + +* `CCB_KEY` -> `CamelCouchbaseKey` +* `CCB_ID` -> `CamelCouchbaseId` +* `CCB_TTL` -> `CamelCouchbaseTtl` +* `CCB_DDN` -> `CamelCouchbaseDesignDocumentName` +* `CCB_VN` -> `CamelCouchbaseViewName` + +As a consequence, the generated Endpoint DSL header accessors on `CouchbaseHeaderNameBuilder` +have been renamed accordingly: + +* `ccbKey()` -> `couchbaseKey()` +* `ccbId()` -> `couchbaseId()` +* `ccbTtl()` -> `couchbaseTtl()` +* `ccbDdn()` -> `couchbaseDesignDocumentName()` +* `ccbVn()` -> `couchbaseViewName()` + === camel-jgroups-raft The Exchange header constants in `JGroupsRaftConstants` have been renamed to diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/CouchDbEndpointBuilderFactory.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/CouchDbEndpointBuilderFactory.java index 8d68ecdab61f5..352dc45001006 100644 --- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/CouchDbEndpointBuilderFactory.java +++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/CouchDbEndpointBuilderFactory.java @@ -690,7 +690,7 @@ public static class CouchDbHeaderNameBuilder { * @return the name of the header {@code CouchDbDatabase}. */ public String couchDbDatabase() { - return "CouchDbDatabase"; + return "CamelCouchDbDatabase"; } /** * The couchdb changeset sequence number of the update / delete message. @@ -702,7 +702,7 @@ public String couchDbDatabase() { * @return the name of the header {@code CouchDbSeq}. */ public String couchDbSeq() { - return "CouchDbSeq"; + return "CamelCouchDbSeq"; } /** * The couchdb document id. @@ -714,7 +714,7 @@ public String couchDbSeq() { * @return the name of the header {@code CouchDbId}. */ public String couchDbId() { - return "CouchDbId"; + return "CamelCouchDbId"; } /** * The couchdb document revision. @@ -726,7 +726,7 @@ public String couchDbId() { * @return the name of the header {@code CouchDbRev}. */ public String couchDbRev() { - return "CouchDbRev"; + return "CamelCouchDbRev"; } /** * The method (delete / update). @@ -738,7 +738,7 @@ public String couchDbRev() { * @return the name of the header {@code CouchDbMethod}. */ public String couchDbMethod() { - return "CouchDbMethod"; + return "CamelCouchDbMethod"; } /** * The resume action to execute when resuming. From 1fa47d7323078e0209b00fd30df4b7ff97228f6b Mon Sep 17 00:00:00 2001 From: Croway Date: Thu, 14 May 2026 17:47:04 +0200 Subject: [PATCH 2/2] chore: camel-couchbase - align Exchange header constant values with Camel naming convention Rename the values of CouchbaseConstants headers (CCB_KEY, CCB_ID, CCB_TTL, CCB_DDN, CCB_VN) to follow the standard CamelCouchbase* naming convention so that HttpHeaderFilterStrategy blocks them on inbound HTTP requests. The constant field names are unchanged, so routes referencing the constants continue to work as-is. --- .../camel/catalog/components/couchbase.json | 10 +++---- .../camel/component/couchbase/couchbase.json | 10 +++---- .../couchbase/CouchbaseConstants.java | 10 +++---- .../couchbase/CouchbaseProducerTest.java | 2 +- .../dsl/CouchbaseEndpointBuilderFactory.java | 30 +++++++++---------- 5 files changed, 31 insertions(+), 31 deletions(-) diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/couchbase.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/couchbase.json index af175b3de2c2c..aec979c32cf5f 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/couchbase.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/couchbase.json @@ -31,11 +31,11 @@ "healthCheckProducerEnabled": { "index": 4, "kind": "property", "displayName": "Health Check Producer Enabled", "group": "health", "label": "health", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Used for enabling or disabling all producer based health checks from this component. Notice: Camel has by default disabled all producer based health-checks. You can turn on producer checks globally by setting camel.health.producersEnabled=true." } }, "headers": { - "CCB_KEY": { "index": 0, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The key", "constantName": "org.apache.camel.component.couchbase.CouchbaseConstants#HEADER_KEY" }, - "CCB_ID": { "index": 1, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The document id", "constantName": "org.apache.camel.component.couchbase.CouchbaseConstants#HEADER_ID" }, - "CCB_TTL": { "index": 2, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The expiry for the document in seconds", "constantName": "org.apache.camel.component.couchbase.CouchbaseConstants#HEADER_TTL" }, - "CCB_DDN": { "index": 3, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The design document name", "constantName": "org.apache.camel.component.couchbase.CouchbaseConstants#HEADER_DESIGN_DOCUMENT_NAME" }, - "CCB_VN": { "index": 4, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The view name", "constantName": "org.apache.camel.component.couchbase.CouchbaseConstants#HEADER_VIEWNAME" }, + "CamelCouchbaseKey": { "index": 0, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The key", "constantName": "org.apache.camel.component.couchbase.CouchbaseConstants#HEADER_KEY" }, + "CamelCouchbaseId": { "index": 1, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The document id", "constantName": "org.apache.camel.component.couchbase.CouchbaseConstants#HEADER_ID" }, + "CamelCouchbaseTtl": { "index": 2, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The expiry for the document in seconds", "constantName": "org.apache.camel.component.couchbase.CouchbaseConstants#HEADER_TTL" }, + "CamelCouchbaseDesignDocumentName": { "index": 3, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The design document name", "constantName": "org.apache.camel.component.couchbase.CouchbaseConstants#HEADER_DESIGN_DOCUMENT_NAME" }, + "CamelCouchbaseViewName": { "index": 4, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The view name", "constantName": "org.apache.camel.component.couchbase.CouchbaseConstants#HEADER_VIEWNAME" }, "CamelCqlResumeQuery": { "index": 5, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The resume action to execute when resuming.", "constantName": "org.apache.camel.component.couchbase.CouchbaseConstants#COUCHBASE_RESUME_ACTION" } }, "properties": { diff --git a/components/camel-couchbase/src/generated/resources/META-INF/org/apache/camel/component/couchbase/couchbase.json b/components/camel-couchbase/src/generated/resources/META-INF/org/apache/camel/component/couchbase/couchbase.json index af175b3de2c2c..aec979c32cf5f 100644 --- a/components/camel-couchbase/src/generated/resources/META-INF/org/apache/camel/component/couchbase/couchbase.json +++ b/components/camel-couchbase/src/generated/resources/META-INF/org/apache/camel/component/couchbase/couchbase.json @@ -31,11 +31,11 @@ "healthCheckProducerEnabled": { "index": 4, "kind": "property", "displayName": "Health Check Producer Enabled", "group": "health", "label": "health", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Used for enabling or disabling all producer based health checks from this component. Notice: Camel has by default disabled all producer based health-checks. You can turn on producer checks globally by setting camel.health.producersEnabled=true." } }, "headers": { - "CCB_KEY": { "index": 0, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The key", "constantName": "org.apache.camel.component.couchbase.CouchbaseConstants#HEADER_KEY" }, - "CCB_ID": { "index": 1, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The document id", "constantName": "org.apache.camel.component.couchbase.CouchbaseConstants#HEADER_ID" }, - "CCB_TTL": { "index": 2, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The expiry for the document in seconds", "constantName": "org.apache.camel.component.couchbase.CouchbaseConstants#HEADER_TTL" }, - "CCB_DDN": { "index": 3, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The design document name", "constantName": "org.apache.camel.component.couchbase.CouchbaseConstants#HEADER_DESIGN_DOCUMENT_NAME" }, - "CCB_VN": { "index": 4, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The view name", "constantName": "org.apache.camel.component.couchbase.CouchbaseConstants#HEADER_VIEWNAME" }, + "CamelCouchbaseKey": { "index": 0, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The key", "constantName": "org.apache.camel.component.couchbase.CouchbaseConstants#HEADER_KEY" }, + "CamelCouchbaseId": { "index": 1, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The document id", "constantName": "org.apache.camel.component.couchbase.CouchbaseConstants#HEADER_ID" }, + "CamelCouchbaseTtl": { "index": 2, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The expiry for the document in seconds", "constantName": "org.apache.camel.component.couchbase.CouchbaseConstants#HEADER_TTL" }, + "CamelCouchbaseDesignDocumentName": { "index": 3, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The design document name", "constantName": "org.apache.camel.component.couchbase.CouchbaseConstants#HEADER_DESIGN_DOCUMENT_NAME" }, + "CamelCouchbaseViewName": { "index": 4, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The view name", "constantName": "org.apache.camel.component.couchbase.CouchbaseConstants#HEADER_VIEWNAME" }, "CamelCqlResumeQuery": { "index": 5, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The resume action to execute when resuming.", "constantName": "org.apache.camel.component.couchbase.CouchbaseConstants#COUCHBASE_RESUME_ACTION" } }, "properties": { diff --git a/components/camel-couchbase/src/main/java/org/apache/camel/component/couchbase/CouchbaseConstants.java b/components/camel-couchbase/src/main/java/org/apache/camel/component/couchbase/CouchbaseConstants.java index ad1ec3ad3f146..366ba4cd0233c 100644 --- a/components/camel-couchbase/src/main/java/org/apache/camel/component/couchbase/CouchbaseConstants.java +++ b/components/camel-couchbase/src/main/java/org/apache/camel/component/couchbase/CouchbaseConstants.java @@ -32,15 +32,15 @@ public interface CouchbaseConstants { String DEFAULT_DESIGN_DOCUMENT_NAME = "beer"; String DEFAULT_VIEWNAME = "brewery_beers"; @Metadata(label = "consumer", description = "The key", javaType = "String") - String HEADER_KEY = "CCB_KEY"; + String HEADER_KEY = "CamelCouchbaseKey"; @Metadata(description = "The document id", javaType = "String") - String HEADER_ID = "CCB_ID"; + String HEADER_ID = "CamelCouchbaseId"; @Metadata(label = "producer", description = "The expiry for the document in seconds", javaType = "String") - String HEADER_TTL = "CCB_TTL"; + String HEADER_TTL = "CamelCouchbaseTtl"; @Metadata(label = "consumer", description = "The design document name", javaType = "String") - String HEADER_DESIGN_DOCUMENT_NAME = "CCB_DDN"; + String HEADER_DESIGN_DOCUMENT_NAME = "CamelCouchbaseDesignDocumentName"; @Metadata(label = "consumer", description = "The view name", javaType = "String") - String HEADER_VIEWNAME = "CCB_VN"; + String HEADER_VIEWNAME = "CamelCouchbaseViewName"; @Metadata(label = "consumer", description = "The resume action to execute when resuming.", javaType = "String") String COUCHBASE_RESUME_ACTION = "CamelCqlResumeQuery"; diff --git a/components/camel-couchbase/src/test/java/org/apache/camel/component/couchbase/CouchbaseProducerTest.java b/components/camel-couchbase/src/test/java/org/apache/camel/component/couchbase/CouchbaseProducerTest.java index bbb7ea1f1f732..10c36953751b5 100644 --- a/components/camel-couchbase/src/test/java/org/apache/camel/component/couchbase/CouchbaseProducerTest.java +++ b/components/camel-couchbase/src/test/java/org/apache/camel/component/couchbase/CouchbaseProducerTest.java @@ -126,7 +126,7 @@ public void testExpiryTimeIsSet() throws Exception { // Mock out some headers so we can set an expiry int expiry = 5000; Map testHeaders = new HashMap<>(); - testHeaders.put("CCB_TTL", Integer.toString(expiry)); + testHeaders.put(HEADER_TTL, Integer.toString(expiry)); when(msg.getHeaders()).thenReturn(testHeaders); when(collection.upsert(anyString(), any(), any())).thenReturn(response); when(msg.getHeader(HEADER_TTL, String.class)).thenReturn(Integer.toString(expiry)); diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/CouchbaseEndpointBuilderFactory.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/CouchbaseEndpointBuilderFactory.java index 6f14804ab3c42..d629d213a3b90 100644 --- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/CouchbaseEndpointBuilderFactory.java +++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/CouchbaseEndpointBuilderFactory.java @@ -1895,10 +1895,10 @@ public static class CouchbaseHeaderNameBuilder { * * Group: consumer * - * @return the name of the header {@code CCB_KEY}. + * @return the name of the header {@code CouchbaseKey}. */ - public String ccbKey() { - return "CCB_KEY"; + public String couchbaseKey() { + return "CamelCouchbaseKey"; } /** * The document id. @@ -1907,10 +1907,10 @@ public String ccbKey() { * * Group: common * - * @return the name of the header {@code CCB_ID}. + * @return the name of the header {@code CouchbaseId}. */ - public String ccbId() { - return "CCB_ID"; + public String couchbaseId() { + return "CamelCouchbaseId"; } /** * The expiry for the document in seconds. @@ -1919,10 +1919,10 @@ public String ccbId() { * * Group: producer * - * @return the name of the header {@code CCB_TTL}. + * @return the name of the header {@code CouchbaseTtl}. */ - public String ccbTtl() { - return "CCB_TTL"; + public String couchbaseTtl() { + return "CamelCouchbaseTtl"; } /** * The design document name. @@ -1931,10 +1931,10 @@ public String ccbTtl() { * * Group: consumer * - * @return the name of the header {@code CCB_DDN}. + * @return the name of the header {@code CouchbaseDesignDocumentName}. */ - public String ccbDdn() { - return "CCB_DDN"; + public String couchbaseDesignDocumentName() { + return "CamelCouchbaseDesignDocumentName"; } /** * The view name. @@ -1943,10 +1943,10 @@ public String ccbDdn() { * * Group: consumer * - * @return the name of the header {@code CCB_VN}. + * @return the name of the header {@code CouchbaseViewName}. */ - public String ccbVn() { - return "CCB_VN"; + public String couchbaseViewName() { + return "CamelCouchbaseViewName"; } /** * The resume action to execute when resuming.