From 5044a85c274f7bf4ca0b749bfcc4277e8d72f485 Mon Sep 17 00:00:00 2001 From: ramu11 Date: Wed, 19 Aug 2026 14:02:14 +0530 Subject: [PATCH] CAMEL-24337: Add Python 3 language component --- bom/camel-bom/pom.xml | 5 + catalog/camel-allcomponents/pom.xml | 5 + .../camel/catalog/components/language.json | 2 +- .../org/apache/camel/catalog/docs.properties | 1 + .../camel/catalog/docs/python3-language.adoc | 133 ++++++ .../apache/camel/catalog/languages.properties | 1 + .../camel/catalog/languages/python3.json | 24 ++ .../apache/camel/catalog/models.properties | 1 + .../camel/catalog/models/aggregate.json | 8 +- .../apache/camel/catalog/models/delay.json | 2 +- .../camel/catalog/models/dynamicRouter.json | 2 +- .../apache/camel/catalog/models/enrich.json | 2 +- .../apache/camel/catalog/models/filter.json | 2 +- .../catalog/models/idempotentConsumer.json | 2 +- .../org/apache/camel/catalog/models/loop.json | 2 +- .../camel/catalog/models/onException.json | 6 +- .../apache/camel/catalog/models/onWhen.json | 2 +- .../camel/catalog/models/pollEnrich.json | 2 +- .../catalog/models/predicateValidator.json | 2 +- .../catalog/models/propertyExpression.json | 2 +- .../apache/camel/catalog/models/python3.json | 21 + .../camel/catalog/models/recipientList.json | 2 +- .../camel/catalog/models/resequence.json | 2 +- .../camel/catalog/models/routingSlip.json | 2 +- .../apache/camel/catalog/models/script.json | 2 +- .../apache/camel/catalog/models/setBody.json | 2 +- .../camel/catalog/models/setHeader.json | 2 +- .../camel/catalog/models/setProperty.json | 2 +- .../camel/catalog/models/setVariable.json | 2 +- .../org/apache/camel/catalog/models/sort.json | 2 +- .../apache/camel/catalog/models/split.json | 2 +- .../catalog/models/stickyLoadBalancer.json | 2 +- .../apache/camel/catalog/models/throttle.json | 4 +- .../camel/catalog/models/transform.json | 2 +- .../apache/camel/catalog/models/validate.json | 2 +- .../org/apache/camel/catalog/models/when.json | 2 +- .../camel/catalog/schemas/camel-spring.xsd | 39 ++ .../camel/catalog/schemas/camel-xml-io.xsd | 39 ++ .../catalog/schemas/camelYamlDsl-model.json | 56 +++ components/camel-javascript/pom.xml | 2 +- .../camel/component/language/language.json | 2 +- .../component/language/LanguageEndpoint.java | 2 +- components/camel-python3/pom.xml | 83 ++++ .../camel/language/python3/python3.json | 24 ++ .../org/apache/camel/language.properties | 7 + .../org/apache/camel/language/python3 | 2 + .../src/main/docs/python3-language.adoc | 159 ++++++++ .../camel/language/python3/Python3.java | 36 ++ .../language/python3/Python3Expression.java | 53 +++ .../camel/language/python3/Python3Helper.java | 66 +++ .../language/python3/Python3Language.java | 382 ++++++++++++++++++ .../camel/language/python3/package.html | 27 ++ .../camel/language/Python3LanguageTest.java | 32 ++ .../language/python3/Python3ChoiceTest.java | 55 +++ .../python3/Python3ErrorHandlingTest.java | 89 ++++ .../language/python3/Python3JavaDslTest.java | 76 ++++ .../python3/Python3LanguageEndpointTest.java | 62 +++ .../python3/Python3LanguageEvalTest.java | 289 +++++++++++++ .../python3/Python3LanguageSecurityTest.java | 173 ++++++++ .../python3/Python3ResolutionTest.java | 61 +++ .../language/python3/Python3ResourceTest.java | 105 +++++ .../src/test/resources/log4j2.properties | 28 ++ .../src/test/resources/mypython3.py | 18 + components/pom.xml | 1 + .../org/apache/camel/model/aggregate.json | 8 +- .../org/apache/camel/model/delay.json | 2 +- .../org/apache/camel/model/dynamicRouter.json | 2 +- .../org/apache/camel/model/enrich.json | 2 +- .../org/apache/camel/model/filter.json | 2 +- .../camel/model/idempotentConsumer.json | 2 +- .../apache/camel/model/language/python3.json | 21 + .../loadbalancer/stickyLoadBalancer.json | 2 +- .../META-INF/org/apache/camel/model/loop.json | 2 +- .../org/apache/camel/model/onException.json | 6 +- .../org/apache/camel/model/onWhen.json | 2 +- .../org/apache/camel/model/pollEnrich.json | 2 +- .../camel/model/propertyExpression.json | 2 +- .../org/apache/camel/model/recipientList.json | 2 +- .../org/apache/camel/model/resequence.json | 2 +- .../org/apache/camel/model/routingSlip.json | 2 +- .../org/apache/camel/model/script.json | 2 +- .../org/apache/camel/model/setBody.json | 2 +- .../org/apache/camel/model/setHeader.json | 2 +- .../org/apache/camel/model/setProperty.json | 2 +- .../org/apache/camel/model/setVariable.json | 2 +- .../META-INF/org/apache/camel/model/sort.json | 2 +- .../org/apache/camel/model/split.json | 2 +- .../org/apache/camel/model/throttle.json | 4 +- .../org/apache/camel/model/transform.json | 2 +- .../org/apache/camel/model/validate.json | 2 +- .../model/validator/predicateValidator.json | 2 +- .../META-INF/org/apache/camel/model/when.json | 2 +- .../org/apache/camel/model.properties | 1 + .../apache/camel/model/language/jaxb.index | 1 + .../camel/builder/ExpressionClause.java | 21 + .../builder/ExpressionClauseSupport.java | 24 ++ .../camel/builder/LanguageBuilderFactory.java | 17 + .../model/language/Python3Expression.java | 71 ++++ .../camel/java/out/JavaDslModelWriter.java | 16 + .../apache/camel/main/languages.properties | 1 + .../org/apache/camel/xml/in/ModelParser.java | 4 + .../org/apache/camel/xml/out/ModelWriter.java | 10 + .../camel/yaml/out/YamlModelWriter.java | 10 + coverage/pom.xml | 5 + .../languages/examples/json/python3.json | 1 + docs/components/modules/languages/nav.adoc | 1 + .../languages/pages/python3-language.adoc | 1 + .../endpoint/StaticEndpointBuilders.java | 12 +- .../dsl/LanguageEndpointBuilderFactory.java | 12 +- .../ExpressionDeserializers.java | 5 + .../deserializers/ModelDeserializers.java | 73 ++++ .../ModelDeserializersResolver.java | 2 + .../schema/camelYamlDsl-canonical.json | 36 ++ .../resources/schema/camelYamlDsl-model.json | 56 +++ .../resources/schema/camelYamlDsl.json | 123 ++++++ parent/pom.xml | 7 +- 116 files changed, 2741 insertions(+), 83 deletions(-) create mode 100644 catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/python3-language.adoc create mode 100644 catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/languages/python3.json create mode 100644 catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/python3.json create mode 100644 components/camel-python3/pom.xml create mode 100644 components/camel-python3/src/generated/resources/META-INF/org/apache/camel/language/python3/python3.json create mode 100644 components/camel-python3/src/generated/resources/META-INF/services/org/apache/camel/language.properties create mode 100644 components/camel-python3/src/generated/resources/META-INF/services/org/apache/camel/language/python3 create mode 100644 components/camel-python3/src/main/docs/python3-language.adoc create mode 100644 components/camel-python3/src/main/java/org/apache/camel/language/python3/Python3.java create mode 100644 components/camel-python3/src/main/java/org/apache/camel/language/python3/Python3Expression.java create mode 100644 components/camel-python3/src/main/java/org/apache/camel/language/python3/Python3Helper.java create mode 100644 components/camel-python3/src/main/java/org/apache/camel/language/python3/Python3Language.java create mode 100644 components/camel-python3/src/main/java/org/apache/camel/language/python3/package.html create mode 100644 components/camel-python3/src/test/java/org/apache/camel/language/Python3LanguageTest.java create mode 100644 components/camel-python3/src/test/java/org/apache/camel/language/python3/Python3ChoiceTest.java create mode 100644 components/camel-python3/src/test/java/org/apache/camel/language/python3/Python3ErrorHandlingTest.java create mode 100644 components/camel-python3/src/test/java/org/apache/camel/language/python3/Python3JavaDslTest.java create mode 100644 components/camel-python3/src/test/java/org/apache/camel/language/python3/Python3LanguageEndpointTest.java create mode 100644 components/camel-python3/src/test/java/org/apache/camel/language/python3/Python3LanguageEvalTest.java create mode 100644 components/camel-python3/src/test/java/org/apache/camel/language/python3/Python3LanguageSecurityTest.java create mode 100644 components/camel-python3/src/test/java/org/apache/camel/language/python3/Python3ResolutionTest.java create mode 100644 components/camel-python3/src/test/java/org/apache/camel/language/python3/Python3ResourceTest.java create mode 100644 components/camel-python3/src/test/resources/log4j2.properties create mode 100644 components/camel-python3/src/test/resources/mypython3.py create mode 100644 core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/language/python3.json create mode 100644 core/camel-core-model/src/main/java/org/apache/camel/model/language/Python3Expression.java create mode 120000 docs/components/modules/languages/examples/json/python3.json create mode 120000 docs/components/modules/languages/pages/python3-language.adoc diff --git a/bom/camel-bom/pom.xml b/bom/camel-bom/pom.xml index 5cacaac528582..aad4f960deb94 100644 --- a/bom/camel-bom/pom.xml +++ b/bom/camel-bom/pom.xml @@ -2047,6 +2047,11 @@ camel-python 4.23.0-SNAPSHOT + + org.apache.camel + camel-python3 + 4.23.0-SNAPSHOT + org.apache.camel camel-qdrant diff --git a/catalog/camel-allcomponents/pom.xml b/catalog/camel-allcomponents/pom.xml index eb2ab055416e2..e05fad0ab3753 100644 --- a/catalog/camel-allcomponents/pom.xml +++ b/catalog/camel-allcomponents/pom.xml @@ -1832,6 +1832,11 @@ camel-python ${project.version} + + org.apache.camel + camel-python3 + ${project.version} + org.apache.camel camel-qdrant diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/language.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/language.json index 4b363e8691111..7acbd33670283 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/language.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/language.json @@ -33,7 +33,7 @@ "CamelLanguageScript": { "index": 0, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String or Expression", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The script to execute provided in the header. Takes precedence over script configured on the endpoint.", "constantName": "org.apache.camel.component.language.LanguageConstants#LANGUAGE_SCRIPT" } }, "properties": { - "languageName": { "index": 0, "kind": "path", "displayName": "Language Name", "group": "producer", "label": "", "required": true, "type": "enum", "javaType": "java.lang.String", "enum": [ "bean", "constant", "csimple", "datasonnet", "exchangeProperty", "file", "groovy", "header", "hl7terser", "java", "joor", "jq", "js", "jsonpath", "mvel", "ognl", "python", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Sets the name of the language to use" }, + "languageName": { "index": 0, "kind": "path", "displayName": "Language Name", "group": "producer", "label": "", "required": true, "type": "enum", "javaType": "java.lang.String", "enum": [ "bean", "constant", "csimple", "datasonnet", "exchangeProperty", "file", "groovy", "header", "hl7terser", "java", "joor", "jq", "js", "jsonpath", "mvel", "ognl", "python", "python3", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Sets the name of the language to use" }, "resourceUri": { "index": 1, "kind": "path", "displayName": "Resource Uri", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "supportFileReference": true, "description": "Path to the resource, or a reference to lookup a bean in the Registry to use as the resource" }, "allowContextMapAll": { "index": 2, "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 CamelContext. Doing so impose a potential security risk as this opens access to the full power of CamelContext API." }, "allowTemplateFromHeader": { "index": 3, "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 security vulnerability if the header is coming from a malicious user, so use this with care." }, diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs.properties b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs.properties index 8cd11c4a37add..e3bc6fd1a14e5 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs.properties +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs.properties @@ -507,6 +507,7 @@ publish-subscribe-channel pubnub-component pulsar-component python-language +python3-language qdrant-component quartz-component quickfix-component diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/python3-language.adoc b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/python3-language.adoc new file mode 100644 index 0000000000000..d8da8bd9ea3c1 --- /dev/null +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/python3-language.adoc @@ -0,0 +1,133 @@ += Python 3 Language +:doctitle: Python 3 +:shortname: python3 +:artifactid: camel-python3 +:description: Evaluates a Python 3 expression +:since: 4.23 +:supportlevel: Preview +:tabs-sync-option: + +*Since Camel {since}* + +Camel allows https://www.graalvm.org/python/[Python 3] (GraalPy) to be +used as an xref:manual::expression.adoc[Expression] or xref:manual::predicate.adoc[Predicate] +in Camel routes. + +This language is distinct from xref:python-language.adoc[Python], which uses Jython and is limited to Python 2.7. + +For example, you can use Python 3 in a xref:manual::predicate.adoc[Predicate] +with the xref:eips:choice-eip.adoc[Content-Based Router] EIP. + +== Python 3 Options + +// language options: START +include::partial$language-options.adoc[] +// language options: END + +== Variables + +The following variables are bound by default: + +[width="100%",cols="10%,10%,80%",options="header",] +|======================================================================= +|Variable |Type |Description +|body |Object |the message body +|headers |Map |the message headers +|properties |Map |the exchange properties +|exchangeId |String |the exchange id +|======================================================================= + +By default, Python can index Java maps and lists (for example `headers['foo']`) +but cannot invoke methods on host objects. + +`message`, `exchange`, and `context` are not bound in default mode. Scripts that +refer to them raise a Python `NameError`. Those variables are available only when +you opt in to trusted host access, as described in <<_trusted_host_access>>. + +== Security + +The default GraalPy context does **not** use `HostAccess.ALL` or `allowAllAccess(true)`. +Host method calls on bound objects are denied unless you opt in. + +`SandboxPolicy.CONSTRAINED` was evaluated and is **not** the default: it rejects the Java +`Map` host access needed for `headers['foo']` and requires redirecting stdout/stderr on both +the engine and the context. Primitive-only scripts can use it in a custom `Python3Language`. + +=== Trusted host access + +To allow Python to call public methods on host objects, and to expose Camel host +objects as variables, bind a language created with `createWithHostAccess()` before +the first usage. + +This is a trusted host-access mode, **not** a sandbox. `HostAccess.ALL` lets Python +call public methods and fields on bound Java objects. It does **not** enable +`allowAllAccess`, Java class lookup, host IO, or process creation. Use it only when +you trust the scripts. + +In this mode the default variables above remain available, plus: + +[width="100%",cols="10%,10%,80%",options="header",] +|======================================================================= +|Variable |Type |Description +|message |Message |the message +|exchange |Exchange |the Exchange +|context |CamelContext |the CamelContext +|======================================================================= + +[source,java] +---- +Python3Language python3 = Python3Language.createWithHostAccess(); +camelContext.getRegistry().bind("python3", python3); +---- + +== Usage + +[source,java] +---- +import static org.apache.camel.language.python3.Python3Language.python3; + +public class MyRouteBuilder extends RouteBuilder { + @Override + public void configure() { + from("direct:start") + .choice() + .when().python3("body == 'Hello'").to("mock:hello") + .otherwise().to("mock:other"); + } +} +---- + +Python 3 syntax is supported, including f-strings: + +[source,python] +---- +f'Hello {body}' +---- + +== Dependencies + +To use Python 3 in your Camel routes, you need to add the dependency on +*camel-python3*, which implements the Python 3 language with GraalPy. + +The GraalPy runtime (language + standard library + Truffle) is large, on the order of +100+ MB of JARs. That is expected for embedding CPython-compatible Python 3 on the JVM. + +If you use Maven, you could add the following to your `pom.xml`, +substituting the version number for the latest release. + +[source,xml] +---- + + org.apache.camel + camel-python3 + x.x.x + +---- + +GraalPy 25.x embeds CPython 3.12. On JDK 17 it typically runs in interpreter-only mode; +on JDK 21+ and on a GraalVM JDK it can use the optimizing runtime. On JDK 24+ you may +need `--enable-native-access=ALL-UNNAMED` (the unit tests already set this). +GraalPy is skipped on `s390x` and `ppc64le` in the same way as camel-javascript. + +GraalPy is licensed under MIT, the Python Software Foundation License, and the Universal +Permissive License (UPL), which are ASF Category A licenses. diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/languages.properties b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/languages.properties index 3badcb79fb2a7..a2618fb067be5 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/languages.properties +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/languages.properties @@ -16,6 +16,7 @@ jsonpath mvel ognl python +python3 ref simple spel diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/languages/python3.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/languages/python3.json new file mode 100644 index 0000000000000..ac0119c0fc138 --- /dev/null +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/languages/python3.json @@ -0,0 +1,24 @@ +{ + "language": { + "kind": "language", + "name": "python3", + "title": "Python 3", + "description": "Evaluates a Python 3 expression", + "deprecated": false, + "firstVersion": "4.23.0", + "label": "language,python", + "javaType": "org.apache.camel.language.python3.Python3Language", + "supportLevel": "Preview", + "groupId": "org.apache.camel", + "artifactId": "camel-python3", + "version": "4.23.0-SNAPSHOT", + "modelName": "python3", + "modelJavaType": "org.apache.camel.model.language.Python3Expression" + }, + "properties": { + "id": { "index": 0, "kind": "attribute", "displayName": "Id", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The id of this node." }, + "expression": { "index": 1, "kind": "value", "displayName": "Expression", "group": "common", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The expression value in your chosen language syntax." }, + "resultType": { "index": 2, "kind": "attribute", "displayName": "Result Type", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The class of the result type (type from output)." }, + "trim": { "index": 3, "kind": "attribute", "displayName": "Trim", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether to trim the source code to remove leading and trailing whitespaces and line breaks." } + } +} diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models.properties b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models.properties index a4ae1a15e2d6a..aa804cb5e62e0 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models.properties +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models.properties @@ -134,6 +134,7 @@ propertyExpression protobuf put python +python3 randomLoadBalancer recipientList redeliveryPolicy diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/aggregate.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/aggregate.json index 86a394227d4d9..ad8faa0dfabfd 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/aggregate.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/aggregate.json @@ -17,10 +17,10 @@ "note": { "index": 1, "kind": "attribute", "displayName": "Note", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The note for this node" }, "description": { "index": 2, "kind": "attribute", "displayName": "Description", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The description for this node" }, "disabled": { "index": 3, "kind": "attribute", "displayName": "Disabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to disable this EIP from the route during build time. Once an EIP has been disabled then it cannot be enabled later at runtime." }, - "correlationExpression": { "index": 4, "kind": "expression", "displayName": "Correlation Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.ExpressionSubElementDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "The expression used to calculate the correlation key to use for aggregation. Exchanges with the same correlation key are aggregated together. If the correlation key cannot be evaluated an Exception is thrown." }, - "completionPredicate": { "index": 5, "kind": "expression", "displayName": "Completion Predicate", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.camel.model.ExpressionSubElementDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "asPredicate": true, "description": "A predicate to indicate when an aggregated exchange is complete. If not specified and the AggregationStrategy implements Predicate, it will be used as the completionPredicate." }, - "completionTimeoutExpression": { "index": 6, "kind": "expression", "displayName": "Completion Timeout Expression", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.camel.model.ExpressionSubElementDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "Time in millis that an aggregated exchange should be inactive before its complete (timeout), evaluated as an expression allowing dynamic timeout values." }, - "completionSizeExpression": { "index": 7, "kind": "expression", "displayName": "Completion Size Expression", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.camel.model.ExpressionSubElementDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "Number of messages aggregated before the aggregation is complete, evaluated as an expression allowing dynamic size values." }, + "correlationExpression": { "index": 4, "kind": "expression", "displayName": "Correlation Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.ExpressionSubElementDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "python3", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "The expression used to calculate the correlation key to use for aggregation. Exchanges with the same correlation key are aggregated together. If the correlation key cannot be evaluated an Exception is thrown." }, + "completionPredicate": { "index": 5, "kind": "expression", "displayName": "Completion Predicate", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.camel.model.ExpressionSubElementDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "python3", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "asPredicate": true, "description": "A predicate to indicate when an aggregated exchange is complete. If not specified and the AggregationStrategy implements Predicate, it will be used as the completionPredicate." }, + "completionTimeoutExpression": { "index": 6, "kind": "expression", "displayName": "Completion Timeout Expression", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.camel.model.ExpressionSubElementDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "python3", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "Time in millis that an aggregated exchange should be inactive before its complete (timeout), evaluated as an expression allowing dynamic timeout values." }, + "completionSizeExpression": { "index": 7, "kind": "expression", "displayName": "Completion Size Expression", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.camel.model.ExpressionSubElementDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "python3", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "Number of messages aggregated before the aggregation is complete, evaluated as an expression allowing dynamic size values." }, "optimisticLockRetryPolicy": { "index": 8, "kind": "element", "displayName": "Optimistic Lock Retry Policy", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.camel.model.OptimisticLockRetryPolicyDefinition", "deprecated": false, "autowired": false, "secret": false, "description": "Configures retry settings when using optimistic locking." }, "parallelProcessing": { "index": 9, "kind": "attribute", "displayName": "Parallel Processing", "group": "common", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "When completed exchanges are sent out of the aggregator, this option indicates whether Camel should use a thread pool with multiple threads for concurrency." }, "optimisticLocking": { "index": 10, "kind": "attribute", "displayName": "Optimistic Locking", "group": "common", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Turns on optimistic locking, which requires the aggregation repository to implement OptimisticLockingAggregationRepository." }, diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/delay.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/delay.json index ce23041cba40b..d38d31e78a82d 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/delay.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/delay.json @@ -17,7 +17,7 @@ "note": { "index": 1, "kind": "attribute", "displayName": "Note", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The note for this node" }, "description": { "index": 2, "kind": "attribute", "displayName": "Description", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The description for this node" }, "disabled": { "index": 3, "kind": "attribute", "displayName": "Disabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to disable this EIP from the route during build time. Once an EIP has been disabled then it cannot be enabled later at runtime." }, - "expression": { "index": 4, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "The expression that determines the delay duration in milliseconds." }, + "expression": { "index": 4, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "python3", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "The expression that determines the delay duration in milliseconds." }, "asyncDelayed": { "index": 5, "kind": "attribute", "displayName": "Async Delayed", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Enables asynchronous delay which means the thread will not block while delaying." }, "callerRunsWhenRejected": { "index": 6, "kind": "attribute", "displayName": "Caller Runs When Rejected", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether or not the caller should run the task when it was rejected by the thread pool." }, "executorService": { "index": 7, "kind": "attribute", "displayName": "Executor Service", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "java.util.concurrent.ExecutorService", "deprecated": false, "autowired": false, "secret": false, "description": "To use a custom thread pool if asyncDelay has been enabled." } diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/dynamicRouter.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/dynamicRouter.json index 98cb7c7c56c9e..9693eeda34363 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/dynamicRouter.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/dynamicRouter.json @@ -17,7 +17,7 @@ "note": { "index": 1, "kind": "attribute", "displayName": "Note", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The note for this node" }, "description": { "index": 2, "kind": "attribute", "displayName": "Description", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The description for this node" }, "disabled": { "index": 3, "kind": "attribute", "displayName": "Disabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to disable this EIP from the route during build time. Once an EIP has been disabled then it cannot be enabled later at runtime." }, - "expression": { "index": 4, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "The expression to compute the next endpoint URI to route to. The expression is called iteratively until it returns null to indicate the end of routing." }, + "expression": { "index": 4, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "python3", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "The expression to compute the next endpoint URI to route to. The expression is called iteratively until it returns null to indicate the end of routing." }, "uriDelimiter": { "index": 5, "kind": "attribute", "displayName": "Uri Delimiter", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": ",", "description": "The delimiter used to separate endpoint URIs when the expression returns multiple endpoints. Default is comma." }, "ignoreInvalidEndpoints": { "index": 6, "kind": "attribute", "displayName": "Ignore Invalid Endpoints", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "If enabled then invalid endpoint URIs are ignored and logged instead of throwing an exception." }, "cacheSize": { "index": 7, "kind": "attribute", "displayName": "Cache Size", "group": "advanced", "label": "advanced", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "description": "Configures the cache size for ProducerCache which caches producers for reuse. The default cache size is 1000. Set to -1 to turn off caching." }, diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/enrich.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/enrich.json index 05039742fac6c..367b2410998b6 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/enrich.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/enrich.json @@ -17,7 +17,7 @@ "note": { "index": 1, "kind": "attribute", "displayName": "Note", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The note for this node" }, "description": { "index": 2, "kind": "attribute", "displayName": "Description", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The description for this node" }, "disabled": { "index": 3, "kind": "attribute", "displayName": "Disabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to disable this EIP from the route during build time. Once an EIP has been disabled then it cannot be enabled later at runtime." }, - "expression": { "index": 4, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "The expression to compute the endpoint URI to enrich from." }, + "expression": { "index": 4, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "python3", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "The expression to compute the endpoint URI to enrich from." }, "variableSend": { "index": 5, "kind": "attribute", "displayName": "Variable Send", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "To use a variable as the source for the message body to send. When using send variable then the message body is taken from this variable instead of the current message, however the headers from the message will still be used as well." }, "variableReceive": { "index": 6, "kind": "attribute", "displayName": "Variable Receive", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "To use a variable to store the received message body (only body, not headers). This makes it handy to use variables for user data and to easily control what data to use for sending and receiving." }, "aggregationStrategy": { "index": 7, "kind": "attribute", "displayName": "Aggregation Strategy", "group": "common", "required": false, "type": "object", "javaType": "org.apache.camel.AggregationStrategy", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the AggregationStrategy to be used to merge the reply from the external service, into a single outgoing message. By default Camel will use the reply from the external service as outgoing message." }, diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/filter.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/filter.json index 3815b0c01606f..93d5a146fa1a3 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/filter.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/filter.json @@ -17,7 +17,7 @@ "note": { "index": 1, "kind": "attribute", "displayName": "Note", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The note for this node" }, "description": { "index": 2, "kind": "attribute", "displayName": "Description", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The description for this node" }, "disabled": { "index": 3, "kind": "attribute", "displayName": "Disabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to disable this EIP from the route during build time. Once an EIP has been disabled then it cannot be enabled later at runtime." }, - "expression": { "index": 4, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "asPredicate": true, "description": "The predicate expression to evaluate. Messages where the predicate returns false are filtered out and not routed further." }, + "expression": { "index": 4, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "python3", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "asPredicate": true, "description": "The predicate expression to evaluate. Messages where the predicate returns false are filtered out and not routed further." }, "statusPropertyName": { "index": 5, "kind": "attribute", "displayName": "Status Property Name", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Name of an exchange property to store whether the filter predicate matched or not. The value is stored as a boolean." }, "outputs": { "index": 6, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List>", "oneOf": [ "a2aSubTask", "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "interceptSendToEndpoint", "kamelet", "loadBalance", "log", "loop", "marshal", "multicast", "onCompletion", "onException", "pausable", "pipeline", "policy", "poll", "pollEnrich", "process", "recipientList", "removeHeader", "removeHeaders", "removeProperties", "removeProperty", "removeVariable", "resequence", "resumable", "rollback", "routingSlip", "saga", "sample", "script", "setBody", "setExchangePattern", "setHeader", "setHeaders", "setProperty", "setVariable", "setVariables", "sort", "split", "step", "stop", "threads", "throttle", "throwException", "to", "toD", "tokenizer", "transacted", "transform", "transformDataType", "unmarshal", "validate", "wireTap" ], "deprecated": false, "autowired": false, "secret": false } } diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/idempotentConsumer.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/idempotentConsumer.json index 8166fe92613ba..fe7f765c2a764 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/idempotentConsumer.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/idempotentConsumer.json @@ -17,7 +17,7 @@ "note": { "index": 1, "kind": "attribute", "displayName": "Note", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The note for this node" }, "description": { "index": 2, "kind": "attribute", "displayName": "Description", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The description for this node" }, "disabled": { "index": 3, "kind": "attribute", "displayName": "Disabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to disable this EIP from the route during build time. Once an EIP has been disabled then it cannot be enabled later at runtime." }, - "expression": { "index": 4, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "The expression to compute the unique message ID used for duplicate detection. Messages with the same ID are treated as duplicates and skipped." }, + "expression": { "index": 4, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "python3", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "The expression to compute the unique message ID used for duplicate detection. Messages with the same ID are treated as duplicates and skipped." }, "idempotentRepository": { "index": 5, "kind": "attribute", "displayName": "Idempotent Repository", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.spi.IdempotentRepository", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the reference name of the message id repository to use for storing processed message ids to detect duplicates." }, "eager": { "index": 6, "kind": "attribute", "displayName": "Eager", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Sets whether to eagerly add the key to the idempotent repository or wait until the exchange is complete. Eager is default enabled." }, "completionEager": { "index": 7, "kind": "attribute", "displayName": "Completion Eager", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Sets whether to complete the idempotent consumer eager or when the exchange is done." }, diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/loop.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/loop.json index 9d96921332f67..7bef734b83910 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/loop.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/loop.json @@ -17,7 +17,7 @@ "note": { "index": 1, "kind": "attribute", "displayName": "Note", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The note for this node" }, "description": { "index": 2, "kind": "attribute", "displayName": "Description", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The description for this node" }, "disabled": { "index": 3, "kind": "attribute", "displayName": "Disabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to disable this EIP from the route during build time. Once an EIP has been disabled then it cannot be enabled later at runtime." }, - "expression": { "index": 4, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "The expression that determines the number of times to loop. The result is converted to an integer." }, + "expression": { "index": 4, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "python3", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "The expression that determines the number of times to loop. The result is converted to an integer." }, "copy": { "index": 5, "kind": "attribute", "displayName": "Copy", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "If enabled, a copy of the input Exchange is used for each iteration. That means each iteration will start from a copy of the same message." }, "doWhile": { "index": 6, "kind": "attribute", "displayName": "Do While", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Enables the while loop that loops until the predicate evaluates to false or null." }, "breakOnShutdown": { "index": 7, "kind": "attribute", "displayName": "Break On Shutdown", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "If enabled, the loop will not iterate until it reaches the end when Camel is shut down." }, diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/onException.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/onException.json index 64dfaee08fb55..1063517cde30c 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/onException.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/onException.json @@ -18,11 +18,11 @@ "disabled": { "index": 3, "kind": "attribute", "displayName": "Disabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to disable this EIP from the route during build time. Once an EIP has been disabled then it cannot be enabled later at runtime." }, "exception": { "index": 4, "kind": "element", "displayName": "Exception", "group": "common", "required": true, "type": "array", "javaType": "java.util.List", "deprecated": false, "autowired": false, "secret": false, "description": "A list of exception class names to catch and handle." }, "onWhen": { "index": 5, "kind": "element", "displayName": "On When", "group": "common", "required": false, "type": "object", "javaType": "org.apache.camel.model.OnWhenDefinition", "deprecated": false, "autowired": false, "secret": false, "asPredicate": true, "description": "To use an expression to only trigger this in specific situations" }, - "retryWhile": { "index": 6, "kind": "expression", "displayName": "Retry While", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.camel.model.ExpressionSubElementDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "asPredicate": true, "description": "Sets a predicate to control whether redelivery should continue. Redelivery continues as long as the predicate evaluates to true." }, + "retryWhile": { "index": 6, "kind": "expression", "displayName": "Retry While", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.camel.model.ExpressionSubElementDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "python3", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "asPredicate": true, "description": "Sets a predicate to control whether redelivery should continue. Redelivery continues as long as the predicate evaluates to true." }, "redeliveryPolicy": { "index": 7, "kind": "element", "displayName": "Redelivery Policy", "group": "common", "required": false, "type": "object", "javaType": "org.apache.camel.model.RedeliveryPolicyDefinition", "deprecated": false, "autowired": false, "secret": false, "description": "Configures redelivery options such as maximum redeliveries, delays, and logging behavior." }, "redeliveryPolicyRef": { "index": 8, "kind": "attribute", "displayName": "Redelivery Policy Ref", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets a reference to a redelivery policy to lookup in the registry to be used." }, - "handled": { "index": 9, "kind": "expression", "displayName": "Handled", "group": "common", "required": false, "type": "object", "javaType": "org.apache.camel.model.ExpressionSubElementDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "asPredicate": true, "description": "When handled is set to true, the exception is suppressed and not sent back to the caller. The original route stops at the point of failure and only the steps in this onException block execute. The response returned to the caller is whatever this onException block produces. Use continued instead if you want to resume the original route from the point of failure." }, - "continued": { "index": 10, "kind": "expression", "displayName": "Continued", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.camel.model.ExpressionSubElementDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "asPredicate": true, "description": "When continued is set to true, the exception is handled and routing continues from the point of failure. Unlike handled, which stops the original route and only runs the onException block, continued resumes the original route after the onException steps complete. The exception is considered handled as well." }, + "handled": { "index": 9, "kind": "expression", "displayName": "Handled", "group": "common", "required": false, "type": "object", "javaType": "org.apache.camel.model.ExpressionSubElementDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "python3", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "asPredicate": true, "description": "When handled is set to true, the exception is suppressed and not sent back to the caller. The original route stops at the point of failure and only the steps in this onException block execute. The response returned to the caller is whatever this onException block produces. Use continued instead if you want to resume the original route from the point of failure." }, + "continued": { "index": 10, "kind": "expression", "displayName": "Continued", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.camel.model.ExpressionSubElementDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "python3", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "asPredicate": true, "description": "When continued is set to true, the exception is handled and routing continues from the point of failure. Unlike handled, which stops the original route and only runs the onException block, continued resumes the original route after the onException steps complete. The exception is considered handled as well." }, "onRedeliveryRef": { "index": 11, "kind": "attribute", "displayName": "On Redelivery Ref", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets a reference to a processor that is invoked before each redelivery attempt. Can be used to change the exchange before it is redelivered." }, "onExceptionOccurredRef": { "index": 12, "kind": "attribute", "displayName": "On Exception Occurred Ref", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets a reference to a processor that is invoked just after an exception occurred. Can be used to perform custom logging. Any exception thrown from this processor is ignored." }, "useOriginalMessage": { "index": 13, "kind": "attribute", "displayName": "Use Original Message", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "If enabled, uses the original input message (body and headers) when the exchange is moved to the dead letter queue after all redelivery attempts have been exhausted. Cannot be used together with useOriginalBody." }, diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/onWhen.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/onWhen.json index 07c5614cfa334..8854df5d66f17 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/onWhen.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/onWhen.json @@ -15,6 +15,6 @@ "id": { "index": 0, "kind": "attribute", "displayName": "Id", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The id of this node" }, "note": { "index": 1, "kind": "attribute", "displayName": "Note", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The note for this node" }, "description": { "index": 2, "kind": "attribute", "displayName": "Description", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The description for this node" }, - "expression": { "index": 3, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "asPredicate": true, "description": "The predicate expression to evaluate." } + "expression": { "index": 3, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "python3", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "asPredicate": true, "description": "The predicate expression to evaluate." } } } diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/pollEnrich.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/pollEnrich.json index e77f4ca81c107..c6d81a550c0cb 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/pollEnrich.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/pollEnrich.json @@ -17,7 +17,7 @@ "note": { "index": 1, "kind": "attribute", "displayName": "Note", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The note for this node" }, "description": { "index": 2, "kind": "attribute", "displayName": "Description", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The description for this node" }, "disabled": { "index": 3, "kind": "attribute", "displayName": "Disabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to disable this EIP from the route during build time. Once an EIP has been disabled then it cannot be enabled later at runtime." }, - "expression": { "index": 4, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "The expression to compute the endpoint URI to poll-enrich from." }, + "expression": { "index": 4, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "python3", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "The expression to compute the endpoint URI to poll-enrich from." }, "variableReceive": { "index": 5, "kind": "attribute", "displayName": "Variable Receive", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "To use a variable to store the received message body (only body, not headers). This makes it handy to use variables for user data and to easily control what data to use for sending and receiving." }, "aggregationStrategy": { "index": 6, "kind": "attribute", "displayName": "Aggregation Strategy", "group": "common", "required": false, "type": "object", "javaType": "org.apache.camel.AggregationStrategy", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the AggregationStrategy to be used to merge the reply from the external service, into a single outgoing message. By default Camel will use the reply from the external service as outgoing message." }, "aggregationStrategyMethodName": { "index": 7, "kind": "attribute", "displayName": "Aggregation Strategy Method Name", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "This option can be used to explicitly declare the method name to use, when using POJOs as the AggregationStrategy." }, diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/predicateValidator.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/predicateValidator.json index 735c10490fa68..05463c1d00170 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/predicateValidator.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/predicateValidator.json @@ -12,7 +12,7 @@ "output": false }, "properties": { - "expression": { "index": 0, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "The predicate expression to use for validation." }, + "expression": { "index": 0, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "python3", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "The predicate expression to use for validation." }, "type": { "index": 1, "kind": "attribute", "displayName": "Type", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The data type name to validate. If you specify 'xml:XYZ', the validator is picked up when message type is 'xml:XYZ'. If you specify just 'xml', the validator matches all xml message types." } } } diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/propertyExpression.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/propertyExpression.json index 19ae449310e7a..5ddd39418b7e4 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/propertyExpression.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/propertyExpression.json @@ -13,6 +13,6 @@ }, "properties": { "key": { "index": 0, "kind": "attribute", "displayName": "Key", "group": "common", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The property key." }, - "expression": { "index": 1, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "The property value as an expression." } + "expression": { "index": 1, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "python3", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "The property value as an expression." } } } diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/python3.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/python3.json new file mode 100644 index 0000000000000..26cc6941c202f --- /dev/null +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/python3.json @@ -0,0 +1,21 @@ +{ + "model": { + "kind": "model", + "name": "python3", + "title": "Python 3", + "description": "Evaluates a Python 3 expression", + "deprecated": false, + "firstVersion": "4.23.0", + "label": "language,python", + "javaType": "org.apache.camel.model.language.Python3Expression", + "abstract": false, + "input": false, + "output": false + }, + "properties": { + "id": { "index": 0, "kind": "attribute", "displayName": "Id", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The id of this node." }, + "expression": { "index": 1, "kind": "value", "displayName": "Expression", "group": "common", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The expression value in your chosen language syntax." }, + "resultType": { "index": 2, "kind": "attribute", "displayName": "Result Type", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The class of the result type (type from output)." }, + "trim": { "index": 3, "kind": "attribute", "displayName": "Trim", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether to trim the source code to remove leading and trailing whitespaces and line breaks." } + } +} diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/recipientList.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/recipientList.json index 35fd3d2d77684..deb030f2a26b1 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/recipientList.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/recipientList.json @@ -16,7 +16,7 @@ "note": { "index": 1, "kind": "attribute", "displayName": "Note", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The note for this node" }, "description": { "index": 2, "kind": "attribute", "displayName": "Description", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The description for this node" }, "disabled": { "index": 3, "kind": "attribute", "displayName": "Disabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to disable this EIP from the route during build time. Once an EIP has been disabled then it cannot be enabled later at runtime." }, - "expression": { "index": 4, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "The expression to compute the list of recipient endpoint URIs. The result can be a comma-separated string, a Collection, or an Iterator of endpoint URIs." }, + "expression": { "index": 4, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "python3", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "The expression to compute the list of recipient endpoint URIs. The result can be a comma-separated string, a Collection, or an Iterator of endpoint URIs." }, "delimiter": { "index": 5, "kind": "attribute", "displayName": "Delimiter", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": ",", "description": "Delimiter used if the Expression returned multiple endpoints. Can be turned off using the value false." }, "aggregationStrategy": { "index": 6, "kind": "attribute", "displayName": "Aggregation Strategy", "group": "common", "required": false, "type": "object", "javaType": "org.apache.camel.AggregationStrategy", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the AggregationStrategy to be used to assemble the replies from the recipients, into a single outgoing message." }, "aggregationStrategyMethodName": { "index": 7, "kind": "attribute", "displayName": "Aggregation Strategy Method Name", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "This option can be used to explicitly declare the method name to use, when using POJOs as the AggregationStrategy." }, diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/resequence.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/resequence.json index 3d1b1361e6191..a84dfa727d2f1 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/resequence.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/resequence.json @@ -16,7 +16,7 @@ "note": { "index": 1, "kind": "attribute", "displayName": "Note", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The note for this node" }, "description": { "index": 2, "kind": "attribute", "displayName": "Description", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The description for this node" }, "disabled": { "index": 3, "kind": "attribute", "displayName": "Disabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to disable this EIP from the route during build time. Once an EIP has been disabled then it cannot be enabled later at runtime." }, - "expression": { "index": 4, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "Expression to use for re-ordering the messages, such as a header with a sequence number." }, + "expression": { "index": 4, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "python3", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "Expression to use for re-ordering the messages, such as a header with a sequence number." }, "resequencerConfig": { "index": 5, "kind": "element", "displayName": "Resequencer Config", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.config.ResequencerConfig", "oneOf": [ "batchConfig", "streamConfig" ], "deprecated": false, "autowired": false, "secret": false, "description": "Resequencer configuration using either batch or stream mode. Defaults to batch mode." }, "outputs": { "index": 6, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List", "oneOf": [ "a2aSubTask", "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "interceptSendToEndpoint", "kamelet", "loadBalance", "log", "loop", "marshal", "multicast", "onCompletion", "onException", "pausable", "pipeline", "policy", "poll", "pollEnrich", "process", "recipientList", "removeHeader", "removeHeaders", "removeProperties", "removeProperty", "removeVariable", "resequence", "resumable", "rollback", "routingSlip", "saga", "sample", "script", "setBody", "setExchangePattern", "setHeader", "setHeaders", "setProperty", "setVariable", "setVariables", "sort", "split", "step", "stop", "threads", "throttle", "throwException", "to", "toD", "tokenizer", "transacted", "transform", "transformDataType", "unmarshal", "validate", "wireTap" ], "deprecated": false, "autowired": false, "secret": false } } diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/routingSlip.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/routingSlip.json index 28c7302c27720..e3d381914e4a3 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/routingSlip.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/routingSlip.json @@ -16,7 +16,7 @@ "note": { "index": 1, "kind": "attribute", "displayName": "Note", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The note for this node" }, "description": { "index": 2, "kind": "attribute", "displayName": "Description", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The description for this node" }, "disabled": { "index": 3, "kind": "attribute", "displayName": "Disabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to disable this EIP from the route during build time. Once an EIP has been disabled then it cannot be enabled later at runtime." }, - "expression": { "index": 4, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "The expression to compute the routing slip of endpoint URIs. The result is a delimited list of endpoint URIs that defines the series of processing steps." }, + "expression": { "index": 4, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "python3", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "The expression to compute the routing slip of endpoint URIs. The result is a delimited list of endpoint URIs that defines the series of processing steps." }, "uriDelimiter": { "index": 5, "kind": "attribute", "displayName": "Uri Delimiter", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": ",", "description": "The delimiter used to separate endpoint URIs in the routing slip expression. Default is comma." }, "ignoreInvalidEndpoints": { "index": 6, "kind": "attribute", "displayName": "Ignore Invalid Endpoints", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "If enabled then invalid endpoint URIs are ignored and logged instead of throwing an exception." }, "cacheSize": { "index": 7, "kind": "attribute", "displayName": "Cache Size", "group": "advanced", "label": "advanced", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "description": "Configures the cache size for ProducerCache which caches producers for reuse. The default cache size is 1000. Set to -1 to turn off caching." }, diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/script.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/script.json index 84cf6061c67bb..1bd6bf8eca059 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/script.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/script.json @@ -16,6 +16,6 @@ "note": { "index": 1, "kind": "attribute", "displayName": "Note", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The note for this node" }, "description": { "index": 2, "kind": "attribute", "displayName": "Description", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The description for this node" }, "disabled": { "index": 3, "kind": "attribute", "displayName": "Disabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to disable this EIP from the route during build time. Once an EIP has been disabled then it cannot be enabled later at runtime." }, - "expression": { "index": 4, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "The expression to evaluate as a script. The script result does not change the message body (use transform instead if that is desired)." } + "expression": { "index": 4, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "python3", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "The expression to evaluate as a script. The script result does not change the message body (use transform instead if that is desired)." } } } diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/setBody.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/setBody.json index 7667afe71b141..e8a0f46685be9 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/setBody.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/setBody.json @@ -17,6 +17,6 @@ "note": { "index": 1, "kind": "attribute", "displayName": "Note", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The note for this node" }, "description": { "index": 2, "kind": "attribute", "displayName": "Description", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The description for this node" }, "disabled": { "index": 3, "kind": "attribute", "displayName": "Disabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to disable this EIP from the route during build time. Once an EIP has been disabled then it cannot be enabled later at runtime." }, - "expression": { "index": 4, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "The expression whose result is used as the new message body." } + "expression": { "index": 4, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "python3", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "The expression whose result is used as the new message body." } } } diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/setHeader.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/setHeader.json index e529220417b6b..731ce08b1f8bc 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/setHeader.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/setHeader.json @@ -17,6 +17,6 @@ "description": { "index": 2, "kind": "attribute", "displayName": "Description", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The description for this node" }, "disabled": { "index": 3, "kind": "attribute", "displayName": "Disabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to disable this EIP from the route during build time. Once an EIP has been disabled then it cannot be enabled later at runtime." }, "name": { "index": 4, "kind": "attribute", "displayName": "Name", "group": "common", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Name of message header to set a new value. The simple language can be used to define a dynamic evaluated header name. Otherwise a constant name will be used." }, - "expression": { "index": 5, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "The expression whose result is used as the header value." } + "expression": { "index": 5, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "python3", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "The expression whose result is used as the header value." } } } diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/setProperty.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/setProperty.json index 6d3f1ad4c3e66..597a5415bd752 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/setProperty.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/setProperty.json @@ -17,6 +17,6 @@ "description": { "index": 2, "kind": "attribute", "displayName": "Description", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The description for this node" }, "disabled": { "index": 3, "kind": "attribute", "displayName": "Disabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to disable this EIP from the route during build time. Once an EIP has been disabled then it cannot be enabled later at runtime." }, "name": { "index": 4, "kind": "attribute", "displayName": "Name", "group": "common", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Name of exchange property to set a new value. The simple language can be used to define a dynamic evaluated property name. Otherwise a constant name will be used." }, - "expression": { "index": 5, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "The expression whose result is used as the exchange property value." } + "expression": { "index": 5, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "python3", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "The expression whose result is used as the exchange property value." } } } diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/setVariable.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/setVariable.json index 04c1de1ba2298..5488ce47fb651 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/setVariable.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/setVariable.json @@ -17,6 +17,6 @@ "description": { "index": 2, "kind": "attribute", "displayName": "Description", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The description for this node" }, "disabled": { "index": 3, "kind": "attribute", "displayName": "Disabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to disable this EIP from the route during build time. Once an EIP has been disabled then it cannot be enabled later at runtime." }, "name": { "index": 4, "kind": "attribute", "displayName": "Name", "group": "common", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Name of variable to set a new value. The simple language can be used to define a dynamic evaluated variable name. Otherwise a constant name will be used." }, - "expression": { "index": 5, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "The expression whose result is used as the variable value." } + "expression": { "index": 5, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "python3", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "The expression whose result is used as the variable value." } } } diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/sort.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/sort.json index 6325ce79c1043..5d9ce495bb10b 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/sort.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/sort.json @@ -16,7 +16,7 @@ "note": { "index": 1, "kind": "attribute", "displayName": "Note", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The note for this node" }, "description": { "index": 2, "kind": "attribute", "displayName": "Description", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The description for this node" }, "disabled": { "index": 3, "kind": "attribute", "displayName": "Disabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to disable this EIP from the route during build time. Once an EIP has been disabled then it cannot be enabled later at runtime." }, - "expression": { "index": 4, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "The expression to use for sorting. The message body is split into a list, sorted using this expression as the comparator key, and then reassembled." }, + "expression": { "index": 4, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "python3", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "The expression to use for sorting. The message body is split into a list, sorted using this expression as the comparator key, and then reassembled." }, "comparator": { "index": 5, "kind": "attribute", "displayName": "Comparator", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "java.util.Comparator", "deprecated": false, "autowired": false, "secret": false, "description": "Sets a reference to lookup for the comparator to use for sorting." } } } diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/split.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/split.json index 52eef2d800759..970ae07c3dcc0 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/split.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/split.json @@ -17,7 +17,7 @@ "note": { "index": 1, "kind": "attribute", "displayName": "Note", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The note for this node" }, "description": { "index": 2, "kind": "attribute", "displayName": "Description", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The description for this node" }, "disabled": { "index": 3, "kind": "attribute", "displayName": "Disabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to disable this EIP from the route during build time. Once an EIP has been disabled then it cannot be enabled later at runtime." }, - "expression": { "index": 4, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "The expression that returns the value to use for splitting. The result can be an Iterator, Iterable, Array, Collection, Map, NodeList, or a delimited String." }, + "expression": { "index": 4, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "python3", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "The expression that returns the value to use for splitting. The result can be an Iterator, Iterable, Array, Collection, Map, NodeList, or a delimited String." }, "delimiter": { "index": 5, "kind": "attribute", "displayName": "Delimiter", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": ",", "description": "Delimiter used in splitting messages. Can be turned off using the value false. To force not splitting then the delimiter can be set to single to use the value as a single list. The default value is comma." }, "aggregationStrategy": { "index": 6, "kind": "attribute", "displayName": "Aggregation Strategy", "group": "common", "required": false, "type": "object", "javaType": "org.apache.camel.AggregationStrategy", "deprecated": false, "autowired": false, "secret": false, "description": "Reference to the AggregationStrategy to assemble the replies from the split messages into a single outgoing message. By default Camel uses the original incoming message." }, "aggregationStrategyMethodName": { "index": 7, "kind": "attribute", "displayName": "Aggregation Strategy Method Name", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The method name to use when using a POJO as the AggregationStrategy." }, diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/stickyLoadBalancer.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/stickyLoadBalancer.json index 4bfca666b9d94..3d5c678a49d3a 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/stickyLoadBalancer.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/stickyLoadBalancer.json @@ -13,6 +13,6 @@ }, "properties": { "id": { "index": 0, "kind": "attribute", "displayName": "Id", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The id of this node" }, - "correlationExpression": { "index": 1, "kind": "expression", "displayName": "Correlation Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.ExpressionSubElementDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "The correlation expression to use to calculate the correlation key." } + "correlationExpression": { "index": 1, "kind": "expression", "displayName": "Correlation Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.ExpressionSubElementDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "python3", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "The correlation expression to use to calculate the correlation key." } } } diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/throttle.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/throttle.json index 7f3f7c65fb832..c985030154cf9 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/throttle.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/throttle.json @@ -17,9 +17,9 @@ "note": { "index": 1, "kind": "attribute", "displayName": "Note", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The note for this node" }, "description": { "index": 2, "kind": "attribute", "displayName": "Description", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The description for this node" }, "disabled": { "index": 3, "kind": "attribute", "displayName": "Disabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to disable this EIP from the route during build time. Once an EIP has been disabled then it cannot be enabled later at runtime." }, - "expression": { "index": 4, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "The expression to set the maximum request count (for TotalRequests mode) or the maximum number of concurrent requests (for ConcurrentRequests mode)." }, + "expression": { "index": 4, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "python3", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "The expression to set the maximum request count (for TotalRequests mode) or the maximum number of concurrent requests (for ConcurrentRequests mode)." }, "mode": { "index": 5, "kind": "attribute", "displayName": "Mode", "group": "common", "required": false, "type": "enum", "javaType": "org.apache.camel.model.ThrottlingMode", "enum": [ "TotalRequests", "ConcurrentRequests" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "TotalRequests", "description": "Sets the throttling mode. TotalRequests limits the total number of requests within a time period. ConcurrentRequests uses a leaky-bucket algorithm to limit the number of concurrent requests being processed at the same time." }, - "correlationExpression": { "index": 6, "kind": "expression", "displayName": "Correlation Expression", "group": "common", "required": false, "type": "object", "javaType": "org.apache.camel.model.ExpressionSubElementDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "The correlation expression to use for throttle grouping. Exchanges with the same correlation key are throttled together." }, + "correlationExpression": { "index": 6, "kind": "expression", "displayName": "Correlation Expression", "group": "common", "required": false, "type": "object", "javaType": "org.apache.camel.model.ExpressionSubElementDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "python3", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "The correlation expression to use for throttle grouping. Exchanges with the same correlation key are throttled together." }, "executorService": { "index": 7, "kind": "attribute", "displayName": "Executor Service", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "java.util.concurrent.ExecutorService", "deprecated": false, "autowired": false, "secret": false, "description": "To use a custom thread pool (ScheduledExecutorService) by the throttler." }, "asyncDelayed": { "index": 8, "kind": "attribute", "displayName": "Async Delayed", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Enables asynchronous delay which means the thread will not block while delaying." }, "callerRunsWhenRejected": { "index": 9, "kind": "attribute", "displayName": "Caller Runs When Rejected", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether or not the caller should run the task when it was rejected by the thread pool." }, diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/transform.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/transform.json index 8bab988217447..f98d51196bef4 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/transform.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/transform.json @@ -17,6 +17,6 @@ "note": { "index": 1, "kind": "attribute", "displayName": "Note", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The note for this node" }, "description": { "index": 2, "kind": "attribute", "displayName": "Description", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The description for this node" }, "disabled": { "index": 3, "kind": "attribute", "displayName": "Disabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to disable this EIP from the route during build time. Once an EIP has been disabled then it cannot be enabled later at runtime." }, - "expression": { "index": 4, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "The expression whose result replaces the message body." } + "expression": { "index": 4, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "python3", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "The expression whose result replaces the message body." } } } diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/validate.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/validate.json index 0db92cd804ff3..53c0916a9afcf 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/validate.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/validate.json @@ -17,7 +17,7 @@ "note": { "index": 1, "kind": "attribute", "displayName": "Note", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The note for this node" }, "description": { "index": 2, "kind": "attribute", "displayName": "Description", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The description for this node" }, "disabled": { "index": 3, "kind": "attribute", "displayName": "Disabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to disable this EIP from the route during build time. Once an EIP has been disabled then it cannot be enabled later at runtime." }, - "expression": { "index": 4, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "asPredicate": true, "description": "The predicate expression to validate against the current message. If the predicate returns false, a PredicateValidationException is thrown." }, + "expression": { "index": 4, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "python3", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "asPredicate": true, "description": "The predicate expression to validate against the current message. If the predicate returns false, a PredicateValidationException is thrown." }, "predicateExceptionFactory": { "index": 5, "kind": "attribute", "displayName": "Predicate Exception Factory", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.camel.spi.PredicateExceptionFactory", "deprecated": false, "autowired": false, "secret": false, "description": "Reference to a custom PredicateExceptionFactory for creating the exception when validation fails." } } } diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/when.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/when.json index 0e73fbef4864b..64464cfe06f6f 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/when.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/when.json @@ -16,7 +16,7 @@ "note": { "index": 1, "kind": "attribute", "displayName": "Note", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The note for this node" }, "description": { "index": 2, "kind": "attribute", "displayName": "Description", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The description for this node" }, "disabled": { "index": 3, "kind": "attribute", "displayName": "Disabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Disables this EIP from the route." }, - "expression": { "index": 4, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "asPredicate": true, "description": "Expression used as the predicate to evaluate whether this when should trigger and route the message or not." }, + "expression": { "index": 4, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "python3", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "asPredicate": true, "description": "Expression used as the predicate to evaluate whether this when should trigger and route the message or not." }, "outputs": { "index": 5, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List>", "oneOf": [ "a2aSubTask", "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "interceptSendToEndpoint", "kamelet", "loadBalance", "log", "loop", "marshal", "multicast", "onCompletion", "onException", "pausable", "pipeline", "policy", "poll", "pollEnrich", "process", "recipientList", "removeHeader", "removeHeaders", "removeProperties", "removeProperty", "removeVariable", "resequence", "resumable", "rollback", "routingSlip", "saga", "sample", "script", "setBody", "setExchangePattern", "setHeader", "setHeaders", "setProperty", "setVariable", "setVariables", "sort", "split", "step", "stop", "threads", "throttle", "throwException", "to", "toD", "tokenizer", "transacted", "transform", "transformDataType", "unmarshal", "validate", "wireTap" ], "deprecated": false, "autowired": false, "secret": false } } } 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 281a50919d5df..76dbf4104e4ec 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 @@ -1355,6 +1355,15 @@ Defines an HTTP PUT operation in the REST DSL + + + + + + + @@ -3627,6 +3636,7 @@ ensuring the aggregation repository is empty before shutdown. Default value: fal + @@ -4026,6 +4036,7 @@ The exception class names (fully qualified) to catch. + @@ -4083,6 +4094,7 @@ placeholders or simple expressions using only property placeholders are supporte + @@ -5124,6 +5136,7 @@ To use a specific charset when converting. + @@ -5187,6 +5200,7 @@ To use a custom thread pool if asyncDelay has been enabled. + @@ -5263,6 +5277,7 @@ restriction, useful for low-code / Kamelet deployments; by default (unset) any s + @@ -5885,6 +5900,7 @@ The logging level to use for logging transactional rollback. Default is WARN. De + @@ -6138,6 +6154,7 @@ Global option value. + @@ -6928,6 +6945,7 @@ The language to use for evaluating the log message, such as simple, groovy, or o + @@ -11430,6 +11448,7 @@ Timeout in millis when polling from the external service. The default value is 2 + @@ -11595,6 +11614,7 @@ control how the processor is obtained. + @@ -11638,6 +11658,7 @@ The property key. + @@ -11941,6 +11962,7 @@ Name of the variable to remove. + @@ -12640,6 +12662,7 @@ Description of the template parameter for documentation purposes. + @@ -12894,6 +12917,7 @@ The frequency of samples as a message count, using a message-frequency approach. + @@ -12946,6 +12970,7 @@ The uri of the endpoint to send to. + @@ -12998,6 +13023,7 @@ The new exchange pattern to use from this point forward. + @@ -13053,6 +13079,7 @@ Otherwise a constant name will be used. + @@ -13099,6 +13126,7 @@ name. Otherwise a constant name will be used. + @@ -13154,6 +13182,7 @@ Otherwise a constant name will be used. + @@ -13200,6 +13229,7 @@ Sets a reference to lookup for the comparator to use for sorting. + @@ -13861,6 +13891,7 @@ handler. Default value: true + @@ -14344,6 +14375,7 @@ into. + @@ -14549,6 +14581,7 @@ Indicates whether null is allowed as value of a body to unmarshall. Default valu + @@ -16239,6 +16272,11 @@ Whether to validate the bean has the configured method. Default value: true + + + + + @@ -16956,6 +16994,7 @@ URI of the Endpoint used for validation. + diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-xml-io.xsd b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-xml-io.xsd index 1a4ccf14fe360..4444c3f65e2b2 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-xml-io.xsd +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-xml-io.xsd @@ -1265,6 +1265,15 @@ Defines an HTTP PUT operation in the REST DSL + + + + + + + @@ -2737,6 +2746,7 @@ ensuring the aggregation repository is empty before shutdown. Default value: fal + @@ -3136,6 +3146,7 @@ The exception class names (fully qualified) to catch. + @@ -3193,6 +3204,7 @@ placeholders or simple expressions using only property placeholders are supporte + @@ -4246,6 +4258,7 @@ To use a specific charset when converting. + @@ -4309,6 +4322,7 @@ To use a custom thread pool if asyncDelay has been enabled. + @@ -4385,6 +4399,7 @@ restriction, useful for low-code / Kamelet deployments; by default (unset) any s + @@ -5007,6 +5022,7 @@ The logging level to use for logging transactional rollback. Default is WARN. De + @@ -5260,6 +5276,7 @@ Global option value. + @@ -6050,6 +6067,7 @@ The language to use for evaluating the log message, such as simple, groovy, or o + @@ -10552,6 +10570,7 @@ Timeout in millis when polling from the external service. The default value is 2 + @@ -10738,6 +10757,7 @@ The property value. + @@ -10781,6 +10801,7 @@ The property key. + @@ -11084,6 +11105,7 @@ Name of the variable to remove. + @@ -11783,6 +11805,7 @@ Description of the template parameter for documentation purposes. + @@ -12037,6 +12060,7 @@ The frequency of samples as a message count, using a message-frequency approach. + @@ -12089,6 +12113,7 @@ The uri of the endpoint to send to. + @@ -12141,6 +12166,7 @@ The new exchange pattern to use from this point forward. + @@ -12196,6 +12222,7 @@ Otherwise a constant name will be used. + @@ -12242,6 +12269,7 @@ name. Otherwise a constant name will be used. + @@ -12297,6 +12325,7 @@ Otherwise a constant name will be used. + @@ -12343,6 +12372,7 @@ Sets a reference to lookup for the comparator to use for sorting. + @@ -13004,6 +13034,7 @@ handler. Default value: true + @@ -13487,6 +13518,7 @@ into. + @@ -13692,6 +13724,7 @@ Indicates whether null is allowed as value of a body to unmarshall. Default valu + @@ -15382,6 +15415,11 @@ Whether to validate the bean has the configured method. Default value: true + + + + + @@ -16099,6 +16137,7 @@ URI of the Endpoint used for validation. + diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camelYamlDsl-model.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camelYamlDsl-model.json index 2d6259e526405..48439854bdbf6 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camelYamlDsl-model.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camelYamlDsl-model.json @@ -717,6 +717,13 @@ "title" : "Python", "description" : "Evaluates a Python expression", "label" : "language,python" + }, { + "name" : "python3", + "type" : "object", + "ref" : "python3", + "title" : "Python 3", + "description" : "Evaluates a Python 3 expression", + "label" : "language,python" }, { "name" : "ref", "type" : "object", @@ -2652,6 +2659,10 @@ "name" : "python", "type" : "object", "ref" : "python" + }, { + "name" : "python3", + "type" : "object", + "ref" : "python3" }, { "name" : "ref", "type" : "object", @@ -15495,6 +15506,51 @@ "label" : "advanced" } ] }, + "python3" : { + "title" : "Python 3", + "description" : "Evaluates a Python 3 expression", + "label" : "language,python", + "children" : [ { + "name" : "id", + "type" : "string", + "description" : "The id of this node.", + "title" : "Id", + "displayName" : "Id", + "kind" : "attribute", + "index" : 0, + "group" : "common" + }, { + "name" : "expression", + "type" : "string", + "description" : "The expression value in your chosen language syntax.", + "title" : "Expression", + "required" : true, + "displayName" : "Expression", + "kind" : "value", + "index" : 1, + "group" : "common" + }, { + "name" : "resultType", + "type" : "string", + "description" : "The class of the result type (type from output).", + "title" : "Result Type", + "displayName" : "Result Type", + "kind" : "attribute", + "index" : 2, + "group" : "common" + }, { + "name" : "trim", + "type" : "boolean", + "description" : "Whether to trim the source code to remove leading and trailing whitespaces and line breaks.", + "title" : "Trim", + "default" : "true", + "displayName" : "Trim", + "kind" : "attribute", + "index" : 3, + "group" : "advanced", + "label" : "advanced" + } ] + }, "python" : { "title" : "Python", "description" : "Evaluates a Python expression", diff --git a/components/camel-javascript/pom.xml b/components/camel-javascript/pom.xml index 5246519c3d9c8..30e2235d32f66 100644 --- a/components/camel-javascript/pom.xml +++ b/components/camel-javascript/pom.xml @@ -47,7 +47,7 @@ org.graalvm.js js-language - ${graaljs-version} + ${graalvm-version} diff --git a/components/camel-language/src/generated/resources/META-INF/org/apache/camel/component/language/language.json b/components/camel-language/src/generated/resources/META-INF/org/apache/camel/component/language/language.json index 4b363e8691111..7acbd33670283 100644 --- a/components/camel-language/src/generated/resources/META-INF/org/apache/camel/component/language/language.json +++ b/components/camel-language/src/generated/resources/META-INF/org/apache/camel/component/language/language.json @@ -33,7 +33,7 @@ "CamelLanguageScript": { "index": 0, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String or Expression", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The script to execute provided in the header. Takes precedence over script configured on the endpoint.", "constantName": "org.apache.camel.component.language.LanguageConstants#LANGUAGE_SCRIPT" } }, "properties": { - "languageName": { "index": 0, "kind": "path", "displayName": "Language Name", "group": "producer", "label": "", "required": true, "type": "enum", "javaType": "java.lang.String", "enum": [ "bean", "constant", "csimple", "datasonnet", "exchangeProperty", "file", "groovy", "header", "hl7terser", "java", "joor", "jq", "js", "jsonpath", "mvel", "ognl", "python", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Sets the name of the language to use" }, + "languageName": { "index": 0, "kind": "path", "displayName": "Language Name", "group": "producer", "label": "", "required": true, "type": "enum", "javaType": "java.lang.String", "enum": [ "bean", "constant", "csimple", "datasonnet", "exchangeProperty", "file", "groovy", "header", "hl7terser", "java", "joor", "jq", "js", "jsonpath", "mvel", "ognl", "python", "python3", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Sets the name of the language to use" }, "resourceUri": { "index": 1, "kind": "path", "displayName": "Resource Uri", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "supportFileReference": true, "description": "Path to the resource, or a reference to lookup a bean in the Registry to use as the resource" }, "allowContextMapAll": { "index": 2, "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 CamelContext. Doing so impose a potential security risk as this opens access to the full power of CamelContext API." }, "allowTemplateFromHeader": { "index": 3, "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 security vulnerability if the header is coming from a malicious user, so use this with care." }, diff --git a/components/camel-language/src/main/java/org/apache/camel/component/language/LanguageEndpoint.java b/components/camel-language/src/main/java/org/apache/camel/component/language/LanguageEndpoint.java index d92116d0a0312..1a821c91ad201 100644 --- a/components/camel-language/src/main/java/org/apache/camel/component/language/LanguageEndpoint.java +++ b/components/camel-language/src/main/java/org/apache/camel/component/language/LanguageEndpoint.java @@ -56,7 +56,7 @@ public class LanguageEndpoint extends ResourceEndpoint { private boolean contentResolvedFromResource; @UriPath(enums = "bean,constant,csimple,datasonnet,exchangeProperty,file,groovy,header,hl7terser,java,joor,jq,js,jsonpath" - + ",mvel,ognl,python,ref,simple,spel,tokenize,variable,wasm,xpath,xquery,xtokenize") + + ",mvel,ognl,python,python3,ref,simple,spel,tokenize,variable,wasm,xpath,xquery,xtokenize") @Metadata(required = true) private String languageName; // resourceUri is optional in the language endpoint diff --git a/components/camel-python3/pom.xml b/components/camel-python3/pom.xml new file mode 100644 index 0000000000000..3b171910f40f4 --- /dev/null +++ b/components/camel-python3/pom.xml @@ -0,0 +1,83 @@ + + + + 4.0.0 + + + org.apache.camel + components + 4.23.0-SNAPSHOT + + + camel-python3 + jar + Camel :: Python 3 + Camel Python 3 language (GraalPy) + + + Preview + true + true + + --enable-native-access=ALL-UNNAMED + + + + + org.apache.camel + camel-support + + + org.graalvm.polyglot + polyglot + ${graalvm-version} + + + org.graalvm.polyglot + python + ${graalvm-version} + pom + + + + + org.apache.camel + camel-test-junit6 + test + + + org.junit.jupiter + junit-jupiter + test + + + org.apache.camel + camel-core + test-jar + test + + + org.assertj + assertj-core + test + + + + diff --git a/components/camel-python3/src/generated/resources/META-INF/org/apache/camel/language/python3/python3.json b/components/camel-python3/src/generated/resources/META-INF/org/apache/camel/language/python3/python3.json new file mode 100644 index 0000000000000..ac0119c0fc138 --- /dev/null +++ b/components/camel-python3/src/generated/resources/META-INF/org/apache/camel/language/python3/python3.json @@ -0,0 +1,24 @@ +{ + "language": { + "kind": "language", + "name": "python3", + "title": "Python 3", + "description": "Evaluates a Python 3 expression", + "deprecated": false, + "firstVersion": "4.23.0", + "label": "language,python", + "javaType": "org.apache.camel.language.python3.Python3Language", + "supportLevel": "Preview", + "groupId": "org.apache.camel", + "artifactId": "camel-python3", + "version": "4.23.0-SNAPSHOT", + "modelName": "python3", + "modelJavaType": "org.apache.camel.model.language.Python3Expression" + }, + "properties": { + "id": { "index": 0, "kind": "attribute", "displayName": "Id", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The id of this node." }, + "expression": { "index": 1, "kind": "value", "displayName": "Expression", "group": "common", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The expression value in your chosen language syntax." }, + "resultType": { "index": 2, "kind": "attribute", "displayName": "Result Type", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The class of the result type (type from output)." }, + "trim": { "index": 3, "kind": "attribute", "displayName": "Trim", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether to trim the source code to remove leading and trailing whitespaces and line breaks." } + } +} diff --git a/components/camel-python3/src/generated/resources/META-INF/services/org/apache/camel/language.properties b/components/camel-python3/src/generated/resources/META-INF/services/org/apache/camel/language.properties new file mode 100644 index 0000000000000..2bfb675336bc3 --- /dev/null +++ b/components/camel-python3/src/generated/resources/META-INF/services/org/apache/camel/language.properties @@ -0,0 +1,7 @@ +# Generated by camel build tools - do NOT edit this file! +languages=python3 +groupId=org.apache.camel +artifactId=camel-python3 +version=4.23.0-SNAPSHOT +projectName=Camel :: Python 3 +projectDescription=Camel Python 3 language (GraalPy) diff --git a/components/camel-python3/src/generated/resources/META-INF/services/org/apache/camel/language/python3 b/components/camel-python3/src/generated/resources/META-INF/services/org/apache/camel/language/python3 new file mode 100644 index 0000000000000..9c6734d504cac --- /dev/null +++ b/components/camel-python3/src/generated/resources/META-INF/services/org/apache/camel/language/python3 @@ -0,0 +1,2 @@ +# Generated by camel build tools - do NOT edit this file! +class=org.apache.camel.language.python3.Python3Language diff --git a/components/camel-python3/src/main/docs/python3-language.adoc b/components/camel-python3/src/main/docs/python3-language.adoc new file mode 100644 index 0000000000000..b30207296c2d3 --- /dev/null +++ b/components/camel-python3/src/main/docs/python3-language.adoc @@ -0,0 +1,159 @@ += Python 3 Language +:doctitle: Python 3 +:shortname: python3 +:artifactid: camel-python3 +:description: Evaluates a Python 3 expression +:since: 4.23 +:supportlevel: Preview +:tabs-sync-option: + +*Since Camel {since}* + +Camel allows https://www.graalvm.org/python/[Python 3] (GraalPy) to be +used as an xref:manual::expression.adoc[Expression] or xref:manual::predicate.adoc[Predicate] +in Camel routes. + +This language is distinct from xref:python-language.adoc[Python], which uses Jython and is limited to Python 2.7. + +For example, you can use Python 3 in a xref:manual::predicate.adoc[Predicate] +with the xref:eips:choice-eip.adoc[Content-Based Router] EIP. + +== Python 3 Options + +// language options: START +include::partial$language-options.adoc[] +// language options: END + +== Variables + +The following variables are bound by default: + +[width="100%",cols="10%,10%,80%",options="header",] +|======================================================================= +|Variable |Type |Description +|body |Object |the message body +|headers |Map |the message headers +|properties |Map |the exchange properties +|exchangeId |String |the exchange id +|======================================================================= + +By default, Python can index Java maps and lists (for example `headers['foo']`) +but cannot invoke methods on host objects. + +`message`, `exchange`, and `context` are not bound in default mode. Scripts that +refer to them raise a Python `NameError`. Those variables are available only when +you opt in to trusted host access, as described in <<_trusted_host_access>>. + +== Security + +The default GraalPy context does **not** use `HostAccess.ALL` or `allowAllAccess(true)`. +Host method calls on bound objects are denied unless you opt in. + +`SandboxPolicy.CONSTRAINED` was evaluated and is **not** the default: it rejects the Java +`Map` host access needed for `headers['foo']` and requires redirecting stdout/stderr on both +the engine and the context. Primitive-only scripts can use it in a custom `Python3Language`. + +The GraalPy context sets `python.PosixModuleBackend` to `java`, so POSIX operations are +backed by Java file and system APIs. File I/O, process creation, and socket operations +remain restricted because IO is not enabled (`allowIO` is false). That setting is **not** +a hard security sandbox. HostAccess restrictions are the security boundary. + +=== Trusted host access + +To allow Python to call public methods on host objects, and to expose Camel host +objects as variables, bind a language created with `createWithHostAccess()` before +the first usage. + +This is a trusted host-access mode, **not** a sandbox. `HostAccess.ALL` lets Python +call public methods and fields on bound Java objects. It does **not** enable +`allowAllAccess`, Java class lookup, host IO, or process creation. Use it only when +you trust the scripts. + +[WARNING] +==== +Trusted host access lets Python call public methods on bound Camel objects such as +`context`, `exchange`, and `message`. That includes destructive operations, for +example `context.stop()`, `context.getRegistry().bind(...)`, and +`exchange.getContext().getExecutorService(...)`. Enable this mode only for fully +trusted scripts. Do not use it with Python code taken from untrusted or external +input. +==== + +In this mode the default variables above remain available, plus: + +[width="100%",cols="10%,10%,80%",options="header",] +|======================================================================= +|Variable |Type |Description +|message |Message |the message +|exchange |Exchange |the Exchange +|context |CamelContext |the CamelContext +|======================================================================= + +[source,java] +---- +Python3Language python3 = Python3Language.createWithHostAccess(); +camelContext.getRegistry().bind("python3", python3); +---- + +== Usage + +[source,java] +---- +import static org.apache.camel.language.python3.Python3Language.python3; + +public class MyRouteBuilder extends RouteBuilder { + @Override + public void configure() { + from("direct:start") + .choice() + .when().python3("body == 'Hello'").to("mock:hello") + .otherwise().to("mock:other"); + } +} +---- + +Python 3 syntax is supported, including f-strings: + +[source,python] +---- +f'Hello {body}' +---- + +You can load the script from an external resource with the +`resource:scheme:location` syntax, for example `resource:classpath:myscript.py` +or `resource:file:/path/to/script.py`. + +[WARNING] +==== +Do not derive `resource:classpath:` or `resource:file:` paths from untrusted +input such as message headers or query parameters. A path taken from untrusted +data can cause Camel to load and evaluate an unexpected Python script. +==== + +== Dependencies + +To use Python 3 in your Camel routes, you need to add the dependency on +*camel-python3*, which implements the Python 3 language with GraalPy. + +The GraalPy runtime (language + standard library + Truffle) is large, on the order of +100+ MB of JARs. That is expected for embedding CPython-compatible Python 3 on the JVM. + +If you use Maven, you could add the following to your `pom.xml`, +substituting the version number for the latest release. + +[source,xml] +---- + + org.apache.camel + camel-python3 + x.x.x + +---- + +GraalPy 25.x embeds CPython 3.12. On JDK 17 it typically runs in interpreter-only mode; +on JDK 21+ and on a GraalVM JDK it can use the optimizing runtime. On JDK 24+ you may +need `--enable-native-access=ALL-UNNAMED` (the unit tests already set this). +GraalPy is skipped on `s390x` and `ppc64le` in the same way as camel-javascript. + +GraalPy is licensed under MIT, the Python Software Foundation License, and the Universal +Permissive License (UPL), which are ASF Category A licenses. diff --git a/components/camel-python3/src/main/java/org/apache/camel/language/python3/Python3.java b/components/camel-python3/src/main/java/org/apache/camel/language/python3/Python3.java new file mode 100644 index 0000000000000..1bfe034d0fc01 --- /dev/null +++ b/components/camel-python3/src/main/java/org/apache/camel/language/python3/Python3.java @@ -0,0 +1,36 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.language.python3; + +import java.lang.annotation.Documented; +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +import org.apache.camel.support.language.LanguageAnnotation; + +/** + * An annotation for injection of Python 3 expressions into method parameters, fields or properties. + */ +@Retention(RetentionPolicy.RUNTIME) +@Documented +@Target({ ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER }) +@LanguageAnnotation(language = "python3") +public @interface Python3 { + String value(); +} diff --git a/components/camel-python3/src/main/java/org/apache/camel/language/python3/Python3Expression.java b/components/camel-python3/src/main/java/org/apache/camel/language/python3/Python3Expression.java new file mode 100644 index 0000000000000..4957785bc0fc1 --- /dev/null +++ b/components/camel-python3/src/main/java/org/apache/camel/language/python3/Python3Expression.java @@ -0,0 +1,53 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.language.python3; + +import org.apache.camel.Exchange; +import org.apache.camel.support.ExpressionAdapter; + +/** + * A Python 3 script usable as both a Camel {@link org.apache.camel.Expression} and {@link org.apache.camel.Predicate}. + */ +public class Python3Expression extends ExpressionAdapter { + + private final String text; + private volatile Python3Language language; + + public Python3Expression(String text) { + this(text, null); + } + + Python3Expression(String text, Python3Language language) { + this.text = text; + this.language = language; + } + + @Override + public Object evaluate(Exchange exchange) { + Python3Language lang = language; + if (lang == null) { + lang = (Python3Language) exchange.getContext().resolveLanguage("python3"); + language = lang; + } + return lang.evaluateExpression(text, exchange); + } + + @Override + public String toString() { + return "python3: " + text; + } +} diff --git a/components/camel-python3/src/main/java/org/apache/camel/language/python3/Python3Helper.java b/components/camel-python3/src/main/java/org/apache/camel/language/python3/Python3Helper.java new file mode 100644 index 0000000000000..7b98fbfad8c2e --- /dev/null +++ b/components/camel-python3/src/main/java/org/apache/camel/language/python3/Python3Helper.java @@ -0,0 +1,66 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.language.python3; + +import org.graalvm.polyglot.Context; +import org.graalvm.polyglot.Engine; +import org.graalvm.polyglot.HostAccess; +import org.graalvm.polyglot.PolyglotAccess; + +/** + * Factory for GraalPy {@link Engine} and {@link Context} used by the Python 3 language. + */ +public final class Python3Helper { + + private Python3Helper() { + } + + /** + * Host access that lets Python index Java {@link java.util.Map} and {@link java.util.List} values (headers, + * properties, body collections) without allowing arbitrary host method invocation. Does not use + * {@link HostAccess#ALL} or {@code allowAllAccess}. + */ + public static HostAccess defaultHostAccess() { + return HostAccess.newBuilder() + .allowMapAccess(true) + .allowListAccess(true) + .allowArrayAccess(true) + .allowIterableAccess(true) + .allowIteratorAccess(true) + .build(); + } + + public static Engine newEngine() { + return Engine.newBuilder("python") + .option("engine.WarnInterpreterOnly", "false") + .build(); + } + + /** + * Builds a per-eval context. Intentionally does not call {@code allowAllAccess}, {@code allowHostClassLookup}, + * {@code allowIO}, or {@code allowCreateProcess}. {@code HostAccess.ALL} (trusted mode) only unlocks public members + * of already-bound host objects; it is not a sandbox and does not grant class lookup or IO. + */ + public static Context newContext(Engine engine, HostAccess hostAccess) { + return Context.newBuilder("python") + .engine(engine) + .allowHostAccess(hostAccess) + .allowPolyglotAccess(PolyglotAccess.NONE) + .option("python.PosixModuleBackend", "java") + .build(); + } +} diff --git a/components/camel-python3/src/main/java/org/apache/camel/language/python3/Python3Language.java b/components/camel-python3/src/main/java/org/apache/camel/language/python3/Python3Language.java new file mode 100644 index 0000000000000..695dd08d95821 --- /dev/null +++ b/components/camel-python3/src/main/java/org/apache/camel/language/python3/Python3Language.java @@ -0,0 +1,382 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.language.python3; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.concurrent.locks.Lock; +import java.util.concurrent.locks.ReentrantLock; + +import org.apache.camel.CamelContext; +import org.apache.camel.Exchange; +import org.apache.camel.Expression; +import org.apache.camel.ExpressionEvaluationException; +import org.apache.camel.ExpressionIllegalSyntaxException; +import org.apache.camel.Predicate; +import org.apache.camel.RuntimeCamelException; +import org.apache.camel.Service; +import org.apache.camel.spi.ScriptingLanguage; +import org.apache.camel.spi.annotations.Language; +import org.apache.camel.support.LRUCacheFactory; +import org.apache.camel.support.TypedLanguageSupport; +import org.graalvm.polyglot.Context; +import org.graalvm.polyglot.Engine; +import org.graalvm.polyglot.HostAccess; +import org.graalvm.polyglot.PolyglotException; +import org.graalvm.polyglot.Source; +import org.graalvm.polyglot.Value; + +/** + * Camel expression language for Python 3 via GraalPy. + * + *

+ * Default scripts see only data bindings: {@code body}, {@code headers}, {@code properties}, and {@code exchangeId}. + * {@code exchange}, {@code message}, and {@code context} are intentionally absent so they resolve as Python + * {@code NameError} rather than opaque objects with no usable API. Binding them by default would also become a + * privilege escalation if host access were later widened. + *

+ * + *

+ * By default, Python may index Java maps and lists (so {@code headers['foo']} works) but cannot invoke methods on host + * objects. To allow host method calls on Exchange/Message/CamelContext, bind a language created with + * {@link #createWithHostAccess()} before first use: + *

+ * + *
+ * Python3Language python3 = Python3Language.createWithHostAccess();
+ * camelContext.getRegistry().bind("python3", python3);
+ * 
+ */ +@Language("python3") +public class Python3Language extends TypedLanguageSupport implements ScriptingLanguage, Service { + + private final HostAccess hostAccess; + /** + * When true, also bind {@code exchange}, {@code message}, and {@code context}. Only {@link #createWithHostAccess()} + * sets this; default mode keeps those names undefined. + */ + private final boolean bindCamelHostObjects; + private final Map sourceCache = LRUCacheFactory.newLRUSoftCache(16, 1000, true); + private final Lock engineLock = new ReentrantLock(); + private volatile Engine engine; + + public Python3Language() { + this(Python3Helper.defaultHostAccess(), false); + } + + public Python3Language(HostAccess hostAccess) { + this(hostAccess, false); + } + + private Python3Language(HostAccess hostAccess, boolean bindCamelHostObjects) { + this.hostAccess = hostAccess; + this.bindCamelHostObjects = bindCamelHostObjects; + } + + /** + * Creates a separate language instance for trusted scripts. Uses {@link HostAccess#ALL} so Python may call public + * methods and fields on bound host objects, and additionally exposes {@code exchange}, {@code message}, and + * {@code context}. + *

+ * This is an explicit opt-in: {@code HostAccess.ALL} is not a sandbox. It does not enable {@code allowAllAccess}, + * Java class lookup, host IO, or process creation. Use only when you trust the scripts. + *

+ */ + public static Python3Language createWithHostAccess() { + return new Python3Language(HostAccess.ALL, true); + } + + /** + * Helper for use in the Java route DSL, e.g. {@code .filter(Python3Language.python3("body == 'Hello'"))}. + */ + public static Python3Expression python3(String script) { + return new Python3Expression(script); + } + + @Override + public void start() { + engine(); + } + + @Override + public void stop() { + sourceCache.clear(); + Engine toClose; + engineLock.lock(); + try { + toClose = engine; + engine = null; + } finally { + engineLock.unlock(); + } + if (toClose != null) { + toClose.close(); + } + } + + @Override + public Predicate createPredicate(String expression) { + return createPython3Expression(expression); + } + + @Override + public Expression createExpression(String expression) { + return createPython3Expression(expression); + } + + private Python3Expression createPython3Expression(String expression) { + return new Python3Expression(loadResource(expression), this); + } + + @Override + public T evaluate(String script, Map bindings, Class resultType) { + script = loadResource(script); + try (Context cx = Python3Helper.newContext(engine(), hostAccess)) { + if (bindings != null) { + Value b = cx.getBindings("python"); + bindings.forEach(b::putMember); + } + Value value = cx.eval(source(script)); + return convert(value, resultType, getCamelContext(), null); + } catch (Exception e) { + throw wrapFailure(script, null, e); + } + } + + Object evaluateExpression(String script, Exchange exchange) { + try (Context cx = Python3Helper.newContext(engine(), hostAccess)) { + Value b = cx.getBindings("python"); + // Default: data only. Do not bind exchange/message/context — they are undefined (NameError) + // unless createWithHostAccess() opted into trusted host-object bindings. + b.putMember("exchangeId", exchange.getExchangeId()); + b.putMember("headers", exchange.getMessage().getHeaders()); + b.putMember("properties", exchange.getAllProperties()); + b.putMember("body", exchange.getMessage().getBody()); + if (bindCamelHostObjects) { + b.putMember("exchange", exchange); + b.putMember("message", exchange.getMessage()); + b.putMember("context", exchange.getContext()); + } + Value value = cx.eval(source(script)); + return convert(value, Object.class, exchange.getContext(), exchange); + } catch (Exception e) { + throw wrapFailure(script, exchange, e); + } + } + + /** + * Resource load failures and Python parse errors are syntax problems. Runtime errors (including host-access + * denials) are evaluation failures, matching groovy/javascript rather than wrapping everything as illegal syntax. + */ + static RuntimeCamelException wrapFailure(String script, Exchange exchange, Exception e) { + if (e instanceof ExpressionIllegalSyntaxException ise) { + return ise; + } + if (e instanceof ExpressionEvaluationException eee) { + return eee; + } + if (isSyntaxError(e)) { + return new ExpressionIllegalSyntaxException(script, e); + } + return new ExpressionEvaluationException(null, exchange, e); + } + + static boolean isSyntaxError(Throwable thrown) { + for (Throwable current = thrown; current != null; current = current.getCause()) { + if (current instanceof PolyglotException pe && pe.isSyntaxError()) { + return true; + } + } + return false; + } + + private Engine engine() { + Engine existing = engine; + if (existing != null) { + return existing; + } + engineLock.lock(); + try { + if (engine == null) { + engine = Python3Helper.newEngine(); + } + return engine; + } finally { + engineLock.unlock(); + } + } + + private Source source(String script) { + Source cached = sourceCache.get(script); + if (cached != null) { + return cached; + } + Source created = Source.newBuilder("python", script, "camel-python3").buildLiteral(); + sourceCache.put(script, created); + return created; + } + + /** + * Converts a GraalPy {@link Value} to a Context-independent Java object while the Context is still open, then + * applies Camel type conversion for {@code resultType}. + */ + @SuppressWarnings("unchecked") + static T convert(Value value, Class resultType, CamelContext camelContext, Exchange exchange) { + Object obj = materialize(value, new HashMap<>()); + if (resultType == null || resultType == Object.class) { + return (T) obj; + } + if (obj == null) { + return null; + } + if (resultType.isInstance(obj)) { + return resultType.cast(obj); + } + if (camelContext != null) { + if (exchange != null) { + return camelContext.getTypeConverter().convertTo(resultType, exchange, obj); + } + return camelContext.getTypeConverter().convertTo(resultType, obj); + } + return resultType.cast(obj); + } + + /** + * Copies guest values into ordinary Java types so the result remains usable after {@link Context#close()}. + *

+ * Python lists and tuples become {@link List}, dicts become {@link Map}, and sets become {@link Set}. Nested values + * are copied recursively. Other guest objects (including custom types) are left as {@link Value#as(Class) + * value.as(Object.class)}. + *

+ * GraalPy returns the {@code __main__} module (not {@link Value#isNull()}) for {@code None}, {@code pass}, and + * assignment-only scripts; that is treated as Java {@code null}. + */ + private static Object materialize(Value value, Map seen) { + if (value == null || value.isNull()) { + return null; + } + Object existing = seen.get(value); + if (existing != null) { + return existing; + } + if (value.isBoolean()) { + return value.asBoolean(); + } + if (value.isNumber()) { + if (value.fitsInInt()) { + return value.asInt(); + } + if (value.fitsInLong()) { + return value.asLong(); + } + if (value.fitsInDouble()) { + return value.asDouble(); + } + return value.as(Object.class); + } + if (value.isString()) { + return value.asString(); + } + if (value.isHostObject()) { + return value.asHostObject(); + } + if (isMainModule(value)) { + return null; + } + if (isPythonSet(value)) { + Set set = new LinkedHashSet<>(); + seen.put(value, set); + materializeIterator(value.getIterator(), seen, set); + return set; + } + if (value.hasArrayElements()) { + int size = Math.toIntExact(value.getArraySize()); + List list = new ArrayList<>(size); + seen.put(value, list); + for (int i = 0; i < size; i++) { + list.add(materialize(value.getArrayElement(i), seen)); + } + return list; + } + if (value.hasHashEntries()) { + Map map = new LinkedHashMap<>(); + seen.put(value, map); + Value entries = value.getHashEntriesIterator(); + while (entries.hasIteratorNextElement()) { + Value entry = entries.getIteratorNextElement(); + Object key = materialize(entry.getArrayElement(0), seen); + Object val = materialize(entry.getArrayElement(1), seen); + map.put(key, val); + } + return map; + } + if (isPythonTuple(value) && value.hasIterator()) { + List list = new ArrayList<>(); + seen.put(value, list); + materializeIterator(value.getIterator(), seen, list); + return list; + } + return value.as(Object.class); + } + + private static void materializeIterator(Value iterator, Map seen, Collection target) { + while (iterator.hasIteratorNextElement()) { + target.add(materialize(iterator.getIteratorNextElement(), seen)); + } + } + + private static boolean isPythonSet(Value value) { + return isPythonType(value, "set") || isPythonType(value, "frozenset"); + } + + private static boolean isPythonTuple(Value value) { + return isPythonType(value, "tuple"); + } + + private static boolean isPythonType(Value value, String simpleName) { + Value meta = value.getMetaObject(); + if (meta == null || !meta.isMetaObject()) { + return false; + } + try { + return simpleName.equals(meta.getMetaSimpleName()); + } catch (UnsupportedOperationException e) { + return false; + } + } + + /** + * GraalPy {@code Context.eval} of {@code None}, {@code pass}, or a statement with no result yields the guest + * {@code __main__} module rather than {@link Value#isNull()}. Distinguish that from a real dict/list/object by + * requiring module members {@code __name__ == "__main__"} and {@code __spec__}, and by excluding values that are + * numbers, strings, booleans, host objects, arrays, or hash maps. + */ + private static boolean isMainModule(Value value) { + if (value.hasArrayElements() || value.hasHashEntries() || !value.hasMembers() || !value.hasMember("__name__") + || !value.hasMember("__spec__")) { + return false; + } + Value name = value.getMember("__name__"); + return name != null && name.isString() && "__main__".equals(name.asString()); + } +} diff --git a/components/camel-python3/src/main/java/org/apache/camel/language/python3/package.html b/components/camel-python3/src/main/java/org/apache/camel/language/python3/package.html new file mode 100644 index 0000000000000..52516400e9792 --- /dev/null +++ b/components/camel-python3/src/main/java/org/apache/camel/language/python3/package.html @@ -0,0 +1,27 @@ + + + + + + +A language plugin for Python 3 via GraalPy. + + + diff --git a/components/camel-python3/src/test/java/org/apache/camel/language/Python3LanguageTest.java b/components/camel-python3/src/test/java/org/apache/camel/language/Python3LanguageTest.java new file mode 100644 index 0000000000000..4a986a13f1940 --- /dev/null +++ b/components/camel-python3/src/test/java/org/apache/camel/language/Python3LanguageTest.java @@ -0,0 +1,32 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.language; + +import org.apache.camel.builder.LanguageBuilderFactory; +import org.apache.camel.model.language.Python3Expression; +import org.junit.jupiter.api.condition.DisabledIfSystemProperty; + +/** + * Ensures that the "python3" language is compliant with the typed language expectations. + */ +@DisabledIfSystemProperty(named = "os.arch", matches = "(?i)(s390x|ppc64le)") +class Python3LanguageTest extends AbstractTypedLanguageTest { + + Python3LanguageTest() { + super("body", LanguageBuilderFactory::python3); + } +} diff --git a/components/camel-python3/src/test/java/org/apache/camel/language/python3/Python3ChoiceTest.java b/components/camel-python3/src/test/java/org/apache/camel/language/python3/Python3ChoiceTest.java new file mode 100644 index 0000000000000..7955a569a21f8 --- /dev/null +++ b/components/camel-python3/src/test/java/org/apache/camel/language/python3/Python3ChoiceTest.java @@ -0,0 +1,55 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.language.python3; + +import org.apache.camel.RoutesBuilder; +import org.apache.camel.builder.RouteBuilder; +import org.apache.camel.component.mock.MockEndpoint; +import org.apache.camel.test.junit6.CamelTestSupport; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.condition.DisabledIfSystemProperty; + +@DisabledIfSystemProperty(named = "os.arch", matches = "(?i)(s390x|ppc64le)") +class Python3ChoiceTest extends CamelTestSupport { + + @Test + void testPython3Choice() throws Exception { + getMockEndpoint("mock:foo").expectedBodiesReceived("Hello"); + getMockEndpoint("mock:bar").expectedBodiesReceived("Bye"); + getMockEndpoint("mock:other").expectedBodiesReceived("Hi World"); + + template.sendBody("direct:start", "Bye"); + template.sendBody("direct:start", "Hi World"); + template.sendBody("direct:start", "Hello"); + + MockEndpoint.assertIsSatisfied(context); + } + + @Override + protected RoutesBuilder createRouteBuilder() { + return new RouteBuilder() { + @Override + public void configure() { + from("direct:start") + .choice() + .when().python3("body == 'Hello'").to("mock:foo") + .when().python3("body == 'Bye'").to("mock:bar") + .otherwise().to("mock:other"); + } + }; + } +} diff --git a/components/camel-python3/src/test/java/org/apache/camel/language/python3/Python3ErrorHandlingTest.java b/components/camel-python3/src/test/java/org/apache/camel/language/python3/Python3ErrorHandlingTest.java new file mode 100644 index 0000000000000..2c4a3d6d3a33f --- /dev/null +++ b/components/camel-python3/src/test/java/org/apache/camel/language/python3/Python3ErrorHandlingTest.java @@ -0,0 +1,89 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.language.python3; + +import org.apache.camel.CamelContext; +import org.apache.camel.Exchange; +import org.apache.camel.ExpressionEvaluationException; +import org.apache.camel.ExpressionIllegalSyntaxException; +import org.apache.camel.impl.DefaultCamelContext; +import org.apache.camel.spi.Language; +import org.apache.camel.support.DefaultExchange; +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.condition.DisabledIfSystemProperty; + +import static org.assertj.core.api.Assertions.assertThatThrownBy; + +@DisabledIfSystemProperty(named = "os.arch", matches = "(?i)(s390x|ppc64le)") +class Python3ErrorHandlingTest { + + static CamelContext context; + + @BeforeAll + static void startContext() { + context = new DefaultCamelContext(); + context.start(); + } + + @AfterAll + static void stopContext() { + context.stop(); + } + + static Language language() { + return context.resolveLanguage("python3"); + } + + static Exchange exchange() { + Exchange exchange = new DefaultExchange(context); + exchange.getIn().setBody("hello"); + exchange.getIn().setHeader("foo", "bar"); + return exchange; + } + + @Test + void pythonParseErrorIsSyntaxException() { + Exchange exchange = exchange(); + assertThatThrownBy(() -> language().createExpression("def (").evaluate(exchange, Object.class)) + .isInstanceOf(ExpressionIllegalSyntaxException.class); + } + + @Test + void pythonRuntimeErrorIsEvaluationException() { + Exchange exchange = exchange(); + assertThatThrownBy(() -> language().createExpression("1 / 0").evaluate(exchange, Object.class)) + .isInstanceOf(ExpressionEvaluationException.class) + .isNotInstanceOf(ExpressionIllegalSyntaxException.class); + } + + @Test + void missingNameIsEvaluationException() { + Exchange exchange = exchange(); + assertThatThrownBy(() -> language().createExpression("not_defined").evaluate(exchange, Object.class)) + .isInstanceOf(ExpressionEvaluationException.class); + } + + @Test + void hostAccessDenialIsEvaluationException() { + Exchange exchange = exchange(); + assertThatThrownBy(() -> language().createExpression("headers.put('k', 'v')").evaluate(exchange, Object.class)) + .isInstanceOf(ExpressionEvaluationException.class) + .isNotInstanceOf(ExpressionIllegalSyntaxException.class); + } +} diff --git a/components/camel-python3/src/test/java/org/apache/camel/language/python3/Python3JavaDslTest.java b/components/camel-python3/src/test/java/org/apache/camel/language/python3/Python3JavaDslTest.java new file mode 100644 index 0000000000000..be302cd9630a5 --- /dev/null +++ b/components/camel-python3/src/test/java/org/apache/camel/language/python3/Python3JavaDslTest.java @@ -0,0 +1,76 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.language.python3; + +import org.apache.camel.RoutesBuilder; +import org.apache.camel.builder.RouteBuilder; +import org.apache.camel.component.mock.MockEndpoint; +import org.apache.camel.test.junit6.CamelTestSupport; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.condition.DisabledIfSystemProperty; + +@DisabledIfSystemProperty(named = "os.arch", matches = "(?i)(s390x|ppc64le)") +class Python3JavaDslTest extends CamelTestSupport { + + @Test + void python3SetBodyAndResultType() throws Exception { + getMockEndpoint("mock:body").expectedBodiesReceived(6); + getMockEndpoint("mock:typed").expectedBodiesReceived(9); + getMockEndpoint("mock:typed").message(0).body().isInstanceOf(Integer.class); + + template.sendBody("direct:body", 3); + template.sendBody("direct:typed", 3); + + MockEndpoint.assertIsSatisfied(context); + } + + @Test + void python3FilterAndWhen() throws Exception { + getMockEndpoint("mock:filtered").expectedBodiesReceived(44); + getMockEndpoint("mock:hello").expectedBodiesReceived("Hello"); + getMockEndpoint("mock:other").expectedBodiesReceived("Bye"); + + template.sendBody("direct:filter", 44); + template.sendBody("direct:filter", 10); + template.sendBody("direct:choice", "Hello"); + template.sendBody("direct:choice", "Bye"); + + MockEndpoint.assertIsSatisfied(context); + } + + @Override + protected RoutesBuilder createRouteBuilder() { + return new RouteBuilder() { + @Override + public void configure() { + from("direct:body") + .setBody().python3("body * 2") + .to("mock:body"); + from("direct:typed") + .setBody().python3("body * 3", Integer.class) + .to("mock:typed"); + from("direct:filter") + .filter().python3("body > 20") + .to("mock:filtered"); + from("direct:choice") + .choice() + .when().python3("body == 'Hello'").to("mock:hello") + .otherwise().to("mock:other"); + } + }; + } +} diff --git a/components/camel-python3/src/test/java/org/apache/camel/language/python3/Python3LanguageEndpointTest.java b/components/camel-python3/src/test/java/org/apache/camel/language/python3/Python3LanguageEndpointTest.java new file mode 100644 index 0000000000000..6d418aa5c0b34 --- /dev/null +++ b/components/camel-python3/src/test/java/org/apache/camel/language/python3/Python3LanguageEndpointTest.java @@ -0,0 +1,62 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.language.python3; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; + +import org.apache.camel.RoutesBuilder; +import org.apache.camel.builder.RouteBuilder; +import org.apache.camel.component.mock.MockEndpoint; +import org.apache.camel.test.junit6.CamelTestSupport; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.condition.DisabledIfSystemProperty; + +@DisabledIfSystemProperty(named = "os.arch", matches = "(?i)(s390x|ppc64le)") +class Python3LanguageEndpointTest extends CamelTestSupport { + + @Test + void languageEndpointEvaluatesInlineExpression() throws Exception { + getMockEndpoint("mock:result").expectedBodiesReceived(6); + + template.sendBody("direct:start", 3); + + MockEndpoint.assertIsSatisfied(context); + } + + @Test + void languageEndpointHonorsResultType() throws Exception { + getMockEndpoint("mock:typed").expectedBodiesReceived(8); + getMockEndpoint("mock:typed").message(0).body().isInstanceOf(Integer.class); + + template.sendBody("direct:typed", 4); + + MockEndpoint.assertIsSatisfied(context); + } + + @Override + protected RoutesBuilder createRouteBuilder() { + return new RouteBuilder() { + @Override + public void configure() { + String script = URLEncoder.encode("body * 2", StandardCharsets.UTF_8); + from("direct:start").to("language:python3:" + script).to("mock:result"); + from("direct:typed").to("language:python3:" + script + "?resultType=java.lang.Integer").to("mock:typed"); + } + }; + } +} diff --git a/components/camel-python3/src/test/java/org/apache/camel/language/python3/Python3LanguageEvalTest.java b/components/camel-python3/src/test/java/org/apache/camel/language/python3/Python3LanguageEvalTest.java new file mode 100644 index 0000000000000..5d39717e2f092 --- /dev/null +++ b/components/camel-python3/src/test/java/org/apache/camel/language/python3/Python3LanguageEvalTest.java @@ -0,0 +1,289 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.language.python3; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; +import java.util.concurrent.Future; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicInteger; + +import org.apache.camel.CamelContext; +import org.apache.camel.Exchange; +import org.apache.camel.Expression; +import org.apache.camel.Predicate; +import org.apache.camel.ProducerTemplate; +import org.apache.camel.builder.RouteBuilder; +import org.apache.camel.impl.DefaultCamelContext; +import org.apache.camel.spi.Language; +import org.apache.camel.spi.ScriptingLanguage; +import org.apache.camel.support.DefaultExchange; +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.condition.DisabledIfSystemProperty; + +import static org.apache.camel.language.python3.Python3Language.python3; +import static org.assertj.core.api.Assertions.assertThat; + +@DisabledIfSystemProperty(named = "os.arch", matches = "(?i)(s390x|ppc64le)") +class Python3LanguageEvalTest { + + static CamelContext context; + + @BeforeAll + static void startContext() { + context = new DefaultCamelContext(); + context.start(); + } + + @AfterAll + static void stopContext() { + context.stop(); + } + + static Exchange exchangeWithBody(Object body) { + Exchange exchange = new DefaultExchange(context); + exchange.getIn().setBody(body); + return exchange; + } + + @Test + void resolvePython3Language() { + Language language = context.resolveLanguage("python3"); + assertThat(language).isInstanceOf(Python3Language.class); + assertThat(context.resolveLanguage("python3")).isSameAs(language); + assertThat(language).isInstanceOf(ScriptingLanguage.class); + } + + @Test + void python3Syntax() { + Language language = context.resolveLanguage("python3"); + Exchange exchange = exchangeWithBody("World"); + assertThat(language.createExpression("f'Hello {body}'").evaluate(exchange, String.class)).isEqualTo("Hello World"); + assertThat(language.createExpression("7 // 2").evaluate(exchange, Integer.class)).isEqualTo(3); + assertThat(language.createExpression("(x := 4) * 2").evaluate(exchange, Integer.class)).isEqualTo(8); + } + + @Test + void bodyHeadersPropertiesAndExchangeId() { + Exchange exchange = exchangeWithBody(7); + exchange.getIn().setHeader("foo", "bar"); + exchange.setProperty("color", "red"); + Language language = context.resolveLanguage("python3"); + assertThat(language.createExpression("2 + body").evaluate(exchange, Integer.class)).isEqualTo(9); + assertThat(language.createExpression("headers['foo']").evaluate(exchange, String.class)).isEqualTo("bar"); + assertThat(language.createExpression("properties['color']").evaluate(exchange, String.class)).isEqualTo("red"); + assertThat(language.createExpression("exchangeId").evaluate(exchange, String.class)) + .isEqualTo(exchange.getExchangeId()); + assertThat(language.createPredicate("body == 7").matches(exchange)).isTrue(); + assertThat(language.createPredicate("body == 8").matches(exchange)).isFalse(); + } + + @Test + void resultIsNotStringified() { + Expression expression = context.resolveLanguage("python3").createExpression("40 + 2"); + Object result = expression.evaluate(exchangeWithBody(null), Object.class); + assertThat(result).isInstanceOf(Integer.class).isEqualTo(42); + assertThat(expression.evaluate(exchangeWithBody(null), String.class)).isEqualTo("42"); + } + + @Test + void noneAndStatementOnlyProduceJavaNull() { + Language language = context.resolveLanguage("python3"); + Exchange exchange = exchangeWithBody(null); + assertThat(language.createExpression("None").evaluate(exchange, Object.class)).isNull(); + assertThat(language.createExpression("pass").evaluate(exchange, Object.class)).isNull(); + assertThat(language.createExpression("x = 1").evaluate(exchange, Object.class)).isNull(); + assertThat(language.createExpression("None").evaluate(exchange, String.class)).isNull(); + assertThat(language.createExpression("None").evaluate(exchange, Integer.class)).isNull(); + } + + @Test + void primitiveConversionRemainsUnchanged() { + Language language = context.resolveLanguage("python3"); + Exchange exchange = exchangeWithBody(null); + assertThat(language.createExpression("'hello'").evaluate(exchange, Object.class)).isEqualTo("hello"); + assertThat(language.createExpression("42").evaluate(exchange, Object.class)).isInstanceOf(Integer.class).isEqualTo(42); + assertThat(language.createExpression("42").evaluate(exchange, Integer.class)).isEqualTo(42); + assertThat(language.createExpression("42").evaluate(exchange, Long.class)).isEqualTo(42L); + assertThat(language.createExpression("42").evaluate(exchange, String.class)).isEqualTo("42"); + assertThat(language.createExpression("1.5").evaluate(exchange, Object.class)).isInstanceOf(Double.class) + .isEqualTo(1.5d); + assertThat(language.createExpression("True").evaluate(exchange, Object.class)).isEqualTo(Boolean.TRUE); + assertThat(language.createExpression("True").evaluate(exchange, Boolean.class)).isTrue(); + assertThat(language.createExpression("False").evaluate(exchange, Object.class)).isEqualTo(Boolean.FALSE); + assertThat(language.createExpression("0").evaluate(exchange, Object.class)).isEqualTo(0); + } + + @Test + void listResultSurvivesContextClose() { + Language language = context.resolveLanguage("python3"); + Object result = language.createExpression("[1, 'a', True]").evaluate(exchangeWithBody(null), Object.class); + assertThat(result.getClass().getName()).doesNotContain("polyglot"); + assertThat(result).isInstanceOf(List.class); + List list = castList(result); + assertThat(list).containsExactly(1, "a", true); + assertThat(list.get(0)).isInstanceOf(Integer.class); + assertThat(list.get(2)).isInstanceOf(Boolean.class); + } + + @Test + void dictResultSurvivesContextClose() { + Language language = context.resolveLanguage("python3"); + Object result = language.createExpression("{'a': 1, 'b': 'x'}").evaluate(exchangeWithBody(null), Object.class); + assertThat(result.getClass().getName()).doesNotContain("polyglot"); + assertThat(result).isInstanceOf(Map.class); + assertThat(castMap(result)).containsEntry("a", 1).containsEntry("b", "x"); + } + + @Test + void setResultSurvivesContextClose() { + Language language = context.resolveLanguage("python3"); + Object result = language.createExpression("{1, 2}").evaluate(exchangeWithBody(null), Object.class); + assertThat(result.getClass().getName()).doesNotContain("polyglot"); + assertThat(result).isInstanceOf(Set.class); + assertThat(castSet(result)).containsExactlyInAnyOrder(1, 2); + } + + @Test + void tupleResultSurvivesContextClose() { + Language language = context.resolveLanguage("python3"); + Object result = language.createExpression("(1, 2)").evaluate(exchangeWithBody(null), Object.class); + assertThat(result.getClass().getName()).doesNotContain("polyglot"); + assertThat(result).isInstanceOf(List.class); + assertThat(castList(result)).containsExactly(1, 2); + } + + @Test + void nestedSetAndTupleSurviveContextClose() { + Language language = context.resolveLanguage("python3"); + Object result = language.createExpression("{'s': {1, 2}, 't': (3, 4)}").evaluate(exchangeWithBody(null), Object.class); + assertThat(result.getClass().getName()).doesNotContain("polyglot"); + Map map = castMap(result); + assertThat(castSet(map.get("s"))).containsExactlyInAnyOrder(1, 2); + assertThat(castList(map.get("t"))).containsExactly(3, 4); + assertThat(map.get("s").getClass().getName()).doesNotContain("polyglot"); + assertThat(map.get("t").getClass().getName()).doesNotContain("polyglot"); + } + + @Test + void nestedListAndDictSurviveContextClose() { + Language language = context.resolveLanguage("python3"); + Object result = language.createExpression("{'n': [1, {'k': 2}]}").evaluate(exchangeWithBody(null), Object.class); + assertThat(result.getClass().getName()).doesNotContain("polyglot"); + Map map = castMap(result); + List nested = castList(map.get("n")); + assertThat(nested.get(0)).isEqualTo(1); + Map inner = castMap(nested.get(1)); + assertThat(inner.getClass().getName()).doesNotContain("polyglot"); + assertThat(inner).containsEntry("k", 2); + } + + @Test + void resultTypeListAndMap() { + Language language = context.resolveLanguage("python3"); + Exchange exchange = exchangeWithBody(7); + List list = language.createExpression("[body, 1]").evaluate(exchange, List.class); + assertThat(list.getClass().getName()).doesNotContain("polyglot"); + assertThat(list).containsExactly(7, 1); + + Map map = language.createExpression("{'a': body}").evaluate(exchange, Map.class); + assertThat(map.getClass().getName()).doesNotContain("polyglot"); + assertThat(map).containsEntry("a", 7); + + ScriptingLanguage sl = (ScriptingLanguage) language; + assertThat(castList(sl.evaluate("[1, 2]", null, List.class))).containsExactly(1, 2); + assertThat(castMap(sl.evaluate("{'a': 1}", null, Map.class))).containsEntry("a", 1); + } + + @Test + void concurrentEvaluationIsThreadSafe() throws Exception { + Expression expression = context.resolveLanguage("python3").createExpression("body + 1"); + ExecutorService pool = Executors.newFixedThreadPool(8); + try { + List> futures = new ArrayList<>(); + for (int i = 0; i < 64; i++) { + int value = i; + futures.add(pool.submit(() -> expression.evaluate(exchangeWithBody(value), Integer.class))); + } + for (int i = 0; i < futures.size(); i++) { + assertThat(futures.get(i).get(20, TimeUnit.SECONDS)).isEqualTo(i + 1); + } + } finally { + pool.shutdownNow(); + } + } + + @Test + void scriptingLanguageEvaluate() { + ScriptingLanguage language = (ScriptingLanguage) context.resolveLanguage("python3"); + assertThat(language.evaluate("2 * 3", null, Integer.class)).isEqualTo(6); + Map bindings = new HashMap<>(); + bindings.put("body", 3); + assertThat(language.evaluate("resource:classpath:mypython3.py", bindings, String.class)) + .isEqualTo("The result is 6"); + } + + @Test + void repeatableEvaluation() { + Predicate predicate = context.resolveLanguage("python3").createPredicate("body == 5"); + assertThat(predicate.matches(exchangeWithBody(5))).isTrue(); + assertThat(predicate.matches(exchangeWithBody(6))).isFalse(); + } + + @Test + void filterRoute() throws Exception { + AtomicInteger passed = new AtomicInteger(); + context.addRoutes(new RouteBuilder() { + @Override + public void configure() { + from("direct:python3-filter") + .filter(python3("body > 20")) + .process(e -> passed.incrementAndGet()); + } + }); + ProducerTemplate template = context.createProducerTemplate(); + try { + template.sendBody("direct:python3-filter", 44); + template.sendBody("direct:python3-filter", 10); + assertThat(passed.get()).isEqualTo(1); + } finally { + template.stop(); + } + } + + @SuppressWarnings("unchecked") + static List castList(Object value) { + return (List) value; + } + + @SuppressWarnings("unchecked") + static Map castMap(Object value) { + return (Map) value; + } + + @SuppressWarnings("unchecked") + static Set castSet(Object value) { + return (Set) value; + } +} diff --git a/components/camel-python3/src/test/java/org/apache/camel/language/python3/Python3LanguageSecurityTest.java b/components/camel-python3/src/test/java/org/apache/camel/language/python3/Python3LanguageSecurityTest.java new file mode 100644 index 0000000000000..1c6550c6134e8 --- /dev/null +++ b/components/camel-python3/src/test/java/org/apache/camel/language/python3/Python3LanguageSecurityTest.java @@ -0,0 +1,173 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.language.python3; + +import org.apache.camel.CamelContext; +import org.apache.camel.Exchange; +import org.apache.camel.impl.DefaultCamelContext; +import org.apache.camel.spi.Language; +import org.apache.camel.support.DefaultExchange; +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.condition.DisabledIfSystemProperty; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.catchThrowable; + +@DisabledIfSystemProperty(named = "os.arch", matches = "(?i)(s390x|ppc64le)") +class Python3LanguageSecurityTest { + + static CamelContext context; + static Python3Language trusted; + + @BeforeAll + static void startContext() { + context = new DefaultCamelContext(); + context.start(); + trusted = Python3Language.createWithHostAccess(); + trusted.setCamelContext(context); + trusted.start(); + } + + @AfterAll + static void stopContext() { + if (trusted != null) { + trusted.stop(); + } + context.stop(); + } + + static Language defaultLanguage() { + return context.resolveLanguage("python3"); + } + + static Exchange sampleExchange() { + Exchange exchange = new DefaultExchange(context); + exchange.getIn().setBody(new Person("Ada", 36)); + exchange.getIn().setHeader("foo", "bar"); + exchange.setProperty("color", "red"); + return exchange; + } + + @Test + void defaultAllowsDataBindings() { + Language language = defaultLanguage(); + Exchange exchange = new DefaultExchange(context); + exchange.getIn().setBody("hello"); + exchange.getIn().setHeader("foo", "bar"); + exchange.setProperty("color", "red"); + assertThat(language.createExpression("body").evaluate(exchange, String.class)).isEqualTo("hello"); + assertThat(language.createExpression("headers['foo']").evaluate(exchange, String.class)).isEqualTo("bar"); + assertThat(language.createExpression("headers['written'] = 'yes'\nheaders['written']").evaluate(exchange, + String.class)).isEqualTo("yes"); + assertThat(exchange.getIn().getHeader("written")).isEqualTo("yes"); + assertThat(language.createExpression("properties['color']").evaluate(exchange, String.class)).isEqualTo("red"); + assertThat(language.createExpression("exchangeId").evaluate(exchange, String.class)) + .isEqualTo(exchange.getExchangeId()); + } + + @Test + void defaultDoesNotBindExchangeMessageOrContext() { + Language language = defaultLanguage(); + Exchange exchange = sampleExchange(); + assertNameError(language, exchange, "exchange"); + assertNameError(language, exchange, "message"); + assertNameError(language, exchange, "context"); + } + + @Test + void defaultDeniesJavaMethodInvocation() { + Language language = defaultLanguage(); + Exchange exchange = sampleExchange(); + assertDenied(language, exchange, "body.getAge()", "AttributeError"); + assertDenied(language, exchange, "headers.put('k', 'v')", "AttributeError"); + } + + @Test + void defaultDeniesJavaTypeAndClassLookup() { + Language language = defaultLanguage(); + Exchange exchange = sampleExchange(); + assertDenied(language, exchange, "java.type('java.lang.String')", "NameError"); + assertDenied(language, exchange, "from java.lang import Runtime", "host lookup is not allowed"); + } + + @Test + void defaultDeniesPythonIoAndProcessCreation() { + Language language = defaultLanguage(); + Exchange exchange = sampleExchange(); + assertDenied(language, exchange, "open('/etc/passwd')", "PermissionError"); + assertDenied(language, exchange, "import os\nos.system('true')", "Process creation is not allowed"); + } + + @Test + void trustedAllowsCamelHostMethodsAndPojoAccess() { + Exchange exchange = sampleExchange(); + assertThat(trusted.createExpression("exchange.getExchangeId()").evaluate(exchange, String.class)) + .isEqualTo(exchange.getExchangeId()); + assertThat(trusted.createExpression("message.getBody()").evaluate(exchange, Object.class)) + .isInstanceOf(Person.class); + assertThat(trusted.createExpression("context.getName()").evaluate(exchange, String.class)) + .isEqualTo(context.getName()); + assertThat(trusted.createExpression("body.getAge()").evaluate(exchange, Integer.class)).isEqualTo(36); + assertThat(trusted.createExpression("body.name").evaluate(exchange, String.class)).isEqualTo("Ada"); + } + + @Test + void trustedStillDeniesClassLookupIoAndProcessCreation() { + Exchange exchange = sampleExchange(); + assertDenied(trusted, exchange, "java.type('java.lang.Runtime')", "NameError"); + assertDenied(trusted, exchange, "from java.lang import Runtime", "host lookup is not allowed"); + assertDenied(trusted, exchange, "open('/etc/passwd')", "PermissionError"); + assertDenied(trusted, exchange, "import os\nos.system('true')", "Process creation is not allowed"); + } + + static void assertNameError(Language language, Exchange exchange, String name) { + assertDenied(language, exchange, name, "NameError"); + } + + static void assertDenied(Language language, Exchange exchange, String script, String messageFragment) { + Throwable thrown = catchThrowable(() -> language.createExpression(script).evaluate(exchange, Object.class)); + assertThat(thrown).as("expected %s to fail", script).isNotNull(); + assertThat(messageContains(thrown, messageFragment)) + .as("%s should mention \"%s\" but was: %s", script, messageFragment, thrown) + .isTrue(); + } + + static boolean messageContains(Throwable thrown, String messageFragment) { + for (Throwable current = thrown; current != null; current = current.getCause()) { + if (current.getMessage() != null && current.getMessage().contains(messageFragment)) { + return true; + } + } + return false; + } + + public static class Person { + public String name; + private final int age; + + Person(String name, int age) { + this.name = name; + this.age = age; + } + + public int getAge() { + return age; + } + } +} diff --git a/components/camel-python3/src/test/java/org/apache/camel/language/python3/Python3ResolutionTest.java b/components/camel-python3/src/test/java/org/apache/camel/language/python3/Python3ResolutionTest.java new file mode 100644 index 0000000000000..cf3eb7ae66a47 --- /dev/null +++ b/components/camel-python3/src/test/java/org/apache/camel/language/python3/Python3ResolutionTest.java @@ -0,0 +1,61 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.language.python3; + +import org.apache.camel.CamelContext; +import org.apache.camel.impl.DefaultCamelContext; +import org.apache.camel.spi.Language; +import org.apache.camel.support.DefaultExchange; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.condition.DisabledIfSystemProperty; + +import static org.assertj.core.api.Assertions.assertThat; + +@DisabledIfSystemProperty(named = "os.arch", matches = "(?i)(s390x|ppc64le)") +class Python3ResolutionTest { + + @Test + void resolveLanguageUsesSpiWhenRegistryHasNoOverride() { + CamelContext context = new DefaultCamelContext(); + context.start(); + try { + Language language = context.resolveLanguage("python3"); + assertThat(language).isInstanceOf(Python3Language.class); + assertThat(context.resolveLanguage("python3")).isSameAs(language); + } finally { + context.stop(); + } + } + + @Test + void registryBindingOverridesSpiBeforeFirstResolve() { + Python3Language custom = Python3Language.createWithHostAccess(); + CamelContext context = new DefaultCamelContext(); + context.getRegistry().bind("python3", custom); + context.start(); + try { + Language resolved = context.resolveLanguage("python3"); + assertThat(resolved).isSameAs(custom); + + DefaultExchange exchange = new DefaultExchange(context); + assertThat(resolved.createExpression("exchange.getExchangeId()").evaluate(exchange, String.class)) + .isEqualTo(exchange.getExchangeId()); + } finally { + context.stop(); + } + } +} diff --git a/components/camel-python3/src/test/java/org/apache/camel/language/python3/Python3ResourceTest.java b/components/camel-python3/src/test/java/org/apache/camel/language/python3/Python3ResourceTest.java new file mode 100644 index 0000000000000..9fcaa5870cbb8 --- /dev/null +++ b/components/camel-python3/src/test/java/org/apache/camel/language/python3/Python3ResourceTest.java @@ -0,0 +1,105 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.language.python3; + +import java.nio.file.Files; +import java.nio.file.Path; +import java.util.Map; + +import org.apache.camel.CamelContext; +import org.apache.camel.Exchange; +import org.apache.camel.ExpressionIllegalSyntaxException; +import org.apache.camel.impl.DefaultCamelContext; +import org.apache.camel.spi.Language; +import org.apache.camel.spi.ScriptingLanguage; +import org.apache.camel.support.DefaultExchange; +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.condition.DisabledIfSystemProperty; +import org.junit.jupiter.api.io.TempDir; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThatThrownBy; + +@DisabledIfSystemProperty(named = "os.arch", matches = "(?i)(s390x|ppc64le)") +class Python3ResourceTest { + + static CamelContext context; + + @TempDir + Path tempDir; + + @BeforeAll + static void startContext() { + context = new DefaultCamelContext(); + context.start(); + } + + @AfterAll + static void stopContext() { + context.stop(); + } + + static Language language() { + return context.resolveLanguage("python3"); + } + + static Exchange exchangeWithBody(Object body) { + Exchange exchange = new DefaultExchange(context); + exchange.getIn().setBody(body); + return exchange; + } + + @Test + void classpathResourceUsesPython3Syntax() { + assertThat(language().createExpression("resource:classpath:mypython3.py") + .evaluate(exchangeWithBody(3), String.class)).isEqualTo("The result is 6"); + } + + @Test + void fileResourceUsesPython3Syntax() throws Exception { + Path script = tempDir.resolve("resource.py"); + Files.writeString(script, "f'file:{body}'"); + assertThat(language().createExpression("resource:file:" + script.toAbsolutePath()) + .evaluate(exchangeWithBody("Ada"), String.class)).isEqualTo("file:Ada"); + } + + @Test + void missingClasspathResourceIsSyntaxException() { + assertThatThrownBy(() -> language().createExpression("resource:classpath:missing-python3.py")) + .isInstanceOf(ExpressionIllegalSyntaxException.class); + } + + @Test + void scriptingLanguageEvaluatesClasspathAndFileResources() throws Exception { + ScriptingLanguage sl = (ScriptingLanguage) language(); + assertThat(sl.evaluate("resource:classpath:mypython3.py", Map.of("body", 4), String.class)) + .isEqualTo("The result is 8"); + + Path script = tempDir.resolve("scripting.py"); + Files.writeString(script, "body + 1"); + assertThat(sl.evaluate("resource:file:" + script.toAbsolutePath(), Map.of("body", 9), Integer.class)).isEqualTo(10); + } + + @Test + void scriptingLanguageMissingResourceIsSyntaxException() { + ScriptingLanguage sl = (ScriptingLanguage) language(); + assertThatThrownBy(() -> sl.evaluate("resource:classpath:missing-python3.py", Map.of(), Object.class)) + .isInstanceOf(ExpressionIllegalSyntaxException.class); + } +} diff --git a/components/camel-python3/src/test/resources/log4j2.properties b/components/camel-python3/src/test/resources/log4j2.properties new file mode 100644 index 0000000000000..6a5a2b2bad4ea --- /dev/null +++ b/components/camel-python3/src/test/resources/log4j2.properties @@ -0,0 +1,28 @@ +## --------------------------------------------------------------------------- +## Licensed to the Apache Software Foundation (ASF) under one or more +## contributor license agreements. See the NOTICE file distributed with +## this work for additional information regarding copyright ownership. +## The ASF licenses this file to You under the Apache License, Version 2.0 +## (the "License"); you may not use this file except in compliance with +## the License. You may obtain a copy of the License at +## +## http://www.apache.org/licenses/LICENSE-2.0 +## +## Unless required by applicable law or agreed to in writing, software +## distributed under the License is distributed on an "AS IS" BASIS, +## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +## See the License for the specific language governing permissions and +## limitations under the License. +## --------------------------------------------------------------------------- + +appender.file.type = File +appender.file.name = file +appender.file.fileName = target/camel-python3-test.log +appender.file.layout.type = PatternLayout +appender.file.layout.pattern = %d [%-15.15t] %-5p %-30.30c{1} - %m%n +appender.out.type = Console +appender.out.name = out +appender.out.layout.type = PatternLayout +appender.out.layout.pattern = %d [%-15.15t] %-5p %-30.30c{1} - %m%n +rootLogger.level = INFO +rootLogger.appenderRef.file.ref = file diff --git a/components/camel-python3/src/test/resources/mypython3.py b/components/camel-python3/src/test/resources/mypython3.py new file mode 100644 index 0000000000000..d71e37f5e5a7b --- /dev/null +++ b/components/camel-python3/src/test/resources/mypython3.py @@ -0,0 +1,18 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +f"The result is {body * 2}" diff --git a/components/pom.xml b/components/pom.xml index b976af089d74a..869508e67167b 100644 --- a/components/pom.xml +++ b/components/pom.xml @@ -274,6 +274,7 @@ camel-pulsar camel-pqc camel-python + camel-python3 camel-quartz camel-quickfix camel-reactive-executor-tomcat diff --git a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/aggregate.json b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/aggregate.json index 86a394227d4d9..ad8faa0dfabfd 100644 --- a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/aggregate.json +++ b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/aggregate.json @@ -17,10 +17,10 @@ "note": { "index": 1, "kind": "attribute", "displayName": "Note", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The note for this node" }, "description": { "index": 2, "kind": "attribute", "displayName": "Description", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The description for this node" }, "disabled": { "index": 3, "kind": "attribute", "displayName": "Disabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to disable this EIP from the route during build time. Once an EIP has been disabled then it cannot be enabled later at runtime." }, - "correlationExpression": { "index": 4, "kind": "expression", "displayName": "Correlation Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.ExpressionSubElementDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "The expression used to calculate the correlation key to use for aggregation. Exchanges with the same correlation key are aggregated together. If the correlation key cannot be evaluated an Exception is thrown." }, - "completionPredicate": { "index": 5, "kind": "expression", "displayName": "Completion Predicate", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.camel.model.ExpressionSubElementDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "asPredicate": true, "description": "A predicate to indicate when an aggregated exchange is complete. If not specified and the AggregationStrategy implements Predicate, it will be used as the completionPredicate." }, - "completionTimeoutExpression": { "index": 6, "kind": "expression", "displayName": "Completion Timeout Expression", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.camel.model.ExpressionSubElementDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "Time in millis that an aggregated exchange should be inactive before its complete (timeout), evaluated as an expression allowing dynamic timeout values." }, - "completionSizeExpression": { "index": 7, "kind": "expression", "displayName": "Completion Size Expression", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.camel.model.ExpressionSubElementDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "Number of messages aggregated before the aggregation is complete, evaluated as an expression allowing dynamic size values." }, + "correlationExpression": { "index": 4, "kind": "expression", "displayName": "Correlation Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.ExpressionSubElementDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "python3", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "The expression used to calculate the correlation key to use for aggregation. Exchanges with the same correlation key are aggregated together. If the correlation key cannot be evaluated an Exception is thrown." }, + "completionPredicate": { "index": 5, "kind": "expression", "displayName": "Completion Predicate", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.camel.model.ExpressionSubElementDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "python3", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "asPredicate": true, "description": "A predicate to indicate when an aggregated exchange is complete. If not specified and the AggregationStrategy implements Predicate, it will be used as the completionPredicate." }, + "completionTimeoutExpression": { "index": 6, "kind": "expression", "displayName": "Completion Timeout Expression", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.camel.model.ExpressionSubElementDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "python3", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "Time in millis that an aggregated exchange should be inactive before its complete (timeout), evaluated as an expression allowing dynamic timeout values." }, + "completionSizeExpression": { "index": 7, "kind": "expression", "displayName": "Completion Size Expression", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.camel.model.ExpressionSubElementDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "python3", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "Number of messages aggregated before the aggregation is complete, evaluated as an expression allowing dynamic size values." }, "optimisticLockRetryPolicy": { "index": 8, "kind": "element", "displayName": "Optimistic Lock Retry Policy", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.camel.model.OptimisticLockRetryPolicyDefinition", "deprecated": false, "autowired": false, "secret": false, "description": "Configures retry settings when using optimistic locking." }, "parallelProcessing": { "index": 9, "kind": "attribute", "displayName": "Parallel Processing", "group": "common", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "When completed exchanges are sent out of the aggregator, this option indicates whether Camel should use a thread pool with multiple threads for concurrency." }, "optimisticLocking": { "index": 10, "kind": "attribute", "displayName": "Optimistic Locking", "group": "common", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Turns on optimistic locking, which requires the aggregation repository to implement OptimisticLockingAggregationRepository." }, diff --git a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/delay.json b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/delay.json index ce23041cba40b..d38d31e78a82d 100644 --- a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/delay.json +++ b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/delay.json @@ -17,7 +17,7 @@ "note": { "index": 1, "kind": "attribute", "displayName": "Note", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The note for this node" }, "description": { "index": 2, "kind": "attribute", "displayName": "Description", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The description for this node" }, "disabled": { "index": 3, "kind": "attribute", "displayName": "Disabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to disable this EIP from the route during build time. Once an EIP has been disabled then it cannot be enabled later at runtime." }, - "expression": { "index": 4, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "The expression that determines the delay duration in milliseconds." }, + "expression": { "index": 4, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "python3", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "The expression that determines the delay duration in milliseconds." }, "asyncDelayed": { "index": 5, "kind": "attribute", "displayName": "Async Delayed", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Enables asynchronous delay which means the thread will not block while delaying." }, "callerRunsWhenRejected": { "index": 6, "kind": "attribute", "displayName": "Caller Runs When Rejected", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether or not the caller should run the task when it was rejected by the thread pool." }, "executorService": { "index": 7, "kind": "attribute", "displayName": "Executor Service", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "java.util.concurrent.ExecutorService", "deprecated": false, "autowired": false, "secret": false, "description": "To use a custom thread pool if asyncDelay has been enabled." } diff --git a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/dynamicRouter.json b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/dynamicRouter.json index 98cb7c7c56c9e..9693eeda34363 100644 --- a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/dynamicRouter.json +++ b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/dynamicRouter.json @@ -17,7 +17,7 @@ "note": { "index": 1, "kind": "attribute", "displayName": "Note", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The note for this node" }, "description": { "index": 2, "kind": "attribute", "displayName": "Description", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The description for this node" }, "disabled": { "index": 3, "kind": "attribute", "displayName": "Disabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to disable this EIP from the route during build time. Once an EIP has been disabled then it cannot be enabled later at runtime." }, - "expression": { "index": 4, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "The expression to compute the next endpoint URI to route to. The expression is called iteratively until it returns null to indicate the end of routing." }, + "expression": { "index": 4, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "python3", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "The expression to compute the next endpoint URI to route to. The expression is called iteratively until it returns null to indicate the end of routing." }, "uriDelimiter": { "index": 5, "kind": "attribute", "displayName": "Uri Delimiter", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": ",", "description": "The delimiter used to separate endpoint URIs when the expression returns multiple endpoints. Default is comma." }, "ignoreInvalidEndpoints": { "index": 6, "kind": "attribute", "displayName": "Ignore Invalid Endpoints", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "If enabled then invalid endpoint URIs are ignored and logged instead of throwing an exception." }, "cacheSize": { "index": 7, "kind": "attribute", "displayName": "Cache Size", "group": "advanced", "label": "advanced", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "description": "Configures the cache size for ProducerCache which caches producers for reuse. The default cache size is 1000. Set to -1 to turn off caching." }, diff --git a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/enrich.json b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/enrich.json index 05039742fac6c..367b2410998b6 100644 --- a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/enrich.json +++ b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/enrich.json @@ -17,7 +17,7 @@ "note": { "index": 1, "kind": "attribute", "displayName": "Note", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The note for this node" }, "description": { "index": 2, "kind": "attribute", "displayName": "Description", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The description for this node" }, "disabled": { "index": 3, "kind": "attribute", "displayName": "Disabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to disable this EIP from the route during build time. Once an EIP has been disabled then it cannot be enabled later at runtime." }, - "expression": { "index": 4, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "The expression to compute the endpoint URI to enrich from." }, + "expression": { "index": 4, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "python3", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "The expression to compute the endpoint URI to enrich from." }, "variableSend": { "index": 5, "kind": "attribute", "displayName": "Variable Send", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "To use a variable as the source for the message body to send. When using send variable then the message body is taken from this variable instead of the current message, however the headers from the message will still be used as well." }, "variableReceive": { "index": 6, "kind": "attribute", "displayName": "Variable Receive", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "To use a variable to store the received message body (only body, not headers). This makes it handy to use variables for user data and to easily control what data to use for sending and receiving." }, "aggregationStrategy": { "index": 7, "kind": "attribute", "displayName": "Aggregation Strategy", "group": "common", "required": false, "type": "object", "javaType": "org.apache.camel.AggregationStrategy", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the AggregationStrategy to be used to merge the reply from the external service, into a single outgoing message. By default Camel will use the reply from the external service as outgoing message." }, diff --git a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/filter.json b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/filter.json index 3815b0c01606f..93d5a146fa1a3 100644 --- a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/filter.json +++ b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/filter.json @@ -17,7 +17,7 @@ "note": { "index": 1, "kind": "attribute", "displayName": "Note", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The note for this node" }, "description": { "index": 2, "kind": "attribute", "displayName": "Description", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The description for this node" }, "disabled": { "index": 3, "kind": "attribute", "displayName": "Disabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to disable this EIP from the route during build time. Once an EIP has been disabled then it cannot be enabled later at runtime." }, - "expression": { "index": 4, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "asPredicate": true, "description": "The predicate expression to evaluate. Messages where the predicate returns false are filtered out and not routed further." }, + "expression": { "index": 4, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "python3", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "asPredicate": true, "description": "The predicate expression to evaluate. Messages where the predicate returns false are filtered out and not routed further." }, "statusPropertyName": { "index": 5, "kind": "attribute", "displayName": "Status Property Name", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Name of an exchange property to store whether the filter predicate matched or not. The value is stored as a boolean." }, "outputs": { "index": 6, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List>", "oneOf": [ "a2aSubTask", "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "interceptSendToEndpoint", "kamelet", "loadBalance", "log", "loop", "marshal", "multicast", "onCompletion", "onException", "pausable", "pipeline", "policy", "poll", "pollEnrich", "process", "recipientList", "removeHeader", "removeHeaders", "removeProperties", "removeProperty", "removeVariable", "resequence", "resumable", "rollback", "routingSlip", "saga", "sample", "script", "setBody", "setExchangePattern", "setHeader", "setHeaders", "setProperty", "setVariable", "setVariables", "sort", "split", "step", "stop", "threads", "throttle", "throwException", "to", "toD", "tokenizer", "transacted", "transform", "transformDataType", "unmarshal", "validate", "wireTap" ], "deprecated": false, "autowired": false, "secret": false } } diff --git a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/idempotentConsumer.json b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/idempotentConsumer.json index 8166fe92613ba..fe7f765c2a764 100644 --- a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/idempotentConsumer.json +++ b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/idempotentConsumer.json @@ -17,7 +17,7 @@ "note": { "index": 1, "kind": "attribute", "displayName": "Note", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The note for this node" }, "description": { "index": 2, "kind": "attribute", "displayName": "Description", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The description for this node" }, "disabled": { "index": 3, "kind": "attribute", "displayName": "Disabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to disable this EIP from the route during build time. Once an EIP has been disabled then it cannot be enabled later at runtime." }, - "expression": { "index": 4, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "The expression to compute the unique message ID used for duplicate detection. Messages with the same ID are treated as duplicates and skipped." }, + "expression": { "index": 4, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "python3", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "The expression to compute the unique message ID used for duplicate detection. Messages with the same ID are treated as duplicates and skipped." }, "idempotentRepository": { "index": 5, "kind": "attribute", "displayName": "Idempotent Repository", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.spi.IdempotentRepository", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the reference name of the message id repository to use for storing processed message ids to detect duplicates." }, "eager": { "index": 6, "kind": "attribute", "displayName": "Eager", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Sets whether to eagerly add the key to the idempotent repository or wait until the exchange is complete. Eager is default enabled." }, "completionEager": { "index": 7, "kind": "attribute", "displayName": "Completion Eager", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Sets whether to complete the idempotent consumer eager or when the exchange is done." }, diff --git a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/language/python3.json b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/language/python3.json new file mode 100644 index 0000000000000..26cc6941c202f --- /dev/null +++ b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/language/python3.json @@ -0,0 +1,21 @@ +{ + "model": { + "kind": "model", + "name": "python3", + "title": "Python 3", + "description": "Evaluates a Python 3 expression", + "deprecated": false, + "firstVersion": "4.23.0", + "label": "language,python", + "javaType": "org.apache.camel.model.language.Python3Expression", + "abstract": false, + "input": false, + "output": false + }, + "properties": { + "id": { "index": 0, "kind": "attribute", "displayName": "Id", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The id of this node." }, + "expression": { "index": 1, "kind": "value", "displayName": "Expression", "group": "common", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The expression value in your chosen language syntax." }, + "resultType": { "index": 2, "kind": "attribute", "displayName": "Result Type", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The class of the result type (type from output)." }, + "trim": { "index": 3, "kind": "attribute", "displayName": "Trim", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether to trim the source code to remove leading and trailing whitespaces and line breaks." } + } +} diff --git a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/loadbalancer/stickyLoadBalancer.json b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/loadbalancer/stickyLoadBalancer.json index 4bfca666b9d94..3d5c678a49d3a 100644 --- a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/loadbalancer/stickyLoadBalancer.json +++ b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/loadbalancer/stickyLoadBalancer.json @@ -13,6 +13,6 @@ }, "properties": { "id": { "index": 0, "kind": "attribute", "displayName": "Id", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The id of this node" }, - "correlationExpression": { "index": 1, "kind": "expression", "displayName": "Correlation Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.ExpressionSubElementDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "The correlation expression to use to calculate the correlation key." } + "correlationExpression": { "index": 1, "kind": "expression", "displayName": "Correlation Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.ExpressionSubElementDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "python3", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "The correlation expression to use to calculate the correlation key." } } } diff --git a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/loop.json b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/loop.json index 9d96921332f67..7bef734b83910 100644 --- a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/loop.json +++ b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/loop.json @@ -17,7 +17,7 @@ "note": { "index": 1, "kind": "attribute", "displayName": "Note", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The note for this node" }, "description": { "index": 2, "kind": "attribute", "displayName": "Description", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The description for this node" }, "disabled": { "index": 3, "kind": "attribute", "displayName": "Disabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to disable this EIP from the route during build time. Once an EIP has been disabled then it cannot be enabled later at runtime." }, - "expression": { "index": 4, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "The expression that determines the number of times to loop. The result is converted to an integer." }, + "expression": { "index": 4, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "python3", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "The expression that determines the number of times to loop. The result is converted to an integer." }, "copy": { "index": 5, "kind": "attribute", "displayName": "Copy", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "If enabled, a copy of the input Exchange is used for each iteration. That means each iteration will start from a copy of the same message." }, "doWhile": { "index": 6, "kind": "attribute", "displayName": "Do While", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Enables the while loop that loops until the predicate evaluates to false or null." }, "breakOnShutdown": { "index": 7, "kind": "attribute", "displayName": "Break On Shutdown", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "If enabled, the loop will not iterate until it reaches the end when Camel is shut down." }, diff --git a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/onException.json b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/onException.json index 64dfaee08fb55..1063517cde30c 100644 --- a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/onException.json +++ b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/onException.json @@ -18,11 +18,11 @@ "disabled": { "index": 3, "kind": "attribute", "displayName": "Disabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to disable this EIP from the route during build time. Once an EIP has been disabled then it cannot be enabled later at runtime." }, "exception": { "index": 4, "kind": "element", "displayName": "Exception", "group": "common", "required": true, "type": "array", "javaType": "java.util.List", "deprecated": false, "autowired": false, "secret": false, "description": "A list of exception class names to catch and handle." }, "onWhen": { "index": 5, "kind": "element", "displayName": "On When", "group": "common", "required": false, "type": "object", "javaType": "org.apache.camel.model.OnWhenDefinition", "deprecated": false, "autowired": false, "secret": false, "asPredicate": true, "description": "To use an expression to only trigger this in specific situations" }, - "retryWhile": { "index": 6, "kind": "expression", "displayName": "Retry While", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.camel.model.ExpressionSubElementDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "asPredicate": true, "description": "Sets a predicate to control whether redelivery should continue. Redelivery continues as long as the predicate evaluates to true." }, + "retryWhile": { "index": 6, "kind": "expression", "displayName": "Retry While", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.camel.model.ExpressionSubElementDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "python3", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "asPredicate": true, "description": "Sets a predicate to control whether redelivery should continue. Redelivery continues as long as the predicate evaluates to true." }, "redeliveryPolicy": { "index": 7, "kind": "element", "displayName": "Redelivery Policy", "group": "common", "required": false, "type": "object", "javaType": "org.apache.camel.model.RedeliveryPolicyDefinition", "deprecated": false, "autowired": false, "secret": false, "description": "Configures redelivery options such as maximum redeliveries, delays, and logging behavior." }, "redeliveryPolicyRef": { "index": 8, "kind": "attribute", "displayName": "Redelivery Policy Ref", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets a reference to a redelivery policy to lookup in the registry to be used." }, - "handled": { "index": 9, "kind": "expression", "displayName": "Handled", "group": "common", "required": false, "type": "object", "javaType": "org.apache.camel.model.ExpressionSubElementDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "asPredicate": true, "description": "When handled is set to true, the exception is suppressed and not sent back to the caller. The original route stops at the point of failure and only the steps in this onException block execute. The response returned to the caller is whatever this onException block produces. Use continued instead if you want to resume the original route from the point of failure." }, - "continued": { "index": 10, "kind": "expression", "displayName": "Continued", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.camel.model.ExpressionSubElementDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "asPredicate": true, "description": "When continued is set to true, the exception is handled and routing continues from the point of failure. Unlike handled, which stops the original route and only runs the onException block, continued resumes the original route after the onException steps complete. The exception is considered handled as well." }, + "handled": { "index": 9, "kind": "expression", "displayName": "Handled", "group": "common", "required": false, "type": "object", "javaType": "org.apache.camel.model.ExpressionSubElementDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "python3", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "asPredicate": true, "description": "When handled is set to true, the exception is suppressed and not sent back to the caller. The original route stops at the point of failure and only the steps in this onException block execute. The response returned to the caller is whatever this onException block produces. Use continued instead if you want to resume the original route from the point of failure." }, + "continued": { "index": 10, "kind": "expression", "displayName": "Continued", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.camel.model.ExpressionSubElementDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "python3", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "asPredicate": true, "description": "When continued is set to true, the exception is handled and routing continues from the point of failure. Unlike handled, which stops the original route and only runs the onException block, continued resumes the original route after the onException steps complete. The exception is considered handled as well." }, "onRedeliveryRef": { "index": 11, "kind": "attribute", "displayName": "On Redelivery Ref", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets a reference to a processor that is invoked before each redelivery attempt. Can be used to change the exchange before it is redelivered." }, "onExceptionOccurredRef": { "index": 12, "kind": "attribute", "displayName": "On Exception Occurred Ref", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets a reference to a processor that is invoked just after an exception occurred. Can be used to perform custom logging. Any exception thrown from this processor is ignored." }, "useOriginalMessage": { "index": 13, "kind": "attribute", "displayName": "Use Original Message", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "If enabled, uses the original input message (body and headers) when the exchange is moved to the dead letter queue after all redelivery attempts have been exhausted. Cannot be used together with useOriginalBody." }, diff --git a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/onWhen.json b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/onWhen.json index 07c5614cfa334..8854df5d66f17 100644 --- a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/onWhen.json +++ b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/onWhen.json @@ -15,6 +15,6 @@ "id": { "index": 0, "kind": "attribute", "displayName": "Id", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The id of this node" }, "note": { "index": 1, "kind": "attribute", "displayName": "Note", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The note for this node" }, "description": { "index": 2, "kind": "attribute", "displayName": "Description", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The description for this node" }, - "expression": { "index": 3, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "asPredicate": true, "description": "The predicate expression to evaluate." } + "expression": { "index": 3, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "python3", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "asPredicate": true, "description": "The predicate expression to evaluate." } } } diff --git a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/pollEnrich.json b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/pollEnrich.json index e77f4ca81c107..c6d81a550c0cb 100644 --- a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/pollEnrich.json +++ b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/pollEnrich.json @@ -17,7 +17,7 @@ "note": { "index": 1, "kind": "attribute", "displayName": "Note", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The note for this node" }, "description": { "index": 2, "kind": "attribute", "displayName": "Description", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The description for this node" }, "disabled": { "index": 3, "kind": "attribute", "displayName": "Disabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to disable this EIP from the route during build time. Once an EIP has been disabled then it cannot be enabled later at runtime." }, - "expression": { "index": 4, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "The expression to compute the endpoint URI to poll-enrich from." }, + "expression": { "index": 4, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "python3", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "The expression to compute the endpoint URI to poll-enrich from." }, "variableReceive": { "index": 5, "kind": "attribute", "displayName": "Variable Receive", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "To use a variable to store the received message body (only body, not headers). This makes it handy to use variables for user data and to easily control what data to use for sending and receiving." }, "aggregationStrategy": { "index": 6, "kind": "attribute", "displayName": "Aggregation Strategy", "group": "common", "required": false, "type": "object", "javaType": "org.apache.camel.AggregationStrategy", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the AggregationStrategy to be used to merge the reply from the external service, into a single outgoing message. By default Camel will use the reply from the external service as outgoing message." }, "aggregationStrategyMethodName": { "index": 7, "kind": "attribute", "displayName": "Aggregation Strategy Method Name", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "This option can be used to explicitly declare the method name to use, when using POJOs as the AggregationStrategy." }, diff --git a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/propertyExpression.json b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/propertyExpression.json index 19ae449310e7a..5ddd39418b7e4 100644 --- a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/propertyExpression.json +++ b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/propertyExpression.json @@ -13,6 +13,6 @@ }, "properties": { "key": { "index": 0, "kind": "attribute", "displayName": "Key", "group": "common", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The property key." }, - "expression": { "index": 1, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "The property value as an expression." } + "expression": { "index": 1, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "python3", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "The property value as an expression." } } } diff --git a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/recipientList.json b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/recipientList.json index 35fd3d2d77684..deb030f2a26b1 100644 --- a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/recipientList.json +++ b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/recipientList.json @@ -16,7 +16,7 @@ "note": { "index": 1, "kind": "attribute", "displayName": "Note", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The note for this node" }, "description": { "index": 2, "kind": "attribute", "displayName": "Description", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The description for this node" }, "disabled": { "index": 3, "kind": "attribute", "displayName": "Disabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to disable this EIP from the route during build time. Once an EIP has been disabled then it cannot be enabled later at runtime." }, - "expression": { "index": 4, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "The expression to compute the list of recipient endpoint URIs. The result can be a comma-separated string, a Collection, or an Iterator of endpoint URIs." }, + "expression": { "index": 4, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "python3", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "The expression to compute the list of recipient endpoint URIs. The result can be a comma-separated string, a Collection, or an Iterator of endpoint URIs." }, "delimiter": { "index": 5, "kind": "attribute", "displayName": "Delimiter", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": ",", "description": "Delimiter used if the Expression returned multiple endpoints. Can be turned off using the value false." }, "aggregationStrategy": { "index": 6, "kind": "attribute", "displayName": "Aggregation Strategy", "group": "common", "required": false, "type": "object", "javaType": "org.apache.camel.AggregationStrategy", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the AggregationStrategy to be used to assemble the replies from the recipients, into a single outgoing message." }, "aggregationStrategyMethodName": { "index": 7, "kind": "attribute", "displayName": "Aggregation Strategy Method Name", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "This option can be used to explicitly declare the method name to use, when using POJOs as the AggregationStrategy." }, diff --git a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/resequence.json b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/resequence.json index 3d1b1361e6191..a84dfa727d2f1 100644 --- a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/resequence.json +++ b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/resequence.json @@ -16,7 +16,7 @@ "note": { "index": 1, "kind": "attribute", "displayName": "Note", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The note for this node" }, "description": { "index": 2, "kind": "attribute", "displayName": "Description", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The description for this node" }, "disabled": { "index": 3, "kind": "attribute", "displayName": "Disabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to disable this EIP from the route during build time. Once an EIP has been disabled then it cannot be enabled later at runtime." }, - "expression": { "index": 4, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "Expression to use for re-ordering the messages, such as a header with a sequence number." }, + "expression": { "index": 4, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "python3", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "Expression to use for re-ordering the messages, such as a header with a sequence number." }, "resequencerConfig": { "index": 5, "kind": "element", "displayName": "Resequencer Config", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.config.ResequencerConfig", "oneOf": [ "batchConfig", "streamConfig" ], "deprecated": false, "autowired": false, "secret": false, "description": "Resequencer configuration using either batch or stream mode. Defaults to batch mode." }, "outputs": { "index": 6, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List", "oneOf": [ "a2aSubTask", "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "interceptSendToEndpoint", "kamelet", "loadBalance", "log", "loop", "marshal", "multicast", "onCompletion", "onException", "pausable", "pipeline", "policy", "poll", "pollEnrich", "process", "recipientList", "removeHeader", "removeHeaders", "removeProperties", "removeProperty", "removeVariable", "resequence", "resumable", "rollback", "routingSlip", "saga", "sample", "script", "setBody", "setExchangePattern", "setHeader", "setHeaders", "setProperty", "setVariable", "setVariables", "sort", "split", "step", "stop", "threads", "throttle", "throwException", "to", "toD", "tokenizer", "transacted", "transform", "transformDataType", "unmarshal", "validate", "wireTap" ], "deprecated": false, "autowired": false, "secret": false } } diff --git a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/routingSlip.json b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/routingSlip.json index 28c7302c27720..e3d381914e4a3 100644 --- a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/routingSlip.json +++ b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/routingSlip.json @@ -16,7 +16,7 @@ "note": { "index": 1, "kind": "attribute", "displayName": "Note", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The note for this node" }, "description": { "index": 2, "kind": "attribute", "displayName": "Description", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The description for this node" }, "disabled": { "index": 3, "kind": "attribute", "displayName": "Disabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to disable this EIP from the route during build time. Once an EIP has been disabled then it cannot be enabled later at runtime." }, - "expression": { "index": 4, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "The expression to compute the routing slip of endpoint URIs. The result is a delimited list of endpoint URIs that defines the series of processing steps." }, + "expression": { "index": 4, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "python3", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "The expression to compute the routing slip of endpoint URIs. The result is a delimited list of endpoint URIs that defines the series of processing steps." }, "uriDelimiter": { "index": 5, "kind": "attribute", "displayName": "Uri Delimiter", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": ",", "description": "The delimiter used to separate endpoint URIs in the routing slip expression. Default is comma." }, "ignoreInvalidEndpoints": { "index": 6, "kind": "attribute", "displayName": "Ignore Invalid Endpoints", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "If enabled then invalid endpoint URIs are ignored and logged instead of throwing an exception." }, "cacheSize": { "index": 7, "kind": "attribute", "displayName": "Cache Size", "group": "advanced", "label": "advanced", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "description": "Configures the cache size for ProducerCache which caches producers for reuse. The default cache size is 1000. Set to -1 to turn off caching." }, diff --git a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/script.json b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/script.json index 84cf6061c67bb..1bd6bf8eca059 100644 --- a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/script.json +++ b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/script.json @@ -16,6 +16,6 @@ "note": { "index": 1, "kind": "attribute", "displayName": "Note", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The note for this node" }, "description": { "index": 2, "kind": "attribute", "displayName": "Description", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The description for this node" }, "disabled": { "index": 3, "kind": "attribute", "displayName": "Disabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to disable this EIP from the route during build time. Once an EIP has been disabled then it cannot be enabled later at runtime." }, - "expression": { "index": 4, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "The expression to evaluate as a script. The script result does not change the message body (use transform instead if that is desired)." } + "expression": { "index": 4, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "python3", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "The expression to evaluate as a script. The script result does not change the message body (use transform instead if that is desired)." } } } diff --git a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/setBody.json b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/setBody.json index 7667afe71b141..e8a0f46685be9 100644 --- a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/setBody.json +++ b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/setBody.json @@ -17,6 +17,6 @@ "note": { "index": 1, "kind": "attribute", "displayName": "Note", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The note for this node" }, "description": { "index": 2, "kind": "attribute", "displayName": "Description", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The description for this node" }, "disabled": { "index": 3, "kind": "attribute", "displayName": "Disabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to disable this EIP from the route during build time. Once an EIP has been disabled then it cannot be enabled later at runtime." }, - "expression": { "index": 4, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "The expression whose result is used as the new message body." } + "expression": { "index": 4, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "python3", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "The expression whose result is used as the new message body." } } } diff --git a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/setHeader.json b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/setHeader.json index e529220417b6b..731ce08b1f8bc 100644 --- a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/setHeader.json +++ b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/setHeader.json @@ -17,6 +17,6 @@ "description": { "index": 2, "kind": "attribute", "displayName": "Description", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The description for this node" }, "disabled": { "index": 3, "kind": "attribute", "displayName": "Disabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to disable this EIP from the route during build time. Once an EIP has been disabled then it cannot be enabled later at runtime." }, "name": { "index": 4, "kind": "attribute", "displayName": "Name", "group": "common", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Name of message header to set a new value. The simple language can be used to define a dynamic evaluated header name. Otherwise a constant name will be used." }, - "expression": { "index": 5, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "The expression whose result is used as the header value." } + "expression": { "index": 5, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "python3", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "The expression whose result is used as the header value." } } } diff --git a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/setProperty.json b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/setProperty.json index 6d3f1ad4c3e66..597a5415bd752 100644 --- a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/setProperty.json +++ b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/setProperty.json @@ -17,6 +17,6 @@ "description": { "index": 2, "kind": "attribute", "displayName": "Description", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The description for this node" }, "disabled": { "index": 3, "kind": "attribute", "displayName": "Disabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to disable this EIP from the route during build time. Once an EIP has been disabled then it cannot be enabled later at runtime." }, "name": { "index": 4, "kind": "attribute", "displayName": "Name", "group": "common", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Name of exchange property to set a new value. The simple language can be used to define a dynamic evaluated property name. Otherwise a constant name will be used." }, - "expression": { "index": 5, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "The expression whose result is used as the exchange property value." } + "expression": { "index": 5, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "python3", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "The expression whose result is used as the exchange property value." } } } diff --git a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/setVariable.json b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/setVariable.json index 04c1de1ba2298..5488ce47fb651 100644 --- a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/setVariable.json +++ b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/setVariable.json @@ -17,6 +17,6 @@ "description": { "index": 2, "kind": "attribute", "displayName": "Description", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The description for this node" }, "disabled": { "index": 3, "kind": "attribute", "displayName": "Disabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to disable this EIP from the route during build time. Once an EIP has been disabled then it cannot be enabled later at runtime." }, "name": { "index": 4, "kind": "attribute", "displayName": "Name", "group": "common", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Name of variable to set a new value. The simple language can be used to define a dynamic evaluated variable name. Otherwise a constant name will be used." }, - "expression": { "index": 5, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "The expression whose result is used as the variable value." } + "expression": { "index": 5, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "python3", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "The expression whose result is used as the variable value." } } } diff --git a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/sort.json b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/sort.json index 6325ce79c1043..5d9ce495bb10b 100644 --- a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/sort.json +++ b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/sort.json @@ -16,7 +16,7 @@ "note": { "index": 1, "kind": "attribute", "displayName": "Note", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The note for this node" }, "description": { "index": 2, "kind": "attribute", "displayName": "Description", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The description for this node" }, "disabled": { "index": 3, "kind": "attribute", "displayName": "Disabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to disable this EIP from the route during build time. Once an EIP has been disabled then it cannot be enabled later at runtime." }, - "expression": { "index": 4, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "The expression to use for sorting. The message body is split into a list, sorted using this expression as the comparator key, and then reassembled." }, + "expression": { "index": 4, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "python3", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "The expression to use for sorting. The message body is split into a list, sorted using this expression as the comparator key, and then reassembled." }, "comparator": { "index": 5, "kind": "attribute", "displayName": "Comparator", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "java.util.Comparator", "deprecated": false, "autowired": false, "secret": false, "description": "Sets a reference to lookup for the comparator to use for sorting." } } } diff --git a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/split.json b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/split.json index 52eef2d800759..970ae07c3dcc0 100644 --- a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/split.json +++ b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/split.json @@ -17,7 +17,7 @@ "note": { "index": 1, "kind": "attribute", "displayName": "Note", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The note for this node" }, "description": { "index": 2, "kind": "attribute", "displayName": "Description", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The description for this node" }, "disabled": { "index": 3, "kind": "attribute", "displayName": "Disabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to disable this EIP from the route during build time. Once an EIP has been disabled then it cannot be enabled later at runtime." }, - "expression": { "index": 4, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "The expression that returns the value to use for splitting. The result can be an Iterator, Iterable, Array, Collection, Map, NodeList, or a delimited String." }, + "expression": { "index": 4, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "python3", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "The expression that returns the value to use for splitting. The result can be an Iterator, Iterable, Array, Collection, Map, NodeList, or a delimited String." }, "delimiter": { "index": 5, "kind": "attribute", "displayName": "Delimiter", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": ",", "description": "Delimiter used in splitting messages. Can be turned off using the value false. To force not splitting then the delimiter can be set to single to use the value as a single list. The default value is comma." }, "aggregationStrategy": { "index": 6, "kind": "attribute", "displayName": "Aggregation Strategy", "group": "common", "required": false, "type": "object", "javaType": "org.apache.camel.AggregationStrategy", "deprecated": false, "autowired": false, "secret": false, "description": "Reference to the AggregationStrategy to assemble the replies from the split messages into a single outgoing message. By default Camel uses the original incoming message." }, "aggregationStrategyMethodName": { "index": 7, "kind": "attribute", "displayName": "Aggregation Strategy Method Name", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The method name to use when using a POJO as the AggregationStrategy." }, diff --git a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/throttle.json b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/throttle.json index 7f3f7c65fb832..c985030154cf9 100644 --- a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/throttle.json +++ b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/throttle.json @@ -17,9 +17,9 @@ "note": { "index": 1, "kind": "attribute", "displayName": "Note", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The note for this node" }, "description": { "index": 2, "kind": "attribute", "displayName": "Description", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The description for this node" }, "disabled": { "index": 3, "kind": "attribute", "displayName": "Disabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to disable this EIP from the route during build time. Once an EIP has been disabled then it cannot be enabled later at runtime." }, - "expression": { "index": 4, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "The expression to set the maximum request count (for TotalRequests mode) or the maximum number of concurrent requests (for ConcurrentRequests mode)." }, + "expression": { "index": 4, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "python3", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "The expression to set the maximum request count (for TotalRequests mode) or the maximum number of concurrent requests (for ConcurrentRequests mode)." }, "mode": { "index": 5, "kind": "attribute", "displayName": "Mode", "group": "common", "required": false, "type": "enum", "javaType": "org.apache.camel.model.ThrottlingMode", "enum": [ "TotalRequests", "ConcurrentRequests" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "TotalRequests", "description": "Sets the throttling mode. TotalRequests limits the total number of requests within a time period. ConcurrentRequests uses a leaky-bucket algorithm to limit the number of concurrent requests being processed at the same time." }, - "correlationExpression": { "index": 6, "kind": "expression", "displayName": "Correlation Expression", "group": "common", "required": false, "type": "object", "javaType": "org.apache.camel.model.ExpressionSubElementDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "The correlation expression to use for throttle grouping. Exchanges with the same correlation key are throttled together." }, + "correlationExpression": { "index": 6, "kind": "expression", "displayName": "Correlation Expression", "group": "common", "required": false, "type": "object", "javaType": "org.apache.camel.model.ExpressionSubElementDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "python3", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "The correlation expression to use for throttle grouping. Exchanges with the same correlation key are throttled together." }, "executorService": { "index": 7, "kind": "attribute", "displayName": "Executor Service", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "java.util.concurrent.ExecutorService", "deprecated": false, "autowired": false, "secret": false, "description": "To use a custom thread pool (ScheduledExecutorService) by the throttler." }, "asyncDelayed": { "index": 8, "kind": "attribute", "displayName": "Async Delayed", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Enables asynchronous delay which means the thread will not block while delaying." }, "callerRunsWhenRejected": { "index": 9, "kind": "attribute", "displayName": "Caller Runs When Rejected", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether or not the caller should run the task when it was rejected by the thread pool." }, diff --git a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/transform.json b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/transform.json index 8bab988217447..f98d51196bef4 100644 --- a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/transform.json +++ b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/transform.json @@ -17,6 +17,6 @@ "note": { "index": 1, "kind": "attribute", "displayName": "Note", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The note for this node" }, "description": { "index": 2, "kind": "attribute", "displayName": "Description", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The description for this node" }, "disabled": { "index": 3, "kind": "attribute", "displayName": "Disabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to disable this EIP from the route during build time. Once an EIP has been disabled then it cannot be enabled later at runtime." }, - "expression": { "index": 4, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "The expression whose result replaces the message body." } + "expression": { "index": 4, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "python3", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "The expression whose result replaces the message body." } } } diff --git a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/validate.json b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/validate.json index 0db92cd804ff3..53c0916a9afcf 100644 --- a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/validate.json +++ b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/validate.json @@ -17,7 +17,7 @@ "note": { "index": 1, "kind": "attribute", "displayName": "Note", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The note for this node" }, "description": { "index": 2, "kind": "attribute", "displayName": "Description", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The description for this node" }, "disabled": { "index": 3, "kind": "attribute", "displayName": "Disabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to disable this EIP from the route during build time. Once an EIP has been disabled then it cannot be enabled later at runtime." }, - "expression": { "index": 4, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "asPredicate": true, "description": "The predicate expression to validate against the current message. If the predicate returns false, a PredicateValidationException is thrown." }, + "expression": { "index": 4, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "python3", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "asPredicate": true, "description": "The predicate expression to validate against the current message. If the predicate returns false, a PredicateValidationException is thrown." }, "predicateExceptionFactory": { "index": 5, "kind": "attribute", "displayName": "Predicate Exception Factory", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.camel.spi.PredicateExceptionFactory", "deprecated": false, "autowired": false, "secret": false, "description": "Reference to a custom PredicateExceptionFactory for creating the exception when validation fails." } } } diff --git a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/validator/predicateValidator.json b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/validator/predicateValidator.json index 735c10490fa68..05463c1d00170 100644 --- a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/validator/predicateValidator.json +++ b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/validator/predicateValidator.json @@ -12,7 +12,7 @@ "output": false }, "properties": { - "expression": { "index": 0, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "The predicate expression to use for validation." }, + "expression": { "index": 0, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "python3", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "The predicate expression to use for validation." }, "type": { "index": 1, "kind": "attribute", "displayName": "Type", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The data type name to validate. If you specify 'xml:XYZ', the validator is picked up when message type is 'xml:XYZ'. If you specify just 'xml', the validator matches all xml message types." } } } diff --git a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/when.json b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/when.json index 0e73fbef4864b..64464cfe06f6f 100644 --- a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/when.json +++ b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/when.json @@ -16,7 +16,7 @@ "note": { "index": 1, "kind": "attribute", "displayName": "Note", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The note for this node" }, "description": { "index": 2, "kind": "attribute", "displayName": "Description", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The description for this node" }, "disabled": { "index": 3, "kind": "attribute", "displayName": "Disabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Disables this EIP from the route." }, - "expression": { "index": 4, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "asPredicate": true, "description": "Expression used as the predicate to evaluate whether this when should trigger and route the message or not." }, + "expression": { "index": 4, "kind": "expression", "displayName": "Expression", "group": "common", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "jactl", "java", "joor", "jq", "js", "jsonpath", "language", "method", "mvel", "ognl", "python", "python3", "ref", "simple", "spel", "tokenize", "variable", "wasm", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "asPredicate": true, "description": "Expression used as the predicate to evaluate whether this when should trigger and route the message or not." }, "outputs": { "index": 5, "kind": "element", "displayName": "Outputs", "group": "common", "required": true, "type": "array", "javaType": "java.util.List>", "oneOf": [ "a2aSubTask", "aggregate", "bean", "choice", "circuitBreaker", "claimCheck", "convertBodyTo", "convertHeaderTo", "convertVariableTo", "delay", "doCatch", "doFinally", "doTry", "dynamicRouter", "enrich", "filter", "idempotentConsumer", "intercept", "interceptFrom", "interceptSendToEndpoint", "kamelet", "loadBalance", "log", "loop", "marshal", "multicast", "onCompletion", "onException", "pausable", "pipeline", "policy", "poll", "pollEnrich", "process", "recipientList", "removeHeader", "removeHeaders", "removeProperties", "removeProperty", "removeVariable", "resequence", "resumable", "rollback", "routingSlip", "saga", "sample", "script", "setBody", "setExchangePattern", "setHeader", "setHeaders", "setProperty", "setVariable", "setVariables", "sort", "split", "step", "stop", "threads", "throttle", "throwException", "to", "toD", "tokenizer", "transacted", "transform", "transformDataType", "unmarshal", "validate", "wireTap" ], "deprecated": false, "autowired": false, "secret": false } } } diff --git a/core/camel-core-model/src/generated/resources/META-INF/services/org/apache/camel/model.properties b/core/camel-core-model/src/generated/resources/META-INF/services/org/apache/camel/model.properties index e230d8d32d785..8a1cf3b90fb8a 100644 --- a/core/camel-core-model/src/generated/resources/META-INF/services/org/apache/camel/model.properties +++ b/core/camel-core-model/src/generated/resources/META-INF/services/org/apache/camel/model.properties @@ -135,6 +135,7 @@ propertyExpression protobuf put python +python3 randomLoadBalancer recipientList redeliveryPolicy diff --git a/core/camel-core-model/src/generated/resources/org/apache/camel/model/language/jaxb.index b/core/camel-core-model/src/generated/resources/org/apache/camel/model/language/jaxb.index index 50cfdcbba3093..6f66737bdae13 100644 --- a/core/camel-core-model/src/generated/resources/org/apache/camel/model/language/jaxb.index +++ b/core/camel-core-model/src/generated/resources/org/apache/camel/model/language/jaxb.index @@ -17,6 +17,7 @@ LanguageExpression MethodCallExpression MvelExpression OgnlExpression +Python3Expression PythonExpression RefExpression SimpleExpression diff --git a/core/camel-core-model/src/main/java/org/apache/camel/builder/ExpressionClause.java b/core/camel-core-model/src/main/java/org/apache/camel/builder/ExpressionClause.java index 43775948eb161..e7c7d91efbab2 100644 --- a/core/camel-core-model/src/main/java/org/apache/camel/builder/ExpressionClause.java +++ b/core/camel-core-model/src/main/java/org/apache/camel/builder/ExpressionClause.java @@ -583,6 +583,27 @@ public T python(String text, Class resultType) { return delegate.python(text, resultType); } + /** + * Evaluates a Python 3 expression. + * + * @param text the expression to be evaluated + * @return the builder to continue processing the DSL + */ + public T python3(String text) { + return delegate.python3(text); + } + + /** + * Evaluates a Python 3 expression. + * + * @param text the expression to be evaluated + * @param resultType the return type expected by the expression + * @return the builder to continue processing the DSL + */ + public T python3(String text, Class resultType) { + return delegate.python3(text, resultType); + } + /** * Evaluates a MVEL expression * diff --git a/core/camel-core-model/src/main/java/org/apache/camel/builder/ExpressionClauseSupport.java b/core/camel-core-model/src/main/java/org/apache/camel/builder/ExpressionClauseSupport.java index 1af8273575760..96aa4e61cb1e7 100644 --- a/core/camel-core-model/src/main/java/org/apache/camel/builder/ExpressionClauseSupport.java +++ b/core/camel-core-model/src/main/java/org/apache/camel/builder/ExpressionClauseSupport.java @@ -42,6 +42,7 @@ import org.apache.camel.model.language.MethodCallExpression; import org.apache.camel.model.language.MvelExpression; import org.apache.camel.model.language.OgnlExpression; +import org.apache.camel.model.language.Python3Expression; import org.apache.camel.model.language.PythonExpression; import org.apache.camel.model.language.RefExpression; import org.apache.camel.model.language.SimpleExpression; @@ -714,6 +715,29 @@ public T python(String text, Class resultType) { return expression(exp); } + /** + * Evaluates a Python 3 expression. + * + * @param text the expression to be evaluated + * @return the builder to continue processing the DSL + */ + public T python3(String text) { + return expression(new Python3Expression(text)); + } + + /** + * Evaluates a Python 3 expression + * + * @param text the expression to be evaluated + * @param resultType the return type expected by the expression + * @return the builder to continue processing the DSL + */ + public T python3(String text, Class resultType) { + Python3Expression exp = new Python3Expression(text); + exp.setResultType(resultType); + return expression(exp); + } + /** * Evaluates a MVEL expression * diff --git a/core/camel-core-model/src/main/java/org/apache/camel/builder/LanguageBuilderFactory.java b/core/camel-core-model/src/main/java/org/apache/camel/builder/LanguageBuilderFactory.java index e9a0fedcfbe8b..23a9bf50cddff 100644 --- a/core/camel-core-model/src/main/java/org/apache/camel/builder/LanguageBuilderFactory.java +++ b/core/camel-core-model/src/main/java/org/apache/camel/builder/LanguageBuilderFactory.java @@ -33,6 +33,7 @@ import org.apache.camel.model.language.MethodCallExpression; import org.apache.camel.model.language.MvelExpression; import org.apache.camel.model.language.OgnlExpression; +import org.apache.camel.model.language.Python3Expression; import org.apache.camel.model.language.PythonExpression; import org.apache.camel.model.language.RefExpression; import org.apache.camel.model.language.SimpleExpression; @@ -355,6 +356,22 @@ public PythonExpression.Builder python(String expression) { return builder; } + /** + * Uses the Python 3 language + */ + public Python3Expression.Builder python3() { + return new Python3Expression.Builder(); + } + + /** + * Uses the Python 3 language + */ + public Python3Expression.Builder python3(String expression) { + var builder = python3(); + builder.expression(expression); + return builder; + } + /** * Uses the Ref language */ diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/language/Python3Expression.java b/core/camel-core-model/src/main/java/org/apache/camel/model/language/Python3Expression.java new file mode 100644 index 0000000000000..b12ca086404fb --- /dev/null +++ b/core/camel-core-model/src/main/java/org/apache/camel/model/language/Python3Expression.java @@ -0,0 +1,71 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.model.language; + +import jakarta.xml.bind.annotation.XmlAccessType; +import jakarta.xml.bind.annotation.XmlAccessorType; +import jakarta.xml.bind.annotation.XmlRootElement; +import jakarta.xml.bind.annotation.XmlTransient; + +import org.apache.camel.spi.Metadata; + +/** + * Evaluates a Python 3 expression. + */ +@Metadata(firstVersion = "4.23.0", label = "language,python", title = "Python 3", + description = "Evaluates a Python 3 expression") +@XmlRootElement(name = "python3") +@XmlAccessorType(XmlAccessType.FIELD) +public class Python3Expression extends TypedExpressionDefinition { + + public Python3Expression() { + } + + protected Python3Expression(Python3Expression source) { + super(source); + } + + public Python3Expression(String expression) { + super(expression); + } + + private Python3Expression(Builder builder) { + super(builder); + } + + @Override + public Python3Expression copyDefinition() { + return new Python3Expression(this); + } + + @Override + public String getLanguage() { + return "python3"; + } + + /** + * {@code Builder} is a specific builder for {@link Python3Expression}. + */ + @XmlTransient + public static class Builder extends AbstractBuilder { + + @Override + public Python3Expression end() { + return new Python3Expression(this); + } + } +} diff --git a/core/camel-java-io/src/generated/java/org/apache/camel/java/out/JavaDslModelWriter.java b/core/camel-java-io/src/generated/java/org/apache/camel/java/out/JavaDslModelWriter.java index dd67911afc845..d00bf753df82f 100644 --- a/core/camel-java-io/src/generated/java/org/apache/camel/java/out/JavaDslModelWriter.java +++ b/core/camel-java-io/src/generated/java/org/apache/camel/java/out/JavaDslModelWriter.java @@ -1342,6 +1342,13 @@ public String writeOgnlExpression(OgnlExpression def) { doWriteOgnlExpression(sb, def); return sb.toString(); } + public String writePython3Expression(Python3Expression def) { + resetState(); + StringBuilder sb = new StringBuilder(); + beginStep(sb, "python3", def); + doWritePython3Expression(sb, def); + return sb.toString(); + } public String writePythonExpression(PythonExpression def) { resetState(); StringBuilder sb = new StringBuilder(); @@ -3537,6 +3544,10 @@ protected void doWriteOgnlExpression(StringBuilder sb, OgnlExpression def) { doWriteTypedExpressionDefinitionAttributes(sb, def); doWriteValue(sb, def.getExpression()); } + protected void doWritePython3Expression(StringBuilder sb, Python3Expression def) { + doWriteTypedExpressionDefinitionAttributes(sb, def); + doWriteValue(sb, def.getExpression()); + } protected void doWritePythonExpression(StringBuilder sb, PythonExpression def) { doWriteTypedExpressionDefinitionAttributes(sb, def); doWriteValue(sb, def.getExpression()); @@ -6319,6 +6330,11 @@ protected void doWriteExpressionDefinitionRef(StringBuilder sb, ExpressionDefini doWriteOgnlExpression(sb, (OgnlExpression) v); endStep(sb, "ognl", v); } + case "Python3Expression" -> { + beginStep(sb, "python3", v); + doWritePython3Expression(sb, (Python3Expression) v); + endStep(sb, "python3", v); + } case "PythonExpression" -> { beginStep(sb, "python", v); doWritePythonExpression(sb, (PythonExpression) v); diff --git a/core/camel-main/src/generated/resources/org/apache/camel/main/languages.properties b/core/camel-main/src/generated/resources/org/apache/camel/main/languages.properties index 3badcb79fb2a7..a2618fb067be5 100644 --- a/core/camel-main/src/generated/resources/org/apache/camel/main/languages.properties +++ b/core/camel-main/src/generated/resources/org/apache/camel/main/languages.properties @@ -16,6 +16,7 @@ jsonpath mvel ognl python +python3 ref simple spel diff --git a/core/camel-xml-io/src/generated/java/org/apache/camel/xml/in/ModelParser.java b/core/camel-xml-io/src/generated/java/org/apache/camel/xml/in/ModelParser.java index bca8064451517..71d8da7b4f1ed 100644 --- a/core/camel-xml-io/src/generated/java/org/apache/camel/xml/in/ModelParser.java +++ b/core/camel-xml-io/src/generated/java/org/apache/camel/xml/in/ModelParser.java @@ -2325,6 +2325,9 @@ protected MvelExpression doParseMvelExpression() throws IOException, XmlPullPars protected OgnlExpression doParseOgnlExpression() throws IOException, XmlPullParserException { return doParse(new OgnlExpression(), typedExpressionDefinitionAttributeHandler(), noElementHandler(), expressionDefinitionValueHandler()); } + protected Python3Expression doParsePython3Expression() throws IOException, XmlPullParserException { + return doParse(new Python3Expression(), typedExpressionDefinitionAttributeHandler(), noElementHandler(), expressionDefinitionValueHandler()); + } protected PythonExpression doParsePythonExpression() throws IOException, XmlPullParserException { return doParse(new PythonExpression(), typedExpressionDefinitionAttributeHandler(), noElementHandler(), expressionDefinitionValueHandler()); } @@ -2905,6 +2908,7 @@ protected ExpressionDefinition doParseExpressionDefinitionRef(String key) throws case "method": return doParseMethodCallExpression(); case "mvel": return doParseMvelExpression(); case "ognl": return doParseOgnlExpression(); + case "python3": return doParsePython3Expression(); case "python": return doParsePythonExpression(); case "ref": return doParseRefExpression(); case "simple": return doParseSimpleExpression(); diff --git a/core/camel-xml-io/src/generated/java/org/apache/camel/xml/out/ModelWriter.java b/core/camel-xml-io/src/generated/java/org/apache/camel/xml/out/ModelWriter.java index 3f664175a3f20..684c29d4b9e87 100644 --- a/core/camel-xml-io/src/generated/java/org/apache/camel/xml/out/ModelWriter.java +++ b/core/camel-xml-io/src/generated/java/org/apache/camel/xml/out/ModelWriter.java @@ -611,6 +611,9 @@ public void writeMvelExpression(MvelExpression def) throws IOException { public void writeOgnlExpression(OgnlExpression def) throws IOException { doWriteOgnlExpression("ognl", def); } + public void writePython3Expression(Python3Expression def) throws IOException { + doWritePython3Expression("python3", def); + } public void writePythonExpression(PythonExpression def) throws IOException { doWritePythonExpression("python", def); } @@ -3005,6 +3008,12 @@ protected void doWriteOgnlExpression(String name, OgnlExpression def) throws IOE doWriteValue(def.getExpression()); endElement(name); } + protected void doWritePython3Expression(String name, Python3Expression def) throws IOException { + startElement(name); + doWriteTypedExpressionDefinitionAttributes(def); + doWriteValue(def.getExpression()); + endElement(name); + } protected void doWritePythonExpression(String name, PythonExpression def) throws IOException { startElement(name); doWriteTypedExpressionDefinitionAttributes(def); @@ -3881,6 +3890,7 @@ protected void doWriteExpressionDefinitionRef(String n, ExpressionDefinition v) case "MethodCallExpression" -> doWriteMethodCallExpression("method", (MethodCallExpression) v); case "MvelExpression" -> doWriteMvelExpression("mvel", (MvelExpression) v); case "OgnlExpression" -> doWriteOgnlExpression("ognl", (OgnlExpression) v); + case "Python3Expression" -> doWritePython3Expression("python3", (Python3Expression) v); case "PythonExpression" -> doWritePythonExpression("python", (PythonExpression) v); case "RefExpression" -> doWriteRefExpression("ref", (RefExpression) v); case "SimpleExpression" -> doWriteSimpleExpression("simple", (SimpleExpression) v); diff --git a/core/camel-yaml-io/src/generated/java/org/apache/camel/yaml/out/YamlModelWriter.java b/core/camel-yaml-io/src/generated/java/org/apache/camel/yaml/out/YamlModelWriter.java index 88bb222f4b4ef..c7703ef68bdab 100644 --- a/core/camel-yaml-io/src/generated/java/org/apache/camel/yaml/out/YamlModelWriter.java +++ b/core/camel-yaml-io/src/generated/java/org/apache/camel/yaml/out/YamlModelWriter.java @@ -604,6 +604,9 @@ public JsonObject writeMvelExpression(MvelExpression def) { public JsonObject writeOgnlExpression(OgnlExpression def) { return wrapNode("ognl", doWriteOgnlExpression(def)); } + public JsonObject writePython3Expression(Python3Expression def) { + return wrapNode("python3", doWritePython3Expression(def)); + } public JsonObject writePythonExpression(PythonExpression def) { return wrapNode("python", doWritePythonExpression(def)); } @@ -3003,6 +3006,12 @@ protected JsonObject doWriteOgnlExpression(OgnlExpression def) { doWriteValue(jo, def.getExpression()); return jo; } + protected JsonObject doWritePython3Expression(Python3Expression def) { + JsonObject jo = new JsonObject(); + doWriteTypedExpressionDefinitionAttributes(jo, def); + doWriteValue(jo, def.getExpression()); + return jo; + } protected JsonObject doWritePythonExpression(PythonExpression def) { JsonObject jo = new JsonObject(); doWriteTypedExpressionDefinitionAttributes(jo, def); @@ -3911,6 +3920,7 @@ protected JsonObject doWriteExpressionDefinitionRef(ExpressionDefinition v) { case "MethodCallExpression" -> wrapNode("method", doWriteMethodCallExpression((MethodCallExpression) v)); case "MvelExpression" -> wrapNode("mvel", doWriteMvelExpression((MvelExpression) v)); case "OgnlExpression" -> wrapNode("ognl", doWriteOgnlExpression((OgnlExpression) v)); + case "Python3Expression" -> wrapNode("python3", doWritePython3Expression((Python3Expression) v)); case "PythonExpression" -> wrapNode("python", doWritePythonExpression((PythonExpression) v)); case "RefExpression" -> wrapNode("ref", doWriteRefExpression((RefExpression) v)); case "SimpleExpression" -> wrapNode("simple", doWriteSimpleExpression((SimpleExpression) v)); diff --git a/coverage/pom.xml b/coverage/pom.xml index 4c258f5b1653f..38e2ff5694b5d 100644 --- a/coverage/pom.xml +++ b/coverage/pom.xml @@ -1857,6 +1857,11 @@ camel-python ${project.version} + + org.apache.camel + camel-python3 + ${project.version} + org.apache.camel camel-qdrant diff --git a/docs/components/modules/languages/examples/json/python3.json b/docs/components/modules/languages/examples/json/python3.json new file mode 120000 index 0000000000000..444dc7a53d68e --- /dev/null +++ b/docs/components/modules/languages/examples/json/python3.json @@ -0,0 +1 @@ +../../../../../../components/camel-python3/src/generated/resources/META-INF/org/apache/camel/language/python3/python3.json \ No newline at end of file diff --git a/docs/components/modules/languages/nav.adoc b/docs/components/modules/languages/nav.adoc index d71e73eede977..1601ce0d38e33 100644 --- a/docs/components/modules/languages/nav.adoc +++ b/docs/components/modules/languages/nav.adoc @@ -20,6 +20,7 @@ ** xref:mvel-language.adoc[MVEL] ** xref:ognl-language.adoc[OGNL] ** xref:python-language.adoc[Python] +** xref:python3-language.adoc[Python 3] ** xref:ref-language.adoc[Ref] ** xref:simple-language.adoc[Simple] ** xref:simple-advanced.adoc[Simple - Advanced Features] diff --git a/docs/components/modules/languages/pages/python3-language.adoc b/docs/components/modules/languages/pages/python3-language.adoc new file mode 120000 index 0000000000000..c0cbad6c25816 --- /dev/null +++ b/docs/components/modules/languages/pages/python3-language.adoc @@ -0,0 +1 @@ +../../../../../components/camel-python3/src/main/docs/python3-language.adoc \ No newline at end of file diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java index 1de2236fc4628..49d0c7624fbbf 100644 --- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java +++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java @@ -11252,10 +11252,10 @@ public static LangChain4jWebSearchEndpointBuilderFactory.LangChain4jWebSearchEnd * * Path parameter: languageName (required) * Sets the name of the language to use - * There are 26 enums and the value can be one of: bean, constant, csimple, + * There are 27 enums and the value can be one of: bean, constant, csimple, * datasonnet, exchangeProperty, file, groovy, header, hl7terser, java, - * joor, jq, js, jsonpath, mvel, ognl, python, ref, simple, spel, tokenize, - * variable, wasm, xpath, xquery, xtokenize + * joor, jq, js, jsonpath, mvel, ognl, python, python3, ref, simple, spel, + * tokenize, variable, wasm, xpath, xquery, xtokenize * * Path parameter: resourceUri * Path to the resource, or a reference to lookup a bean in the Registry to @@ -11281,10 +11281,10 @@ public static LanguageEndpointBuilderFactory.LanguageEndpointBuilder language(St * * Path parameter: languageName (required) * Sets the name of the language to use - * There are 26 enums and the value can be one of: bean, constant, csimple, + * There are 27 enums and the value can be one of: bean, constant, csimple, * datasonnet, exchangeProperty, file, groovy, header, hl7terser, java, - * joor, jq, js, jsonpath, mvel, ognl, python, ref, simple, spel, tokenize, - * variable, wasm, xpath, xquery, xtokenize + * joor, jq, js, jsonpath, mvel, ognl, python, python3, ref, simple, spel, + * tokenize, variable, wasm, xpath, xquery, xtokenize * * Path parameter: resourceUri * Path to the resource, or a reference to lookup a bean in the Registry to diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/LanguageEndpointBuilderFactory.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/LanguageEndpointBuilderFactory.java index 778618d7ef7aa..71e586744ae66 100644 --- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/LanguageEndpointBuilderFactory.java +++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/LanguageEndpointBuilderFactory.java @@ -362,10 +362,10 @@ default LanguageHeaderNameBuilder language() { * * Path parameter: languageName (required) * Sets the name of the language to use - * There are 26 enums and the value can be one of: bean, constant, + * There are 27 enums and the value can be one of: bean, constant, * csimple, datasonnet, exchangeProperty, file, groovy, header, - * hl7terser, java, joor, jq, js, jsonpath, mvel, ognl, python, ref, - * simple, spel, tokenize, variable, wasm, xpath, xquery, xtokenize + * hl7terser, java, joor, jq, js, jsonpath, mvel, ognl, python, python3, + * ref, simple, spel, tokenize, variable, wasm, xpath, xquery, xtokenize * * Path parameter: resourceUri * Path to the resource, or a reference to lookup a bean in the Registry @@ -391,10 +391,10 @@ default LanguageEndpointBuilder language(String path) { * * Path parameter: languageName (required) * Sets the name of the language to use - * There are 26 enums and the value can be one of: bean, constant, + * There are 27 enums and the value can be one of: bean, constant, * csimple, datasonnet, exchangeProperty, file, groovy, header, - * hl7terser, java, joor, jq, js, jsonpath, mvel, ognl, python, ref, - * simple, spel, tokenize, variable, wasm, xpath, xquery, xtokenize + * hl7terser, java, joor, jq, js, jsonpath, mvel, ognl, python, python3, + * ref, simple, spel, tokenize, variable, wasm, xpath, xquery, xtokenize * * Path parameter: resourceUri * Path to the resource, or a reference to lookup a bean in the Registry diff --git a/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/ExpressionDeserializers.java b/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/ExpressionDeserializers.java index bfd0aac0b6033..718667166c6a6 100644 --- a/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/ExpressionDeserializers.java +++ b/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/ExpressionDeserializers.java @@ -98,6 +98,9 @@ public static ExpressionDefinition constructExpressionType(String id, Node node) case "python": { return asType(node, org.apache.camel.model.language.PythonExpression.class); } + case "python3": { + return asType(node, org.apache.camel.model.language.Python3Expression.class); + } case "ref": { return asType(node, org.apache.camel.model.language.RefExpression.class); } @@ -160,6 +163,7 @@ public static ExpressionDefinition constructExpressionType(String id, Node node) @YamlProperty(name = "mvel", type = "object:org.apache.camel.model.language.MvelExpression", oneOf = "expression"), @YamlProperty(name = "ognl", type = "object:org.apache.camel.model.language.OgnlExpression", oneOf = "expression"), @YamlProperty(name = "python", type = "object:org.apache.camel.model.language.PythonExpression", oneOf = "expression"), + @YamlProperty(name = "python3", type = "object:org.apache.camel.model.language.Python3Expression", oneOf = "expression"), @YamlProperty(name = "ref", type = "object:org.apache.camel.model.language.RefExpression", oneOf = "expression"), @YamlProperty(name = "simple", type = "object:org.apache.camel.model.language.SimpleExpression", oneOf = "expression"), @YamlProperty(name = "spel", type = "object:org.apache.camel.model.language.SpELExpression", oneOf = "expression"), @@ -200,6 +204,7 @@ public Object construct(Node node) { @YamlProperty(name = "mvel", type = "object:org.apache.camel.model.language.MvelExpression", oneOf = "expression"), @YamlProperty(name = "ognl", type = "object:org.apache.camel.model.language.OgnlExpression", oneOf = "expression"), @YamlProperty(name = "python", type = "object:org.apache.camel.model.language.PythonExpression", oneOf = "expression"), + @YamlProperty(name = "python3", type = "object:org.apache.camel.model.language.Python3Expression", oneOf = "expression"), @YamlProperty(name = "ref", type = "object:org.apache.camel.model.language.RefExpression", oneOf = "expression"), @YamlProperty(name = "simple", type = "object:org.apache.camel.model.language.SimpleExpression", oneOf = "expression"), @YamlProperty(name = "spel", type = "object:org.apache.camel.model.language.SpELExpression", oneOf = "expression"), diff --git a/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/ModelDeserializers.java b/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/ModelDeserializers.java index 04cfce6617d68..03af5e7e5dc59 100644 --- a/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/ModelDeserializers.java +++ b/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/ModelDeserializers.java @@ -193,6 +193,7 @@ import org.apache.camel.model.language.MethodCallExpression; import org.apache.camel.model.language.MvelExpression; import org.apache.camel.model.language.OgnlExpression; +import org.apache.camel.model.language.Python3Expression; import org.apache.camel.model.language.PythonExpression; import org.apache.camel.model.language.RefExpression; import org.apache.camel.model.language.SimpleExpression; @@ -12955,6 +12956,78 @@ protected boolean setProperty(PutDefinition target, String propertyKey, String p } } + @YamlType( + nodes = "python3", + inline = true, + types = org.apache.camel.model.language.Python3Expression.class, + order = org.apache.camel.dsl.yaml.common.YamlDeserializerResolver.ORDER_LOWEST - 1, + displayName = "Python 3", + description = "Evaluates a Python 3 expression", + deprecated = false, + properties = { + @YamlProperty(name = "expression", type = "string", required = true, description = "The expression value in your chosen language syntax.", displayName = "Expression"), + @YamlProperty(name = "id", type = "string", description = "The id of this node.", displayName = "Id"), + @YamlProperty(name = "resultType", type = "string", description = "The class of the result type (type from output).", displayName = "Result Type"), + @YamlProperty(name = "trim", type = "boolean", defaultValue = "true", description = "Whether to trim the source code to remove leading and trailing whitespaces and line breaks.", displayName = "Trim") + } + ) + public static class Python3ExpressionDeserializer extends YamlDeserializerBase { + public Python3ExpressionDeserializer() { + super(Python3Expression.class); + } + + @Override + protected Python3Expression newInstance() { + return new Python3Expression(); + } + + @Override + protected Python3Expression newInstance(String value) { + return new Python3Expression(value); + } + + @Override + protected boolean setProperty(Python3Expression target, String propertyKey, + String propertyName, Node node) { + propertyKey = org.apache.camel.util.StringHelper.dashToCamelCase(propertyKey); + switch(propertyKey) { + case "expression": { + String val = asText(node); + target.setExpression(val); + break; + } + case "id": { + String val = asText(node); + target.setId(val); + break; + } + case "resultType": { + String val = asText(node); + target.setResultTypeName(val); + break; + } + case "trim": { + String val = asText(node); + target.setTrim(val); + break; + } + default: { + ExpressionDefinition ed = target.getExpressionType(); + if (ed != null) { + throw new org.apache.camel.dsl.yaml.common.exception.DuplicateFieldException(node, propertyName, "as an expression"); + } + ed = ExpressionDeserializers.constructExpressionType(propertyKey, node); + if (ed != null) { + target.setExpressionType(ed); + } else { + return false; + } + } + } + return true; + } + } + @YamlType( nodes = "python", inline = true, diff --git a/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/ModelDeserializersResolver.java b/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/ModelDeserializersResolver.java index 1378eacddbf14..4582a4699dd97 100644 --- a/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/ModelDeserializersResolver.java +++ b/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/ModelDeserializersResolver.java @@ -287,6 +287,8 @@ public ConstructNode resolve(String id) { case "org.apache.camel.model.dataformat.ProtobufDataFormat": return new ModelDeserializers.ProtobufDataFormatDeserializer(); case "put": return new ModelDeserializers.PutDefinitionDeserializer(); case "org.apache.camel.model.rest.PutDefinition": return new ModelDeserializers.PutDefinitionDeserializer(); + case "python3": return new ModelDeserializers.Python3ExpressionDeserializer(); + case "org.apache.camel.model.language.Python3Expression": return new ModelDeserializers.Python3ExpressionDeserializer(); case "python": return new ModelDeserializers.PythonExpressionDeserializer(); case "org.apache.camel.model.language.PythonExpression": return new ModelDeserializers.PythonExpressionDeserializer(); case "randomLoadBalancer": return new ModelDeserializers.RandomLoadBalancerDefinitionDeserializer(); diff --git a/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl-canonical.json b/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl-canonical.json index 9497a31bd86e4..011cddaa58660 100644 --- a/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl-canonical.json +++ b/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl-canonical.json @@ -1383,6 +1383,9 @@ "python" : { "$ref" : "#/items/definitions/org.apache.camel.model.language.PythonExpression" }, + "python3" : { + "$ref" : "#/items/definitions/org.apache.camel.model.language.Python3Expression" + }, "ref" : { "$ref" : "#/items/definitions/org.apache.camel.model.language.RefExpression" }, @@ -9670,6 +9673,9 @@ "python" : { "$ref" : "#/items/definitions/org.apache.camel.model.language.PythonExpression" }, + "python3" : { + "$ref" : "#/items/definitions/org.apache.camel.model.language.Python3Expression" + }, "ref" : { "$ref" : "#/items/definitions/org.apache.camel.model.language.RefExpression" }, @@ -10183,6 +10189,36 @@ }, "required" : [ "expression" ] }, + "org.apache.camel.model.language.Python3Expression" : { + "title" : "Python 3", + "description" : "Evaluates a Python 3 expression", + "type" : "object", + "additionalProperties" : false, + "properties" : { + "expression" : { + "type" : "string", + "title" : "Expression", + "description" : "The expression value in your chosen language syntax." + }, + "id" : { + "type" : "string", + "title" : "Id", + "description" : "The id of this node." + }, + "resultType" : { + "type" : "string", + "title" : "Result Type", + "description" : "The class of the result type (type from output)." + }, + "trim" : { + "type" : "boolean", + "title" : "Trim", + "description" : "Whether to trim the source code to remove leading and trailing whitespaces and line breaks.", + "default" : true + } + }, + "required" : [ "expression" ] + }, "org.apache.camel.model.language.PythonExpression" : { "title" : "Python", "description" : "Evaluates a Python expression", diff --git a/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl-model.json b/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl-model.json index 2d6259e526405..48439854bdbf6 100644 --- a/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl-model.json +++ b/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl-model.json @@ -717,6 +717,13 @@ "title" : "Python", "description" : "Evaluates a Python expression", "label" : "language,python" + }, { + "name" : "python3", + "type" : "object", + "ref" : "python3", + "title" : "Python 3", + "description" : "Evaluates a Python 3 expression", + "label" : "language,python" }, { "name" : "ref", "type" : "object", @@ -2652,6 +2659,10 @@ "name" : "python", "type" : "object", "ref" : "python" + }, { + "name" : "python3", + "type" : "object", + "ref" : "python3" }, { "name" : "ref", "type" : "object", @@ -15495,6 +15506,51 @@ "label" : "advanced" } ] }, + "python3" : { + "title" : "Python 3", + "description" : "Evaluates a Python 3 expression", + "label" : "language,python", + "children" : [ { + "name" : "id", + "type" : "string", + "description" : "The id of this node.", + "title" : "Id", + "displayName" : "Id", + "kind" : "attribute", + "index" : 0, + "group" : "common" + }, { + "name" : "expression", + "type" : "string", + "description" : "The expression value in your chosen language syntax.", + "title" : "Expression", + "required" : true, + "displayName" : "Expression", + "kind" : "value", + "index" : 1, + "group" : "common" + }, { + "name" : "resultType", + "type" : "string", + "description" : "The class of the result type (type from output).", + "title" : "Result Type", + "displayName" : "Result Type", + "kind" : "attribute", + "index" : 2, + "group" : "common" + }, { + "name" : "trim", + "type" : "boolean", + "description" : "Whether to trim the source code to remove leading and trailing whitespaces and line breaks.", + "title" : "Trim", + "default" : "true", + "displayName" : "Trim", + "kind" : "attribute", + "index" : 3, + "group" : "advanced", + "label" : "advanced" + } ] + }, "python" : { "title" : "Python", "description" : "Evaluates a Python expression", diff --git a/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl.json b/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl.json index c44b19b51ca29..974eb1a239bcf 100644 --- a/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl.json +++ b/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl.json @@ -1199,6 +1199,8 @@ "required" : [ "ognl" ] }, { "required" : [ "python" ] + }, { + "required" : [ "python3" ] }, { "required" : [ "ref" ] }, { @@ -1288,6 +1290,7 @@ "mvel" : { }, "ognl" : { }, "python" : { }, + "python3" : { }, "ref" : { }, "simple" : { }, "spel" : { }, @@ -1348,6 +1351,8 @@ "required" : [ "ognl" ] }, { "required" : [ "python" ] + }, { + "required" : [ "python3" ] }, { "required" : [ "ref" ] }, { @@ -1442,6 +1447,7 @@ "mvel" : { }, "ognl" : { }, "python" : { }, + "python3" : { }, "ref" : { }, "simple" : { }, "spel" : { }, @@ -1502,6 +1508,8 @@ "required" : [ "ognl" ] }, { "required" : [ "python" ] + }, { + "required" : [ "python3" ] }, { "required" : [ "ref" ] }, { @@ -1639,6 +1647,7 @@ "mvel" : { }, "ognl" : { }, "python" : { }, + "python3" : { }, "ref" : { }, "simple" : { }, "spel" : { }, @@ -1787,6 +1796,8 @@ "required" : [ "ognl" ] }, { "required" : [ "python" ] + }, { + "required" : [ "python3" ] }, { "required" : [ "ref" ] }, { @@ -1943,6 +1954,14 @@ "$ref" : "#/items/definitions/org.apache.camel.model.language.PythonExpression" } } + }, { + "type" : "object", + "required" : [ "python3" ], + "properties" : { + "python3" : { + "$ref" : "#/items/definitions/org.apache.camel.model.language.Python3Expression" + } + } }, { "type" : "object", "required" : [ "ref" ], @@ -2036,6 +2055,7 @@ "mvel" : { }, "ognl" : { }, "python" : { }, + "python3" : { }, "ref" : { }, "simple" : { }, "spel" : { }, @@ -2172,6 +2192,8 @@ "required" : [ "ognl" ] }, { "required" : [ "python" ] + }, { + "required" : [ "python3" ] }, { "required" : [ "ref" ] }, { @@ -2255,6 +2277,7 @@ "mvel" : { }, "ognl" : { }, "python" : { }, + "python3" : { }, "ref" : { }, "simple" : { }, "spel" : { }, @@ -2416,6 +2439,8 @@ "required" : [ "ognl" ] }, { "required" : [ "python" ] + }, { + "required" : [ "python3" ] }, { "required" : [ "ref" ] }, { @@ -2523,6 +2548,7 @@ "mvel" : { }, "ognl" : { }, "python" : { }, + "python3" : { }, "ref" : { }, "simple" : { }, "spel" : { }, @@ -2983,6 +3009,8 @@ "required" : [ "ognl" ] }, { "required" : [ "python" ] + }, { + "required" : [ "python3" ] }, { "required" : [ "ref" ] }, { @@ -3084,6 +3112,7 @@ "mvel" : { }, "ognl" : { }, "python" : { }, + "python3" : { }, "ref" : { }, "simple" : { }, "spel" : { }, @@ -4040,6 +4069,8 @@ "required" : [ "ognl" ] }, { "required" : [ "python" ] + }, { + "required" : [ "python3" ] }, { "required" : [ "ref" ] }, { @@ -4106,6 +4137,7 @@ "mvel" : { }, "ognl" : { }, "python" : { }, + "python3" : { }, "ref" : { }, "simple" : { }, "spel" : { }, @@ -4498,6 +4530,8 @@ "required" : [ "ognl" ] }, { "required" : [ "python" ] + }, { + "required" : [ "python3" ] }, { "required" : [ "ref" ] }, { @@ -4630,6 +4664,7 @@ "mvel" : { }, "ognl" : { }, "python" : { }, + "python3" : { }, "ref" : { }, "simple" : { }, "spel" : { }, @@ -4742,6 +4777,8 @@ "required" : [ "ognl" ] }, { "required" : [ "python" ] + }, { + "required" : [ "python3" ] }, { "required" : [ "ref" ] }, { @@ -4798,6 +4835,7 @@ "mvel" : { }, "ognl" : { }, "python" : { }, + "python3" : { }, "ref" : { }, "simple" : { }, "spel" : { }, @@ -4859,6 +4897,8 @@ "required" : [ "ognl" ] }, { "required" : [ "python" ] + }, { + "required" : [ "python3" ] }, { "required" : [ "ref" ] }, { @@ -5022,6 +5062,7 @@ "mvel" : { }, "ognl" : { }, "python" : { }, + "python3" : { }, "ref" : { }, "simple" : { }, "spel" : { }, @@ -5441,6 +5482,8 @@ "required" : [ "ognl" ] }, { "required" : [ "python" ] + }, { + "required" : [ "python3" ] }, { "required" : [ "ref" ] }, { @@ -5545,6 +5588,7 @@ "mvel" : { }, "ognl" : { }, "python" : { }, + "python3" : { }, "ref" : { }, "simple" : { }, "spel" : { }, @@ -6184,6 +6228,8 @@ "required" : [ "ognl" ] }, { "required" : [ "python" ] + }, { + "required" : [ "python3" ] }, { "required" : [ "ref" ] }, { @@ -6278,6 +6324,7 @@ "mvel" : { }, "ognl" : { }, "python" : { }, + "python3" : { }, "ref" : { }, "simple" : { }, "spel" : { }, @@ -6460,6 +6507,8 @@ "required" : [ "ognl" ] }, { "required" : [ "python" ] + }, { + "required" : [ "python3" ] }, { "required" : [ "ref" ] }, { @@ -6532,6 +6581,7 @@ "mvel" : { }, "ognl" : { }, "python" : { }, + "python3" : { }, "ref" : { }, "simple" : { }, "spel" : { }, @@ -6592,6 +6642,8 @@ "required" : [ "ognl" ] }, { "required" : [ "python" ] + }, { + "required" : [ "python3" ] }, { "required" : [ "ref" ] }, { @@ -6664,6 +6716,7 @@ "mvel" : { }, "ognl" : { }, "python" : { }, + "python3" : { }, "ref" : { }, "simple" : { }, "spel" : { }, @@ -6764,6 +6817,8 @@ "required" : [ "ognl" ] }, { "required" : [ "python" ] + }, { + "required" : [ "python3" ] }, { "required" : [ "ref" ] }, { @@ -6841,6 +6896,7 @@ "mvel" : { }, "ognl" : { }, "python" : { }, + "python3" : { }, "ref" : { }, "simple" : { }, "spel" : { }, @@ -6939,6 +6995,8 @@ "required" : [ "ognl" ] }, { "required" : [ "python" ] + }, { + "required" : [ "python3" ] }, { "required" : [ "ref" ] }, { @@ -7016,6 +7074,7 @@ "mvel" : { }, "ognl" : { }, "python" : { }, + "python3" : { }, "ref" : { }, "simple" : { }, "spel" : { }, @@ -7077,6 +7136,8 @@ "required" : [ "ognl" ] }, { "required" : [ "python" ] + }, { + "required" : [ "python3" ] }, { "required" : [ "ref" ] }, { @@ -7154,6 +7215,7 @@ "mvel" : { }, "ognl" : { }, "python" : { }, + "python3" : { }, "ref" : { }, "simple" : { }, "spel" : { }, @@ -7252,6 +7314,8 @@ "required" : [ "ognl" ] }, { "required" : [ "python" ] + }, { + "required" : [ "python3" ] }, { "required" : [ "ref" ] }, { @@ -7329,6 +7393,7 @@ "mvel" : { }, "ognl" : { }, "python" : { }, + "python3" : { }, "ref" : { }, "simple" : { }, "spel" : { }, @@ -7389,6 +7454,8 @@ "required" : [ "ognl" ] }, { "required" : [ "python" ] + }, { + "required" : [ "python3" ] }, { "required" : [ "ref" ] }, { @@ -7572,6 +7639,7 @@ "mvel" : { }, "ognl" : { }, "python" : { }, + "python3" : { }, "ref" : { }, "simple" : { }, "spel" : { }, @@ -7897,6 +7965,8 @@ "required" : [ "ognl" ] }, { "required" : [ "python" ] + }, { + "required" : [ "python3" ] }, { "required" : [ "ref" ] }, { @@ -8010,6 +8080,7 @@ "mvel" : { }, "ognl" : { }, "python" : { }, + "python3" : { }, "ref" : { }, "simple" : { }, "spel" : { }, @@ -8438,6 +8509,8 @@ "required" : [ "ognl" ] }, { "required" : [ "python" ] + }, { + "required" : [ "python3" ] }, { "required" : [ "ref" ] }, { @@ -8510,6 +8583,7 @@ "mvel" : { }, "ognl" : { }, "python" : { }, + "python3" : { }, "ref" : { }, "simple" : { }, "spel" : { }, @@ -9107,6 +9181,8 @@ "required" : [ "ognl" ] }, { "required" : [ "python" ] + }, { + "required" : [ "python3" ] }, { "required" : [ "ref" ] }, { @@ -9184,6 +9260,7 @@ "mvel" : { }, "ognl" : { }, "python" : { }, + "python3" : { }, "ref" : { }, "simple" : { }, "spel" : { }, @@ -9261,6 +9338,8 @@ "required" : [ "ognl" ] }, { "required" : [ "python" ] + }, { + "required" : [ "python3" ] }, { "required" : [ "ref" ] }, { @@ -9339,6 +9418,7 @@ "mvel" : { }, "ognl" : { }, "python" : { }, + "python3" : { }, "ref" : { }, "simple" : { }, "spel" : { }, @@ -13320,6 +13400,14 @@ "$ref" : "#/items/definitions/org.apache.camel.model.language.PythonExpression" } } + }, { + "type" : "object", + "required" : [ "python3" ], + "properties" : { + "python3" : { + "$ref" : "#/items/definitions/org.apache.camel.model.language.Python3Expression" + } + } }, { "type" : "object", "required" : [ "ref" ], @@ -13413,6 +13501,7 @@ "mvel" : { }, "ognl" : { }, "python" : { }, + "python3" : { }, "ref" : { }, "simple" : { }, "spel" : { }, @@ -13956,6 +14045,40 @@ } ], "required" : [ "expression" ] }, + "org.apache.camel.model.language.Python3Expression" : { + "title" : "Python 3", + "description" : "Evaluates a Python 3 expression", + "oneOf" : [ { + "type" : "string" + }, { + "type" : "object", + "additionalProperties" : false, + "properties" : { + "expression" : { + "type" : "string", + "title" : "Expression", + "description" : "The expression value in your chosen language syntax." + }, + "id" : { + "type" : "string", + "title" : "Id", + "description" : "The id of this node." + }, + "resultType" : { + "type" : "string", + "title" : "Result Type", + "description" : "The class of the result type (type from output)." + }, + "trim" : { + "type" : "boolean", + "title" : "Trim", + "description" : "Whether to trim the source code to remove leading and trailing whitespaces and line breaks.", + "default" : true + } + } + } ], + "required" : [ "expression" ] + }, "org.apache.camel.model.language.PythonExpression" : { "title" : "Python", "description" : "Evaluates a Python expression", diff --git a/parent/pom.xml b/parent/pom.xml index 0664bce21e6b0..19c02fd40a9a2 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -211,7 +211,7 @@ 4.90.0 2.96.0 1.65.0 - 25.2.4 + 25.2.4 26.0 2.1.12 5.0.8 @@ -2526,6 +2526,11 @@ camel-python ${project.version} + + org.apache.camel + camel-python3 + ${project.version} + org.apache.camel camel-qdrant