You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2021/05/08 11:49:41 UTC
[camel] 05/05: CAMEL-16593: Kamelets local bean - Allow to use
expression language to supply the bean WIP
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch CAMEL-16593
in repository https://gitbox.apache.org/repos/asf/camel.git
commit 801afc3bf8f67c30f710431986d65746dfceb458
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Sat May 8 13:48:48 2021 +0200
CAMEL-16593: Kamelets local bean - Allow to use expression language to supply the bean WIP
---
.../resources/org/apache/camel/model/templateBeanFactory.json | 2 +-
.../org/apache/camel/model/RouteTemplateBeanFactoryDefinition.java | 7 +++----
.../main/java/org/apache/camel/model/RouteTemplateDefinition.java | 4 ++--
3 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/core/camel-core-model/src/generated/resources/org/apache/camel/model/templateBeanFactory.json b/core/camel-core-model/src/generated/resources/org/apache/camel/model/templateBeanFactory.json
index 505d4ad..4bd12f5 100644
--- a/core/camel-core-model/src/generated/resources/org/apache/camel/model/templateBeanFactory.json
+++ b/core/camel-core-model/src/generated/resources/org/apache/camel/model/templateBeanFactory.json
@@ -11,7 +11,7 @@
"output": false
},
"properties": {
- "language": { "kind": "attribute", "displayName": "Language", "required": false, "type": "enum", "javaType": "java.lang.String", "enum": [ "bean", "groovy", "joor", "mvel", "ognl", "spel" ], "deprecated": false, "autowired": false, "secret": false, "description": "The language to use for creating the bean (such as groovy, joor)" },
+ "language": { "kind": "attribute", "displayName": "Language", "required": false, "type": "enum", "javaType": "java.lang.String", "enum": [ "bean", "groovy", "joor", "language", "mvel", "ognl", "spel" ], "deprecated": false, "autowired": false, "secret": false, "description": "The language to use for creating the bean (such as groovy, joor)" },
"script": { "kind": "value", "displayName": "Script", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The script to execute that creates the bean. If the script use the prefix resource: such as resource:classpath:com\/foo\/myscript.groovy, resource:file:\/var\/myscript.groovy, then its loaded from the external resource." }
}
}
diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/RouteTemplateBeanFactoryDefinition.java b/core/camel-core-model/src/main/java/org/apache/camel/model/RouteTemplateBeanFactoryDefinition.java
index 22235e1..a0af713 100644
--- a/core/camel-core-model/src/main/java/org/apache/camel/model/RouteTemplateBeanFactoryDefinition.java
+++ b/core/camel-core-model/src/main/java/org/apache/camel/model/RouteTemplateBeanFactoryDefinition.java
@@ -88,7 +88,7 @@ public class RouteTemplateBeanFactoryDefinition {
/**
* Calls a method on a bean for creating the local template bean
*
- * @param type the bean class to call
+ * @param type the bean class to call
* @param method the name of the method to call
*/
public RouteTemplateDefinition bean(Class<?> type, String method) {
@@ -116,8 +116,7 @@ public class RouteTemplateBeanFactoryDefinition {
}
/**
- * Calls joor script (Java source that is runtime compiled to Java bytecode)
- * for creating the local template bean
+ * Calls joor script (Java source that is runtime compiled to Java bytecode) for creating the local template bean
*
* If the script use the prefix <tt>resource:</tt> such as <tt>resource:classpath:com/foo/myscript.groovy</tt>,
* <tt>resource:file:/var/myscript.groovy</tt>, then its loaded from the external resource.
@@ -137,7 +136,7 @@ public class RouteTemplateBeanFactoryDefinition {
* <tt>resource:file:/var/myscript.groovy</tt>, then its loaded from the external resource.
*
* @param language the custom language (a language not provided out of the box from Camel)
- * @param script the script
+ * @param script the script
*/
public RouteTemplateDefinition language(String language, String script) {
setLanguage(language);
diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/RouteTemplateDefinition.java b/core/camel-core-model/src/main/java/org/apache/camel/model/RouteTemplateDefinition.java
index eb0d56d..8d8cf40 100644
--- a/core/camel-core-model/src/main/java/org/apache/camel/model/RouteTemplateDefinition.java
+++ b/core/camel-core-model/src/main/java/org/apache/camel/model/RouteTemplateDefinition.java
@@ -278,8 +278,8 @@ public class RouteTemplateDefinition extends OptionalIdentifiedDefinition {
/**
* Adds a local bean the route template uses (via fluent builder).
*
- * @param name the name of the bean
- * @return fluent builder to choose which language and script to use for creating the bean
+ * @param name the name of the bean
+ * @return fluent builder to choose which language and script to use for creating the bean
*/
public RouteTemplateBeanFactoryDefinition templateBean(String name) {
if (templateBeans == null) {