This is an automated email from the ASF dual-hosted git repository. github-bot pushed a commit to branch camel-master in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
commit 074a7530b93bc1e5893eb0bf9a2dc4bb3adaf141 Author: James Netherton <jamesnether...@gmail.com> AuthorDate: Mon Sep 7 09:30:51 2020 +0100 Upgrade to Camel 3.6.0 --- .../reference/extensions/azure-storage-blob.adoc | 2 +- .../reference/extensions/azure-storage-queue.adoc | 2 +- .../ROOT/pages/reference/extensions/bindy.adoc | 4 +- .../ROOT/pages/reference/extensions/snakeyaml.adoc | 4 +- .../ROOT/partials/reference/components/atmos.adoc | 2 +- .../reference/components/aws2-eventbridge.adoc | 1 + .../partials/reference/components/vertx-http.adoc | 2 +- .../reference/components/vertx-websocket.adoc | 2 +- .../ROOT/partials/reference/dataformats/bindy.adoc | 2 +- .../reference/dataformats/json-fastjson.adoc | 2 +- .../partials/reference/dataformats/json-gson.adoc | 2 +- .../reference/dataformats/json-jackson.adoc | 2 +- .../reference/dataformats/json-johnzon.adoc | 2 +- .../reference/dataformats/json-xstream.adoc | 2 +- .../reference/dataformats/yaml-snakeyaml.adoc | 2 +- .../quarkus/core/deployment/CamelProcessor.java | 3 +- .../org/apache/camel/quarkus/core/BaseModel.java | 6 +++ .../camel/quarkus/core/FastCamelContext.java | 12 +++++ extensions-jvm/jbpm/deployment/pom.xml | 4 ++ extensions-jvm/jbpm/runtime/pom.xml | 12 +++-- extensions-jvm/workday/runtime/pom.xml | 11 ++++ extensions/jaxb/runtime/pom.xml | 6 +++ .../component/qute/QuteComponentConfigurer.java | 17 +++--- .../component/qute/QuteEndpointConfigurer.java | 24 +++++---- .../component/qute/QuteEndpointUriFactory.java | 60 ++++++++++++++++++++++ .../org/apache/camel/urifactory/qute-endpoint | 2 + .../org/apache/camel/component/qute/qute.json | 3 +- .../component/caffeine/it/CaffeineResource.java | 13 +---- pom.xml | 2 +- 29 files changed, 159 insertions(+), 49 deletions(-) diff --git a/docs/modules/ROOT/pages/reference/extensions/azure-storage-blob.adoc b/docs/modules/ROOT/pages/reference/extensions/azure-storage-blob.adoc index d91c34b..fef480e 100644 --- a/docs/modules/ROOT/pages/reference/extensions/azure-storage-blob.adoc +++ b/docs/modules/ROOT/pages/reference/extensions/azure-storage-blob.adoc @@ -16,7 +16,7 @@ Store and retrieve blobs from Azure Storage Blob Service using SDK v12. == What's inside -* https://camel.apache.org/components/latest/azure-storage-blob-component.html[Azure Storage Blob Service component], URI syntax: `azure-storage-blob:containerName` +* https://camel.apache.org/components/latest/azure-storage-blob-component.html[Azure Storage Blob Service component], URI syntax: `azure-storage-blob:accountName/containerName` Please refer to the above link for usage and configuration details. diff --git a/docs/modules/ROOT/pages/reference/extensions/azure-storage-queue.adoc b/docs/modules/ROOT/pages/reference/extensions/azure-storage-queue.adoc index 01fd0bf..a8a88b5 100644 --- a/docs/modules/ROOT/pages/reference/extensions/azure-storage-queue.adoc +++ b/docs/modules/ROOT/pages/reference/extensions/azure-storage-queue.adoc @@ -16,7 +16,7 @@ The azure-storage-queue component is used for storing and retrieving the message == What's inside -* https://camel.apache.org/components/latest/azure-storage-queue-component.html[Azure Storage Queue Service component], URI syntax: `azure-storage-queue:queueName` +* https://camel.apache.org/components/latest/azure-storage-queue-component.html[Azure Storage Queue Service component], URI syntax: `azure-storage-queue:accountName/queueName` Please refer to the above link for usage and configuration details. diff --git a/docs/modules/ROOT/pages/reference/extensions/bindy.adoc b/docs/modules/ROOT/pages/reference/extensions/bindy.adoc index a8fef69..dd3a7b5 100644 --- a/docs/modules/ROOT/pages/reference/extensions/bindy.adoc +++ b/docs/modules/ROOT/pages/reference/extensions/bindy.adoc @@ -5,7 +5,7 @@ :cq-artifact-id: camel-quarkus-bindy :cq-native-supported: true :cq-status: Stable -:cq-description: Marshal and unmarshal Java beans from and to flat payloads (such as CSV, delimited, fixed length formats, or FIX messages). +:cq-description: Marshal and unmarshal between POJOs and Comma separated values (CSV) format using Camel Bindy Marshal and unmarshal between POJOs and fixed field length format using Camel Bindy Marshal and unmarshal between POJOs and key-value pair (KVP) format using Camel Bindy :cq-deprecated: false :cq-jvm-since: 1.0.0 :cq-native-since: 1.0.0 @@ -13,7 +13,7 @@ [.badges] [.badge-key]##JVM since##[.badge-supported]##1.0.0## [.badge-key]##Native since##[.badge-supported]##1.0.0## -Marshal and unmarshal Java beans from and to flat payloads (such as CSV, delimited, fixed length formats, or FIX messages). +Marshal and unmarshal between POJOs and Comma separated values (CSV) format using Camel Bindy Marshal and unmarshal between POJOs and fixed field length format using Camel Bindy Marshal and unmarshal between POJOs and key-value pair (KVP) format using Camel Bindy == What's inside diff --git a/docs/modules/ROOT/pages/reference/extensions/snakeyaml.adoc b/docs/modules/ROOT/pages/reference/extensions/snakeyaml.adoc index deafe1e..f465e47 100644 --- a/docs/modules/ROOT/pages/reference/extensions/snakeyaml.adoc +++ b/docs/modules/ROOT/pages/reference/extensions/snakeyaml.adoc @@ -5,7 +5,7 @@ :cq-artifact-id: camel-quarkus-snakeyaml :cq-native-supported: true :cq-status: Stable -:cq-description: Marshal and unmarshal Java objects to and from YAML. +:cq-description: Marshal and unmarshal Java objects to and from YAML using SnakeYAML :cq-deprecated: false :cq-jvm-since: 0.4.0 :cq-native-since: 0.4.0 @@ -13,7 +13,7 @@ [.badges] [.badge-key]##JVM since##[.badge-supported]##0.4.0## [.badge-key]##Native since##[.badge-supported]##0.4.0## -Marshal and unmarshal Java objects to and from YAML. +Marshal and unmarshal Java objects to and from YAML using SnakeYAML == What's inside diff --git a/docs/modules/ROOT/partials/reference/components/atmos.adoc b/docs/modules/ROOT/partials/reference/components/atmos.adoc index 0fece9b..8031c1f 100644 --- a/docs/modules/ROOT/partials/reference/components/atmos.adoc +++ b/docs/modules/ROOT/partials/reference/components/atmos.adoc @@ -9,5 +9,5 @@ :cq-native-since: n/a :cq-camel-part-name: atmos :cq-camel-part-title: Atmos -:cq-camel-part-description: Integract with EMC's ViPR object data services using the Atmos Client. +:cq-camel-part-description: Integrate with EMC's ViPR object data services using the Atmos Client. :cq-extension-page-title: Atmos diff --git a/docs/modules/ROOT/partials/reference/components/aws2-eventbridge.adoc b/docs/modules/ROOT/partials/reference/components/aws2-eventbridge.adoc new file mode 100644 index 0000000..a509c1d --- /dev/null +++ b/docs/modules/ROOT/partials/reference/components/aws2-eventbridge.adoc @@ -0,0 +1 @@ +// Empty partial for a Camel bit unsupported by Camel Quarkus to avoid warnings when this file is included from a Camel page diff --git a/docs/modules/ROOT/partials/reference/components/vertx-http.adoc b/docs/modules/ROOT/partials/reference/components/vertx-http.adoc index 7d893ac..d0ed9a6 100644 --- a/docs/modules/ROOT/partials/reference/components/vertx-http.adoc +++ b/docs/modules/ROOT/partials/reference/components/vertx-http.adoc @@ -9,5 +9,5 @@ :cq-native-since: 1.1.0 :cq-camel-part-name: vertx-http :cq-camel-part-title: Vert.x HTTP Client -:cq-camel-part-description: Camel HTTP client support with Vert.x +:cq-camel-part-description: Send requests to external HTTP servers using Vert.x :cq-extension-page-title: Vert.x HTTP Client diff --git a/docs/modules/ROOT/partials/reference/components/vertx-websocket.adoc b/docs/modules/ROOT/partials/reference/components/vertx-websocket.adoc index 90416db..0703586 100644 --- a/docs/modules/ROOT/partials/reference/components/vertx-websocket.adoc +++ b/docs/modules/ROOT/partials/reference/components/vertx-websocket.adoc @@ -9,5 +9,5 @@ :cq-native-since: 1.1.0 :cq-camel-part-name: vertx-websocket :cq-camel-part-title: Vert.x WebSocket -:cq-camel-part-description: Camel WebSocket support with Vert.x +:cq-camel-part-description: Expose WebSocket endpoints and connect to remote WebSocket servers using Vert.x :cq-extension-page-title: Vert.x WebSocket diff --git a/docs/modules/ROOT/partials/reference/dataformats/bindy.adoc b/docs/modules/ROOT/partials/reference/dataformats/bindy.adoc index fd7c3a2..fdd6714 100644 --- a/docs/modules/ROOT/partials/reference/dataformats/bindy.adoc +++ b/docs/modules/ROOT/partials/reference/dataformats/bindy.adoc @@ -9,5 +9,5 @@ :cq-native-since: 1.0.0 :cq-camel-part-name: bindy-kvp :cq-camel-part-title: Bindy Key Value Pair -:cq-camel-part-description: Marshal and unmarshal Java beans from and to flat payloads (such as CSV, delimited, fixed length formats, or FIX messages). +:cq-camel-part-description: Marshal and unmarshal between POJOs and key-value pair (KVP) format using Camel Bindy :cq-extension-page-title: Bindy diff --git a/docs/modules/ROOT/partials/reference/dataformats/json-fastjson.adoc b/docs/modules/ROOT/partials/reference/dataformats/json-fastjson.adoc index 40fb920..0bd8ede 100644 --- a/docs/modules/ROOT/partials/reference/dataformats/json-fastjson.adoc +++ b/docs/modules/ROOT/partials/reference/dataformats/json-fastjson.adoc @@ -9,5 +9,5 @@ :cq-native-since: n/a :cq-camel-part-name: json-fastjson :cq-camel-part-title: JSON Fastjson -:cq-camel-part-description: Marshal POJOs to JSON and back. +:cq-camel-part-description: Marshal POJOs to JSON and back using Fastjson :cq-extension-page-title: JSON Fastjson diff --git a/docs/modules/ROOT/partials/reference/dataformats/json-gson.adoc b/docs/modules/ROOT/partials/reference/dataformats/json-gson.adoc index f915f4c..f598331 100644 --- a/docs/modules/ROOT/partials/reference/dataformats/json-gson.adoc +++ b/docs/modules/ROOT/partials/reference/dataformats/json-gson.adoc @@ -9,5 +9,5 @@ :cq-native-since: 1.0.0 :cq-camel-part-name: json-gson :cq-camel-part-title: JSON Gson -:cq-camel-part-description: Marshal POJOs to JSON and back. +:cq-camel-part-description: Marshal POJOs to JSON and back using Gson :cq-extension-page-title: Gson diff --git a/docs/modules/ROOT/partials/reference/dataformats/json-jackson.adoc b/docs/modules/ROOT/partials/reference/dataformats/json-jackson.adoc index 017c5e4..4d68616 100644 --- a/docs/modules/ROOT/partials/reference/dataformats/json-jackson.adoc +++ b/docs/modules/ROOT/partials/reference/dataformats/json-jackson.adoc @@ -9,5 +9,5 @@ :cq-native-since: 0.3.0 :cq-camel-part-name: json-jackson :cq-camel-part-title: JSON Jackson -:cq-camel-part-description: Marshal POJOs to JSON and back. +:cq-camel-part-description: Marshal POJOs to JSON and back using Jackson :cq-extension-page-title: Jackson diff --git a/docs/modules/ROOT/partials/reference/dataformats/json-johnzon.adoc b/docs/modules/ROOT/partials/reference/dataformats/json-johnzon.adoc index f9c3464..37396fc 100644 --- a/docs/modules/ROOT/partials/reference/dataformats/json-johnzon.adoc +++ b/docs/modules/ROOT/partials/reference/dataformats/json-johnzon.adoc @@ -9,5 +9,5 @@ :cq-native-since: 1.0.0 :cq-camel-part-name: json-johnzon :cq-camel-part-title: JSON Johnzon -:cq-camel-part-description: Marshal POJOs to JSON and back. +:cq-camel-part-description: Marshal POJOs to JSON and back using Johnzon :cq-extension-page-title: Johnzon diff --git a/docs/modules/ROOT/partials/reference/dataformats/json-xstream.adoc b/docs/modules/ROOT/partials/reference/dataformats/json-xstream.adoc index f9b01be..369a16f 100644 --- a/docs/modules/ROOT/partials/reference/dataformats/json-xstream.adoc +++ b/docs/modules/ROOT/partials/reference/dataformats/json-xstream.adoc @@ -9,5 +9,5 @@ :cq-native-since: 1.0.0 :cq-camel-part-name: json-xstream :cq-camel-part-title: JSON XStream -:cq-camel-part-description: Marshal POJOs to JSON and back. +:cq-camel-part-description: Marshal POJOs to JSON and back using XStream :cq-extension-page-title: XStream diff --git a/docs/modules/ROOT/partials/reference/dataformats/yaml-snakeyaml.adoc b/docs/modules/ROOT/partials/reference/dataformats/yaml-snakeyaml.adoc index 45d4761..559f6ef 100644 --- a/docs/modules/ROOT/partials/reference/dataformats/yaml-snakeyaml.adoc +++ b/docs/modules/ROOT/partials/reference/dataformats/yaml-snakeyaml.adoc @@ -9,5 +9,5 @@ :cq-native-since: 0.4.0 :cq-camel-part-name: yaml-snakeyaml :cq-camel-part-title: YAML SnakeYAML -:cq-camel-part-description: Marshal and unmarshal Java objects to and from YAML. +:cq-camel-part-description: Marshal and unmarshal Java objects to and from YAML using SnakeYAML :cq-extension-page-title: SnakeYAML diff --git a/extensions-core/core/deployment/src/main/java/org/apache/camel/quarkus/core/deployment/CamelProcessor.java b/extensions-core/core/deployment/src/main/java/org/apache/camel/quarkus/core/deployment/CamelProcessor.java index 5d4bb2f..4800f8f 100644 --- a/extensions-core/core/deployment/src/main/java/org/apache/camel/quarkus/core/deployment/CamelProcessor.java +++ b/extensions-core/core/deployment/src/main/java/org/apache/camel/quarkus/core/deployment/CamelProcessor.java @@ -154,7 +154,8 @@ class CamelProcessor { "META-INF/services/org/apache/camel/configurer/*", "META-INF/services/org/apache/camel/language/*", "META-INF/services/org/apache/camel/dataformat/*", - "META-INF/services/org/apache/camel/send-dynamic/*")); + "META-INF/services/org/apache/camel/send-dynamic/*", + "META-INF/services/org/apache/camel/urifactory/*")); } @BuildStep diff --git a/extensions-core/core/runtime/src/main/java/org/apache/camel/quarkus/core/BaseModel.java b/extensions-core/core/runtime/src/main/java/org/apache/camel/quarkus/core/BaseModel.java index 636f6cc..3facae2 100644 --- a/extensions-core/core/runtime/src/main/java/org/apache/camel/quarkus/core/BaseModel.java +++ b/extensions-core/core/runtime/src/main/java/org/apache/camel/quarkus/core/BaseModel.java @@ -37,6 +37,7 @@ public abstract class BaseModel implements Model { private final List<RouteDefinition> routeDefinitions = new ArrayList<>(); private final List<RouteTemplateDefinition> routeTemplateDefinitions = new ArrayList<>(); private final List<RestDefinition> restDefinitions = new ArrayList<>(); + private final Map<String, RouteTemplateDefinition.Converter> routeTemplateConverters = new ConcurrentHashMap<>(); private Map<String, DataFormatDefinition> dataFormats = new HashMap<>(); private List<TransformerDefinition> transformers = new ArrayList<>(); private List<ValidatorDefinition> validators = new ArrayList<>(); @@ -154,6 +155,11 @@ public abstract class BaseModel implements Model { } @Override + public void addRouteTemplateDefinitionConverter(String templateIdPattern, RouteTemplateDefinition.Converter converter) { + routeTemplateConverters.put(templateIdPattern, converter); + } + + @Override public String addRouteFromTemplate(String routeId, String routeTemplateId, Map<String, Object> parameters) throws Exception { RouteTemplateDefinition target = null; diff --git a/extensions-core/core/runtime/src/main/java/org/apache/camel/quarkus/core/FastCamelContext.java b/extensions-core/core/runtime/src/main/java/org/apache/camel/quarkus/core/FastCamelContext.java index 4292ad0..4ca613e 100644 --- a/extensions-core/core/runtime/src/main/java/org/apache/camel/quarkus/core/FastCamelContext.java +++ b/extensions-core/core/runtime/src/main/java/org/apache/camel/quarkus/core/FastCamelContext.java @@ -69,6 +69,7 @@ import org.apache.camel.impl.engine.DefaultStreamCachingStrategy; import org.apache.camel.impl.engine.DefaultTracer; import org.apache.camel.impl.engine.DefaultTransformerRegistry; import org.apache.camel.impl.engine.DefaultUnitOfWorkFactory; +import org.apache.camel.impl.engine.DefaultUriFactoryResolver; import org.apache.camel.impl.engine.DefaultValidatorRegistry; import org.apache.camel.impl.engine.EndpointKey; import org.apache.camel.impl.engine.RouteService; @@ -138,6 +139,7 @@ import org.apache.camel.spi.Transformer; import org.apache.camel.spi.TransformerRegistry; import org.apache.camel.spi.TypeConverterRegistry; import org.apache.camel.spi.UnitOfWorkFactory; +import org.apache.camel.spi.UriFactoryResolver; import org.apache.camel.spi.UuidGenerator; import org.apache.camel.spi.Validator; import org.apache.camel.spi.ValidatorRegistry; @@ -436,6 +438,11 @@ public class FastCamelContext extends AbstractCamelContext implements CatalogCam } @Override + protected UriFactoryResolver createUriFactoryResolver() { + return new DefaultUriFactoryResolver(); + } + + @Override protected HealthCheckRegistry createHealthCheckRegistry() { return new BaseServiceResolver<>(HealthCheckRegistry.FACTORY, HealthCheckRegistry.class) .resolve(getCamelContextReference()).orElse(null); @@ -642,6 +649,11 @@ public class FastCamelContext extends AbstractCamelContext implements CatalogCam } @Override + public void addRouteTemplateDefinitionConverter(String templateIdPattern, RouteTemplateDefinition.Converter converter) { + model.addRouteTemplateDefinitionConverter(templateIdPattern, converter); + } + + @Override public List<RestDefinition> getRestDefinitions() { return model.getRestDefinitions(); } diff --git a/extensions-jvm/jbpm/deployment/pom.xml b/extensions-jvm/jbpm/deployment/pom.xml index 84a74e5..3ed5e90 100644 --- a/extensions-jvm/jbpm/deployment/pom.xml +++ b/extensions-jvm/jbpm/deployment/pom.xml @@ -38,6 +38,10 @@ </dependency> <dependency> <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-jaxb-deployment</artifactId> + </dependency> + <dependency> + <groupId>org.apache.camel.quarkus</groupId> <artifactId>camel-quarkus-jbpm</artifactId> </dependency> </dependencies> diff --git a/extensions-jvm/jbpm/runtime/pom.xml b/extensions-jvm/jbpm/runtime/pom.xml index b39f904..00c749e 100644 --- a/extensions-jvm/jbpm/runtime/pom.xml +++ b/extensions-jvm/jbpm/runtime/pom.xml @@ -54,19 +54,23 @@ <artifactId>camel-quarkus-core</artifactId> </dependency> <dependency> + <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-jaxb</artifactId> + </dependency> + <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-jbpm</artifactId> <exclusions> <exclusion> + <groupId>com.sun.xml.bind</groupId> + <artifactId>jaxb-impl</artifactId> + </exclusion> + <exclusion> <groupId>jakarta.xml.bind</groupId> <artifactId>jakarta.xml.bind-api</artifactId> </exclusion> </exclusions> </dependency> - <dependency> - <groupId>org.jboss.spec.javax.xml.bind</groupId> - <artifactId>jboss-jaxb-api_2.3_spec</artifactId> - </dependency> </dependencies> <build> diff --git a/extensions-jvm/workday/runtime/pom.xml b/extensions-jvm/workday/runtime/pom.xml index 7830c49..4e9ae5b 100644 --- a/extensions-jvm/workday/runtime/pom.xml +++ b/extensions-jvm/workday/runtime/pom.xml @@ -56,7 +56,18 @@ <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-workday</artifactId> + <exclusions> + <exclusion> + <groupId>jakarta.xml.bind</groupId> + <artifactId>jakarta.xml.bind-api</artifactId> + </exclusion> + </exclusions> </dependency> + <dependency> + <groupId>org.jboss.spec.javax.xml.bind</groupId> + <artifactId>jboss-jaxb-api_2.3_spec</artifactId> + </dependency> + </dependencies> <build> diff --git a/extensions/jaxb/runtime/pom.xml b/extensions/jaxb/runtime/pom.xml index fa3afc8..dce4b14 100644 --- a/extensions/jaxb/runtime/pom.xml +++ b/extensions/jaxb/runtime/pom.xml @@ -54,6 +54,12 @@ <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-jaxb</artifactId> + <exclusions> + <exclusion> + <groupId>jakarta.xml.bind</groupId> + <artifactId>jakarta.xml.bind-api</artifactId> + </exclusion> + </exclusions> </dependency> <dependency> <groupId>io.quarkus</groupId> diff --git a/extensions/qute/component/src/generated/java/org/apache/camel/component/qute/QuteComponentConfigurer.java b/extensions/qute/component/src/generated/java/org/apache/camel/component/qute/QuteComponentConfigurer.java index 8ecaf3e..95e6cc2 100644 --- a/extensions/qute/component/src/generated/java/org/apache/camel/component/qute/QuteComponentConfigurer.java +++ b/extensions/qute/component/src/generated/java/org/apache/camel/component/qute/QuteComponentConfigurer.java @@ -15,6 +15,16 @@ import org.apache.camel.support.component.PropertyConfigurerSupport; @SuppressWarnings("unchecked") public class QuteComponentConfigurer extends PropertyConfigurerSupport implements GeneratedPropertyConfigurer, PropertyConfigurerGetter { + private static final Map<String, Object> ALL_OPTIONS; + static { + Map<String, Object> map = new CaseInsensitiveMap(); + map.put("allowTemplateFromHeader", boolean.class); + map.put("lazyStartProducer", boolean.class); + map.put("basicPropertyBinding", boolean.class); + map.put("quteEngine", io.quarkus.qute.Engine.class); + ALL_OPTIONS = map; + } + @Override public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) { QuteComponent target = (QuteComponent) obj; @@ -33,12 +43,7 @@ public class QuteComponentConfigurer extends PropertyConfigurerSupport implement @Override public Map<String, Object> getAllOptions(Object target) { - Map<String, Object> answer = new CaseInsensitiveMap(); - answer.put("allowTemplateFromHeader", boolean.class); - answer.put("basicPropertyBinding", boolean.class); - answer.put("lazyStartProducer", boolean.class); - answer.put("quteEngine", io.quarkus.qute.Engine.class); - return answer; + return ALL_OPTIONS; } @Override diff --git a/extensions/qute/component/src/generated/java/org/apache/camel/component/qute/QuteEndpointConfigurer.java b/extensions/qute/component/src/generated/java/org/apache/camel/component/qute/QuteEndpointConfigurer.java index 22e72c7..983fa1c 100644 --- a/extensions/qute/component/src/generated/java/org/apache/camel/component/qute/QuteEndpointConfigurer.java +++ b/extensions/qute/component/src/generated/java/org/apache/camel/component/qute/QuteEndpointConfigurer.java @@ -15,6 +15,20 @@ import org.apache.camel.support.component.PropertyConfigurerSupport; @SuppressWarnings("unchecked") public class QuteEndpointConfigurer extends PropertyConfigurerSupport implements GeneratedPropertyConfigurer, PropertyConfigurerGetter { + private static final Map<String, Object> ALL_OPTIONS; + static { + Map<String, Object> map = new CaseInsensitiveMap(); + map.put("resourceUri", java.lang.String.class); + map.put("allowContextMapAll", boolean.class); + map.put("allowTemplateFromHeader", boolean.class); + map.put("contentCache", boolean.class); + map.put("encoding", java.lang.String.class); + map.put("lazyStartProducer", boolean.class); + map.put("basicPropertyBinding", boolean.class); + map.put("synchronous", boolean.class); + ALL_OPTIONS = map; + } + @Override public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) { QuteEndpoint target = (QuteEndpoint) obj; @@ -37,15 +51,7 @@ public class QuteEndpointConfigurer extends PropertyConfigurerSupport implements @Override public Map<String, Object> getAllOptions(Object target) { - Map<String, Object> answer = new CaseInsensitiveMap(); - answer.put("allowContextMapAll", boolean.class); - answer.put("allowTemplateFromHeader", boolean.class); - answer.put("basicPropertyBinding", boolean.class); - answer.put("contentCache", boolean.class); - answer.put("encoding", java.lang.String.class); - answer.put("lazyStartProducer", boolean.class); - answer.put("synchronous", boolean.class); - return answer; + return ALL_OPTIONS; } @Override diff --git a/extensions/qute/component/src/generated/java/org/apache/camel/component/qute/QuteEndpointUriFactory.java b/extensions/qute/component/src/generated/java/org/apache/camel/component/qute/QuteEndpointUriFactory.java new file mode 100644 index 0000000..08e4470 --- /dev/null +++ b/extensions/qute/component/src/generated/java/org/apache/camel/component/qute/QuteEndpointUriFactory.java @@ -0,0 +1,60 @@ +/* Generated by camel build tools - do NOT edit this file! */ +package org.apache.camel.component.qute; + +import java.net.URISyntaxException; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Set; + +import org.apache.camel.spi.EndpointUriFactory; + +/** + * Generated by camel build tools - do NOT edit this file! + */ +public class QuteEndpointUriFactory extends org.apache.camel.support.component.EndpointUriFactorySupport implements EndpointUriFactory { + + private static final String BASE = ":resourceUri"; + + private static final Set<String> PROPERTY_NAMES; + static { + Set<String> set = new HashSet<>(8); + set.add("resourceUri"); + set.add("allowContextMapAll"); + set.add("allowTemplateFromHeader"); + set.add("contentCache"); + set.add("encoding"); + set.add("lazyStartProducer"); + set.add("basicPropertyBinding"); + set.add("synchronous"); + PROPERTY_NAMES = set; + } + + @Override + public boolean isEnabled(String scheme) { + return "qute".equals(scheme); + } + + @Override + public String buildUri(String scheme, Map<String, Object> properties) throws URISyntaxException { + String syntax = scheme + BASE; + String uri = syntax; + + Map<String, Object> copy = new HashMap<>(properties); + + uri = buildPathParameter(syntax, uri, "resourceUri", null, true, copy); + uri = buildQueryParameters(uri, copy); + return uri; + } + + @Override + public Set<String> propertyNames() { + return PROPERTY_NAMES; + } + + @Override + public boolean isLenientProperties() { + return false; + } +} + diff --git a/extensions/qute/component/src/generated/resources/META-INF/services/org/apache/camel/urifactory/qute-endpoint b/extensions/qute/component/src/generated/resources/META-INF/services/org/apache/camel/urifactory/qute-endpoint new file mode 100644 index 0000000..2d208ea --- /dev/null +++ b/extensions/qute/component/src/generated/resources/META-INF/services/org/apache/camel/urifactory/qute-endpoint @@ -0,0 +1,2 @@ +# Generated by camel build tools - do NOT edit this file! +class=org.apache.camel.component.qute.QuteEndpointUriFactory diff --git a/extensions/qute/component/src/generated/resources/org/apache/camel/component/qute/qute.json b/extensions/qute/component/src/generated/resources/org/apache/camel/component/qute/qute.json index c39fc40..d664247 100644 --- a/extensions/qute/component/src/generated/resources/org/apache/camel/component/qute/qute.json +++ b/extensions/qute/component/src/generated/resources/org/apache/camel/component/qute/qute.json @@ -16,6 +16,7 @@ "extendsScheme": "", "syntax": "qute:resourceUri", "async": false, + "api": false, "consumerOnly": false, "producerOnly": true, "lenientProperties": false @@ -23,7 +24,7 @@ "componentProperties": { "allowTemplateFromHeader": { "kind": "property", "displayName": "Allow Template From Header", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": "false", "description": "Whether to allow to use resource template from header or not (default false). Enabling this allows to specify dynamic templates via message header. However this can be seen as a potential security vulnerability if the he [...] "lazyStartProducer": { "kind": "property", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": 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 starting and cause the r [...] - "basicPropertyBinding": { "kind": "property", "displayName": "Basic Property Binding", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Whether the component should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities" }, + "basicPropertyBinding": { "kind": "property", "displayName": "Basic Property Binding", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": true, "secret": false, "defaultValue": false, "description": "Whether the component should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities" }, "quteEngine": { "kind": "property", "displayName": "Qute Engine", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "io.quarkus.qute.Engine", "deprecated": false, "secret": false, "description": "To use the Engine otherwise a new engine is created" } }, "properties": { diff --git a/integration-tests/caffeine/src/main/java/org/apache/camel/quarkus/component/caffeine/it/CaffeineResource.java b/integration-tests/caffeine/src/main/java/org/apache/camel/quarkus/component/caffeine/it/CaffeineResource.java index 889e345..27e7e95 100644 --- a/integration-tests/caffeine/src/main/java/org/apache/camel/quarkus/component/caffeine/it/CaffeineResource.java +++ b/integration-tests/caffeine/src/main/java/org/apache/camel/quarkus/component/caffeine/it/CaffeineResource.java @@ -27,7 +27,6 @@ import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; -import com.github.benmanes.caffeine.cache.Cache; import org.apache.camel.CamelContext; import org.apache.camel.FluentProducerTemplate; import org.apache.camel.component.caffeine.CaffeineConstants; @@ -59,11 +58,7 @@ public class CaffeineResource { @PathParam("key") String key, String value) { - // This won't be needed after https://issues.apache.org/jira/browse/CAMEL-15524 - FluentProducerTemplate t = context.getRegistry().lookupByNameAndType(cacheName, Cache.class) != null - ? template.toF("%s://%s?cache=#%s", componentName, cacheName, cacheName) - : template.toF("%s://%s", componentName, cacheName); - + FluentProducerTemplate t = template.toF("%s://%s", componentName, cacheName); t.withHeader(CaffeineConstants.ACTION, CaffeineConstants.ACTION_PUT); t.withHeader(CaffeineConstants.KEY, key); t.withBody(value); @@ -79,11 +74,7 @@ public class CaffeineResource { @PathParam("cacheName") String cacheName, @PathParam("key") String key) { - // This won't be needed after https://issues.apache.org/jira/browse/CAMEL-15524 - FluentProducerTemplate t = context.getRegistry().lookupByNameAndType(cacheName, Cache.class) != null - ? template.toF("%s://%s?cache=#%s", componentName, cacheName, cacheName) - : template.toF("%s://%s", componentName, cacheName); - + FluentProducerTemplate t = template.toF("%s://%s", componentName, cacheName); t.withHeader(CaffeineConstants.ACTION, CaffeineConstants.ACTION_GET); t.withHeader(CaffeineConstants.KEY, key); diff --git a/pom.xml b/pom.xml index e24561c..528a205 100644 --- a/pom.xml +++ b/pom.xml @@ -44,7 +44,7 @@ <awssdk1-swf-libs.version>1.11.22</awssdk1-swf-libs.version> <awssdk2.version>2.14.3</awssdk2.version> <bouncycastle.version>1.66</bouncycastle.version> - <camel.version>3.5.0</camel.version> + <camel.version>3.6.0-SNAPSHOT</camel.version> <commons-beanutils.version>1.9.4</commons-beanutils.version><!-- keep in sync with Camel --> <commons-cli.version>1.4</commons-cli.version><!-- keep in sync with Quarkus, via quarkus-bootstrap-core --> <debezium.version>1.2.1.Final</debezium.version>