This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new ec1f6eb633b CAMEL-20101: camel-jolt - query parameter
allowContextMapAll is ignored (#11973)
ec1f6eb633b is described below
commit ec1f6eb633b9de6be3c7a7b02bef913a55835003
Author: Steven Dürrenmatt <[email protected]>
AuthorDate: Sat Nov 11 18:02:33 2023 +0100
CAMEL-20101: camel-jolt - query parameter allowContextMapAll is ignored
(#11973)
---
.../camel/component/jolt/JoltEndpointConfigurer.java | 6 ------
.../camel/component/jolt/JoltEndpointUriFactory.java | 3 +--
.../resources/org/apache/camel/component/jolt/jolt.json | 14 +++++++-------
.../java/org/apache/camel/component/jolt/JoltEndpoint.java | 2 ++
4 files changed, 10 insertions(+), 15 deletions(-)
diff --git
a/components/camel-jolt/src/generated/java/org/apache/camel/component/jolt/JoltEndpointConfigurer.java
b/components/camel-jolt/src/generated/java/org/apache/camel/component/jolt/JoltEndpointConfigurer.java
index 83e7f35c7e0..f094c53181c 100644
---
a/components/camel-jolt/src/generated/java/org/apache/camel/component/jolt/JoltEndpointConfigurer.java
+++
b/components/camel-jolt/src/generated/java/org/apache/camel/component/jolt/JoltEndpointConfigurer.java
@@ -21,8 +21,6 @@ public class JoltEndpointConfigurer extends
PropertyConfigurerSupport implements
public boolean configure(CamelContext camelContext, Object obj, String
name, Object value, boolean ignoreCase) {
JoltEndpoint target = (JoltEndpoint) obj;
switch (ignoreCase ? name.toLowerCase() : name) {
- case "allowcontextmapall":
- case "allowContextMapAll":
target.setAllowContextMapAll(property(camelContext, boolean.class, value));
return true;
case "allowtemplatefromheader":
case "allowTemplateFromHeader":
target.setAllowTemplateFromHeader(property(camelContext, boolean.class,
value)); return true;
case "contentcache":
@@ -42,8 +40,6 @@ public class JoltEndpointConfigurer extends
PropertyConfigurerSupport implements
@Override
public Class<?> getOptionType(String name, boolean ignoreCase) {
switch (ignoreCase ? name.toLowerCase() : name) {
- case "allowcontextmapall":
- case "allowContextMapAll": return boolean.class;
case "allowtemplatefromheader":
case "allowTemplateFromHeader": return boolean.class;
case "contentcache":
@@ -64,8 +60,6 @@ public class JoltEndpointConfigurer extends
PropertyConfigurerSupport implements
public Object getOptionValue(Object obj, String name, boolean ignoreCase) {
JoltEndpoint target = (JoltEndpoint) obj;
switch (ignoreCase ? name.toLowerCase() : name) {
- case "allowcontextmapall":
- case "allowContextMapAll": return target.isAllowContextMapAll();
case "allowtemplatefromheader":
case "allowTemplateFromHeader": return
target.isAllowTemplateFromHeader();
case "contentcache":
diff --git
a/components/camel-jolt/src/generated/java/org/apache/camel/component/jolt/JoltEndpointUriFactory.java
b/components/camel-jolt/src/generated/java/org/apache/camel/component/jolt/JoltEndpointUriFactory.java
index d9cffe9d139..2260b2a9088 100644
---
a/components/camel-jolt/src/generated/java/org/apache/camel/component/jolt/JoltEndpointUriFactory.java
+++
b/components/camel-jolt/src/generated/java/org/apache/camel/component/jolt/JoltEndpointUriFactory.java
@@ -21,8 +21,7 @@ public class JoltEndpointUriFactory extends
org.apache.camel.support.component.E
private static final Set<String> SECRET_PROPERTY_NAMES;
private static final Set<String> MULTI_VALUE_PREFIXES;
static {
- Set<String> props = new HashSet<>(8);
- props.add("allowContextMapAll");
+ Set<String> props = new HashSet<>(7);
props.add("allowTemplateFromHeader");
props.add("contentCache");
props.add("inputType");
diff --git
a/components/camel-jolt/src/generated/resources/org/apache/camel/component/jolt/jolt.json
b/components/camel-jolt/src/generated/resources/org/apache/camel/component/jolt/jolt.json
index bc4b3fb2394..52b581c8bc5 100644
---
a/components/camel-jolt/src/generated/resources/org/apache/camel/component/jolt/jolt.json
+++
b/components/camel-jolt/src/generated/resources/org/apache/camel/component/jolt/jolt.json
@@ -5,6 +5,7 @@
"title": "JOLT",
"description": "JSON to JSON transformation using JOLT.",
"deprecated": false,
+ "deprecationNote": "",
"firstVersion": "2.16.0",
"label": "transformation",
"javaType": "org.apache.camel.component.jolt.JoltComponent",
@@ -33,12 +34,11 @@
},
"properties": {
"resourceUri": { "index": 0, "kind": "path", "displayName": "Resource
Uri", "group": "producer", "label": "", "required": true, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "deprecationNote": "",
"autowired": false, "secret": false, "supportFileReference": true,
"description": "Path to the resource. You can prefix with: classpath, file,
http, ref, or bean. classpath, file and http loads the resource using these
protocols (classpath is default). ref will look [...]
- "allowContextMapAll": { "index": 1, "kind": "parameter", "displayName":
"Allow Context Map All", "group": "producer", "label": "", "required": false,
"type": "boolean", "javaType": "boolean", "deprecated": false, "autowired":
false, "secret": false, "defaultValue": false, "description": "Sets whether the
context map should allow access to all details. By default only the message
body and headers can be accessed. This option can be enabled for full access to
the current Exchange and C [...]
- "allowTemplateFromHeader": { "index": 2, "kind": "parameter",
"displayName": "Allow Template From Header", "group": "producer", "label": "",
"required": false, "type": "boolean", "javaType": "boolean", "deprecated":
false, "autowired": 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 s [...]
- "contentCache": { "index": 3, "kind": "parameter", "displayName": "Content
Cache", "group": "producer", "label": "", "required": false, "type": "boolean",
"javaType": "boolean", "deprecated": false, "autowired": false, "secret":
false, "defaultValue": false, "description": "Sets whether to use resource
content cache or not" },
- "inputType": { "index": 4, "kind": "parameter", "displayName": "Input
Type", "group": "producer", "label": "", "required": false, "type": "object",
"javaType": "org.apache.camel.component.jolt.JoltInputOutputType", "enum": [
"Hydrated", "JsonString" ], "deprecated": false, "autowired": false, "secret":
false, "defaultValue": "Hydrated", "description": "Specifies if the input is
hydrated JSON or a JSON String." },
- "outputType": { "index": 5, "kind": "parameter", "displayName": "Output
Type", "group": "producer", "label": "", "required": false, "type": "object",
"javaType": "org.apache.camel.component.jolt.JoltInputOutputType", "enum": [
"Hydrated", "JsonString" ], "deprecated": false, "autowired": false, "secret":
false, "defaultValue": "Hydrated", "description": "Specifies if the output
should be hydrated JSON or a JSON String." },
- "transformDsl": { "index": 6, "kind": "parameter", "displayName":
"Transform Dsl", "group": "producer", "label": "", "required": false, "type":
"object", "javaType": "org.apache.camel.component.jolt.JoltTransformType",
"enum": [ "Chainr", "Shiftr", "Defaultr", "Removr", "Sortr" ], "deprecated":
false, "autowired": false, "secret": false, "defaultValue": "Chainr",
"description": "Specifies the Transform DSL of the endpoint resource. If none
is specified Chainr will be used." },
- "lazyStartProducer": { "index": 7, "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 produc [...]
+ "allowTemplateFromHeader": { "index": 1, "kind": "parameter",
"displayName": "Allow Template From Header", "group": "producer", "label": "",
"required": false, "type": "boolean", "javaType": "boolean", "deprecated":
false, "autowired": 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 s [...]
+ "contentCache": { "index": 2, "kind": "parameter", "displayName": "Content
Cache", "group": "producer", "label": "", "required": false, "type": "boolean",
"javaType": "boolean", "deprecated": false, "autowired": false, "secret":
false, "defaultValue": false, "description": "Sets whether to use resource
content cache or not" },
+ "inputType": { "index": 3, "kind": "parameter", "displayName": "Input
Type", "group": "producer", "label": "", "required": false, "type": "object",
"javaType": "org.apache.camel.component.jolt.JoltInputOutputType", "enum": [
"Hydrated", "JsonString" ], "deprecated": false, "autowired": false, "secret":
false, "defaultValue": "Hydrated", "description": "Specifies if the input is
hydrated JSON or a JSON String." },
+ "outputType": { "index": 4, "kind": "parameter", "displayName": "Output
Type", "group": "producer", "label": "", "required": false, "type": "object",
"javaType": "org.apache.camel.component.jolt.JoltInputOutputType", "enum": [
"Hydrated", "JsonString" ], "deprecated": false, "autowired": false, "secret":
false, "defaultValue": "Hydrated", "description": "Specifies if the output
should be hydrated JSON or a JSON String." },
+ "transformDsl": { "index": 5, "kind": "parameter", "displayName":
"Transform Dsl", "group": "producer", "label": "", "required": false, "type":
"object", "javaType": "org.apache.camel.component.jolt.JoltTransformType",
"enum": [ "Chainr", "Shiftr", "Defaultr", "Removr", "Sortr" ], "deprecated":
false, "autowired": false, "secret": false, "defaultValue": "Chainr",
"description": "Specifies the Transform DSL of the endpoint resource. If none
is specified Chainr will be used." },
+ "lazyStartProducer": { "index": 6, "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 produc [...]
}
}
diff --git
a/components/camel-jolt/src/main/java/org/apache/camel/component/jolt/JoltEndpoint.java
b/components/camel-jolt/src/main/java/org/apache/camel/component/jolt/JoltEndpoint.java
index 40114f5c918..8ece548930a 100644
---
a/components/camel-jolt/src/main/java/org/apache/camel/component/jolt/JoltEndpoint.java
+++
b/components/camel-jolt/src/main/java/org/apache/camel/component/jolt/JoltEndpoint.java
@@ -32,6 +32,7 @@ import org.apache.camel.Category;
import org.apache.camel.Exchange;
import org.apache.camel.ExchangePattern;
import org.apache.camel.component.ResourceEndpoint;
+import org.apache.camel.spi.Metadata;
import org.apache.camel.spi.UriEndpoint;
import org.apache.camel.spi.UriParam;
import org.apache.camel.support.ExchangeHelper;
@@ -42,6 +43,7 @@ import org.apache.camel.util.ObjectHelper;
*/
@UriEndpoint(firstVersion = "2.16.0", scheme = "jolt", title = "JOLT", syntax
= "jolt:resourceUri", producerOnly = true,
category = { Category.TRANSFORMATION }, headersClass =
JoltConstants.class)
+@Metadata(excludeProperties = "allowContextMapAll")
public class JoltEndpoint extends ResourceEndpoint {
private JoltTransform transform;