From 5aa2aed7a7cb5a37d0bb93ed07624b9e4e8c5b5b Mon Sep 17 00:00:00 2001 From: robin2794 Date: Mon, 1 Jun 2026 15:25:19 +0300 Subject: [PATCH] Added simple-no-file support --- core/camel-core-languages/pom.xml | 30 ++++++++++++++++- .../language/simple/SimpleNoFileLanguage.java | 32 +++++++++++++++++++ .../org/apache/camel/language/simple-no-file | 1 + 3 files changed, 62 insertions(+), 1 deletion(-) create mode 100644 core/camel-core-languages/src/main/java/org/apache/camel/language/simple/SimpleNoFileLanguage.java create mode 100644 core/camel-core-languages/src/main/resources/META-INF/services/org/apache/camel/language/simple-no-file diff --git a/core/camel-core-languages/pom.xml b/core/camel-core-languages/pom.xml index 52de2dc72..e18ce851a 100644 --- a/core/camel-core-languages/pom.xml +++ b/core/camel-core-languages/pom.xml @@ -34,7 +34,7 @@ - org.apache.camel*;version=${camel-version} + org.apache.camel.language*;version=${camel-version} * @@ -42,6 +42,28 @@ + + org.apache.camel + camel-api + ${camel-version} + + + org.apache.camel + * + + + + + org.apache.camel + camel-support + ${camel-version} + + + org.apache.camel + * + + + org.apache.camel camel-core-languages @@ -78,6 +100,12 @@ org.apache.camel:camel-core-languages + + + META-INF/services/org/apache/camel/language/simple-no-file + ${project.basedir}/src/main/resources/META-INF/services/org/apache/camel/language/simple-no-file + + diff --git a/core/camel-core-languages/src/main/java/org/apache/camel/language/simple/SimpleNoFileLanguage.java b/core/camel-core-languages/src/main/java/org/apache/camel/language/simple/SimpleNoFileLanguage.java new file mode 100644 index 000000000..982997544 --- /dev/null +++ b/core/camel-core-languages/src/main/java/org/apache/camel/language/simple/SimpleNoFileLanguage.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.simple; + +import org.apache.camel.spi.annotations.Language; + +/** + * The {@link SimpleLanguage} but without support for using the file based functions. This is used in some special + * situations with EIPs such as poll/pollEnrich. This language is not exposed as a public standard language and are only + * intended for internal use. + */ +@Language(value = "simple-no-file", functionsClass = SimpleConstants.class) +public final class SimpleNoFileLanguage extends SimpleLanguage { + + public SimpleNoFileLanguage() { + super(true); + } +} diff --git a/core/camel-core-languages/src/main/resources/META-INF/services/org/apache/camel/language/simple-no-file b/core/camel-core-languages/src/main/resources/META-INF/services/org/apache/camel/language/simple-no-file new file mode 100644 index 000000000..0c9b7e9ce --- /dev/null +++ b/core/camel-core-languages/src/main/resources/META-INF/services/org/apache/camel/language/simple-no-file @@ -0,0 +1 @@ +class=org.apache.camel.language.simple.SimpleNoFileLanguage