You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2023/03/30 06:14:51 UTC
[camel] 03/04: CAMEL-19222 - Camel-Azure-CosmosDB: make the itemPartitionKey a String instead of a pojo
This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
commit 0e48c691cbf6a6f54dcdefa69e96d193c0642654
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Thu Mar 30 08:11:08 2023 +0200
CAMEL-19222 - Camel-Azure-CosmosDB: make the itemPartitionKey a String instead of a pojo
Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
.../camel/catalog/components/azure-cosmosdb.json | 4 ++--
.../org/apache/camel/catalog/others.properties | 1 -
.../apache/camel/catalog/others/componentdsl.json | 15 ---------------
.../dsl/AzureCosmosdbComponentBuilderFactory.java | 7 +++----
.../dsl/CosmosDbEndpointBuilderFactory.java | 21 +--------------------
5 files changed, 6 insertions(+), 42 deletions(-)
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/azure-cosmosdb.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/azure-cosmosdb.json
index fab4ba1d705..b74358b0755 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/azure-cosmosdb.json
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/azure-cosmosdb.json
@@ -44,7 +44,7 @@
"leaseContainerName": { "kind": "property", "displayName": "Lease Container Name", "group": "consumer", "label": "consumer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "camel-lease", "configurationClass": "org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration", "configurationField": "configuration", "description": "Sets the lease container which acts as a state storage and co [...]
"leaseDatabaseName": { "kind": "property", "displayName": "Lease Database Name", "group": "consumer", "label": "consumer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration", "configurationField": "configuration", "description": "Sets the lease database where the leaseContainerName will be stored. If it is not specified, t [...]
"itemId": { "kind": "property", "displayName": "Item Id", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration", "configurationField": "configuration", "description": "Sets the itemId in case needed for operation on item like delete, replace" },
- "itemPartitionKey": { "kind": "property", "displayName": "Item Partition Key", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "com.azure.cosmos.models.PartitionKey", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration", "configurationField": "configuration", "description": "Sets partition key. Represents a partition key value in the Azure Cosmos DB [...]
+ "itemPartitionKey": { "kind": "property", "displayName": "Item Partition Key", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration", "configurationField": "configuration", "description": "Sets partition key. Represents a partition key value in the Azure Cosmos DB database service. A [...]
"lazyStartProducer": { "kind": "property", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "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 producer may otherwise fail during star [...]
"operation": { "kind": "property", "displayName": "Operation", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "org.apache.camel.component.azure.cosmosdb.CosmosDbOperationsDefinition", "enum": [ "listDatabases", "createDatabase", "queryDatabases", "deleteDatabase", "createContainer", "replaceDatabaseThroughput", "listContainers", "queryContainers", "deleteContainer", "replaceContainerThroughput", "createItem", "upsertItem", "deleteItem", "re [...]
"query": { "kind": "property", "displayName": "Query", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration", "configurationField": "configuration", "description": "An SQL query to execute on a given resources. To learn more about Cosmos SQL API, check this link {link https:\/\/docs.m [...]
@@ -78,7 +78,7 @@
"exceptionHandler": { "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 default the con [...]
"exchangePattern": { "kind": "parameter", "displayName": "Exchange Pattern", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "object", "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." },
"itemId": { "kind": "parameter", "displayName": "Item Id", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration", "configurationField": "configuration", "description": "Sets the itemId in case needed for operation on item like delete, replace" },
- "itemPartitionKey": { "kind": "parameter", "displayName": "Item Partition Key", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "com.azure.cosmos.models.PartitionKey", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration", "configurationField": "configuration", "description": "Sets partition key. Represents a partition key value in the Azure Cosmos DB [...]
+ "itemPartitionKey": { "kind": "parameter", "displayName": "Item Partition Key", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration", "configurationField": "configuration", "description": "Sets partition key. Represents a partition key value in the Azure Cosmos DB database service. A [...]
"operation": { "kind": "parameter", "displayName": "Operation", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "org.apache.camel.component.azure.cosmosdb.CosmosDbOperationsDefinition", "enum": [ "listDatabases", "createDatabase", "queryDatabases", "deleteDatabase", "createContainer", "replaceDatabaseThroughput", "listContainers", "queryContainers", "deleteContainer", "replaceContainerThroughput", "createItem", "upsertItem", "deleteItem", "r [...]
"query": { "kind": "parameter", "displayName": "Query", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration", "configurationField": "configuration", "description": "An SQL query to execute on a given resources. To learn more about Cosmos SQL API, check this link {link https:\/\/docs. [...]
"queryRequestOptions": { "kind": "parameter", "displayName": "Query Request Options", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "com.azure.cosmos.models.CosmosQueryRequestOptions", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.cosmosdb.CosmosDbConfiguration", "configurationField": "configuration", "description": "Set additional QueryRequestOptions that can be used with [...]
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/others.properties b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/others.properties
index ae3a8d69eeb..2377361ba4b 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/others.properties
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/others.properties
@@ -4,7 +4,6 @@ cli-connector
cloud
cloudevents
cluster
-componentdsl
console
csimple-joor
debug
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/others/componentdsl.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/others/componentdsl.json
deleted file mode 100644
index 3799e772735..00000000000
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/others/componentdsl.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "other": {
- "kind": "other",
- "name": "componentdsl",
- "title": "Java Component DSL",
- "description": "The Camel Component DSL",
- "deprecated": false,
- "firstVersion": "3.1.0",
- "label": "dsl",
- "supportLevel": "Stable",
- "groupId": "org.apache.camel",
- "artifactId": "camel-componentdsl",
- "version": "4.0.0-SNAPSHOT"
- }
-}
diff --git a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/AzureCosmosdbComponentBuilderFactory.java b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/AzureCosmosdbComponentBuilderFactory.java
index ea66bd5e8ff..91dd095e3b2 100644
--- a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/AzureCosmosdbComponentBuilderFactory.java
+++ b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/AzureCosmosdbComponentBuilderFactory.java
@@ -472,8 +472,7 @@ public interface AzureCosmosdbComponentBuilderFactory {
* Cosmos DB database service. A partition key identifies the partition
* where the item is stored in.
*
- * The option is a:
- * <code>com.azure.cosmos.models.PartitionKey</code> type.
+ * The option is a: <code>java.lang.String</code> type.
*
* Group: producer
*
@@ -481,7 +480,7 @@ public interface AzureCosmosdbComponentBuilderFactory {
* @return the dsl builder
*/
default AzureCosmosdbComponentBuilder itemPartitionKey(
- com.azure.cosmos.models.PartitionKey itemPartitionKey) {
+ java.lang.String itemPartitionKey) {
doSetProperty("itemPartitionKey", itemPartitionKey);
return this;
}
@@ -644,7 +643,7 @@ public interface AzureCosmosdbComponentBuilderFactory {
case "leaseContainerName": getOrCreateConfiguration((CosmosDbComponent) component).setLeaseContainerName((java.lang.String) value); return true;
case "leaseDatabaseName": getOrCreateConfiguration((CosmosDbComponent) component).setLeaseDatabaseName((java.lang.String) value); return true;
case "itemId": getOrCreateConfiguration((CosmosDbComponent) component).setItemId((java.lang.String) value); return true;
- case "itemPartitionKey": getOrCreateConfiguration((CosmosDbComponent) component).setItemPartitionKey((com.azure.cosmos.models.PartitionKey) value); return true;
+ case "itemPartitionKey": getOrCreateConfiguration((CosmosDbComponent) component).setItemPartitionKey((java.lang.String) value); return true;
case "lazyStartProducer": ((CosmosDbComponent) component).setLazyStartProducer((boolean) value); return true;
case "operation": getOrCreateConfiguration((CosmosDbComponent) component).setOperation((org.apache.camel.component.azure.cosmosdb.CosmosDbOperationsDefinition) value); return true;
case "query": getOrCreateConfiguration((CosmosDbComponent) component).setQuery((java.lang.String) value); return true;
diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/CosmosDbEndpointBuilderFactory.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/CosmosDbEndpointBuilderFactory.java
index 9eea8b09ec8..7d4ac81b1a2 100644
--- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/CosmosDbEndpointBuilderFactory.java
+++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/CosmosDbEndpointBuilderFactory.java
@@ -1310,26 +1310,7 @@ public interface CosmosDbEndpointBuilderFactory {
* Cosmos DB database service. A partition key identifies the partition
* where the item is stored in.
*
- * The option is a:
- * <code>com.azure.cosmos.models.PartitionKey</code> type.
- *
- * Group: producer
- *
- * @param itemPartitionKey the value to set
- * @return the dsl builder
- */
- default CosmosDbEndpointProducerBuilder itemPartitionKey(
- com.azure.cosmos.models.PartitionKey itemPartitionKey) {
- doSetProperty("itemPartitionKey", itemPartitionKey);
- return this;
- }
- /**
- * Sets partition key. Represents a partition key value in the Azure
- * Cosmos DB database service. A partition key identifies the partition
- * where the item is stored in.
- *
- * The option will be converted to a
- * <code>com.azure.cosmos.models.PartitionKey</code> type.
+ * The option is a: <code>java.lang.String</code> type.
*
* Group: producer
*