You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2024/02/04 18:33:28 UTC
(camel) 05/05: CAMEL-20378: Languages should be thread-safe and be configured only via properties array, all in the same way.
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch lang6
in repository https://gitbox.apache.org/repos/asf/camel.git
commit d189c1b0937c8e4d5285d79445d22952bf2f7d54
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Sun Feb 4 19:33:12 2024 +0100
CAMEL-20378: Languages should be thread-safe and be configured only via properties array, all in the same way.
---
.../org/apache/camel/catalog/languages/xquery.json | 15 ++---
.../apache/camel/catalog/schemas/camel-spring.xsd | 77 ++++------------------
2 files changed, 19 insertions(+), 73 deletions(-)
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/languages/xquery.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/languages/xquery.json
index 6cc4dad67d2..8233882bdd8 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/languages/xquery.json
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/languages/xquery.json
@@ -18,13 +18,12 @@
"properties": {
"id": { "index": 0, "kind": "attribute", "displayName": "Id", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the id of this node" },
"expression": { "index": 1, "kind": "value", "displayName": "Expression", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The expression value in your chosen language syntax" },
- "type": { "index": 2, "kind": "attribute", "displayName": "Type", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the class name of the result type (type from output) The default result type is NodeSet" },
- "configurationRef": { "index": 3, "kind": "attribute", "displayName": "Configuration Ref", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Reference to a saxon configuration instance in the registry to use for xquery (requires camel-saxon). This may be needed to add custom functions to a saxon configuration, so these custom functions can be used in xquery expressions." },
- "namespace": { "index": 4, "kind": "element", "displayName": "Namespace", "label": "common", "required": false, "type": "array", "javaType": "java.util.List<org.apache.camel.model.PropertyDefinition>", "deprecated": false, "autowired": false, "secret": false, "description": "Injects the XML Namespaces of prefix - uri mappings" },
- "variableName": { "index": 5, "kind": "attribute", "displayName": "Variable Name", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Name of variable to use as input, instead of the message body It has as higher precedent if other are set." },
- "headerName": { "index": 6, "kind": "attribute", "displayName": "Header Name", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Name of header to use as input, instead of the message body It has as higher precedent than the propertyName if both are set." },
- "propertyName": { "index": 7, "kind": "attribute", "displayName": "Property Name", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Name of property to use as input, instead of the message body. It has a lower precedent than the headerName if both are set." },
- "resultType": { "index": 8, "kind": "attribute", "displayName": "Result Type", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the class of the result type (type from output)" },
- "trim": { "index": 9, "kind": "attribute", "displayName": "Trim", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether to trim the value to remove leading and trailing whitespaces and line breaks" }
+ "configurationRef": { "index": 2, "kind": "attribute", "displayName": "Configuration Ref", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Reference to a saxon configuration instance in the registry to use for xquery (requires camel-saxon). This may be needed to add custom functions to a saxon configuration, so these custom functions can be used in xquery expressions." },
+ "namespace": { "index": 3, "kind": "element", "displayName": "Namespace", "label": "common", "required": false, "type": "array", "javaType": "java.util.List<org.apache.camel.model.PropertyDefinition>", "deprecated": false, "autowired": false, "secret": false, "description": "Injects the XML Namespaces of prefix - uri mappings" },
+ "variableName": { "index": 4, "kind": "attribute", "displayName": "Variable Name", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Name of variable to use as input, instead of the message body It has as higher precedent if other are set." },
+ "headerName": { "index": 5, "kind": "attribute", "displayName": "Header Name", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Name of header to use as input, instead of the message body It has as higher precedent than the propertyName if both are set." },
+ "propertyName": { "index": 6, "kind": "attribute", "displayName": "Property Name", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Name of property to use as input, instead of the message body. It has a lower precedent than the headerName if both are set." },
+ "resultType": { "index": 7, "kind": "attribute", "displayName": "Result Type", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the class of the result type (type from output)" },
+ "trim": { "index": 8, "kind": "attribute", "displayName": "Trim", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether to trim the value to remove leading and trailing whitespaces and line breaks" }
}
}
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-spring.xsd b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-spring.xsd
index 4b0cd8c0273..610e938f03d 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-spring.xsd
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-spring.xsd
@@ -15478,42 +15478,7 @@ Whether to validate the bean has the configured method. Default value: true
</xs:complexType>
<xs:complexType abstract="true" name="namespaceAwareExpression">
<xs:simpleContent>
- <xs:extension base="tns:singleInputExpressionDefinition"/>
- </xs:simpleContent>
- </xs:complexType>
- <xs:complexType abstract="true" name="singleInputExpressionDefinition">
- <xs:simpleContent>
- <xs:extension base="tns:expression">
- <xs:attribute name="variableName" type="xs:string">
- <xs:annotation>
- <xs:documentation xml:lang="en">
-<![CDATA[
-Name of variable to use as input, instead of the message body.
-]]>
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="headerName" type="xs:string">
- <xs:annotation>
- <xs:documentation xml:lang="en">
-<![CDATA[
-Name of header to use as input, instead of the message body It has as higher precedent than the propertyName if both are
-set.
-]]>
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="propertyName" type="xs:string">
- <xs:annotation>
- <xs:documentation xml:lang="en">
-<![CDATA[
-Name of property to use as input, instead of the message body. It has a lower precedent than the headerName if both are
-set.
-]]>
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- </xs:extension>
+ <xs:extension base="tns:singleInputTypedExpressionDefinition"/>
</xs:simpleContent>
</xs:complexType>
<xs:complexType name="ognlExpression">
@@ -15536,6 +15501,15 @@ set.
<xs:extension base="tns:typedExpressionDefinition"/>
</xs:simpleContent>
</xs:complexType>
+ <xs:complexType abstract="true" name="singleInputExpressionDefinition">
+ <xs:simpleContent>
+ <xs:extension base="tns:expression">
+ <xs:attribute name="variableName" type="xs:string"/>
+ <xs:attribute name="headerName" type="xs:string"/>
+ <xs:attribute name="propertyName" type="xs:string"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
<xs:complexType name="spELExpression">
<xs:simpleContent>
<xs:extension base="tns:typedExpressionDefinition"/>
@@ -15657,15 +15631,6 @@ expression function.
<xs:complexType name="xmlTokenizerExpression">
<xs:simpleContent>
<xs:extension base="tns:namespaceAwareExpression">
- <xs:attribute name="resultType" type="xs:string">
- <xs:annotation>
- <xs:documentation xml:lang="en">
-<![CDATA[
-Sets the class of the result type (type from output).
-]]>
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
<xs:attribute name="mode" type="xs:string">
<xs:annotation>
<xs:documentation xml:lang="en">
@@ -15701,11 +15666,11 @@ Name of class for document type The default value is org.w3c.dom.Document.
</xs:documentation>
</xs:annotation>
</xs:attribute>
- <xs:attribute name="resultType" type="xs:string">
+ <xs:attribute name="resultQName" type="xs:string">
<xs:annotation>
<xs:documentation xml:lang="en">
<![CDATA[
-Sets the class name of the result type (type from output) The default result type is NodeSet. Default value: NODESET
+Sets the output type supported by XPath. Default value: NODESET
]]>
</xs:documentation>
</xs:annotation>
@@ -15778,24 +15743,6 @@ the built operating system, and not a JVM runtime. Default value: true
<xs:complexType name="xQueryExpression">
<xs:simpleContent>
<xs:extension base="tns:namespaceAwareExpression">
- <xs:attribute name="resultType" type="xs:string">
- <xs:annotation>
- <xs:documentation xml:lang="en">
-<![CDATA[
-Sets the class of the result type (type from output).
-]]>
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute name="type" type="xs:string">
- <xs:annotation>
- <xs:documentation xml:lang="en">
-<![CDATA[
-Sets the class name of the result type (type from output) The default result type is NodeSet.
-]]>
- </xs:documentation>
- </xs:annotation>
- </xs:attribute>
<xs:attribute name="configurationRef" type="xs:string">
<xs:annotation>
<xs:documentation xml:lang="en">