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 2016/08/01 08:16:19 UTC
[1/4] camel git commit: CAMEL-10209: spring boot - Auto configuration
for languages
Repository: camel
Updated Branches:
refs/heads/master 077a15d37 -> aa4bdf651
CAMEL-10209: spring boot - Auto configuration for languages
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/aa4bdf65
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/aa4bdf65
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/aa4bdf65
Branch: refs/heads/master
Commit: aa4bdf651c750ffa3f789ea4f69fbb88308e010b
Parents: 53eba31
Author: Claus Ibsen <da...@apache.org>
Authored: Mon Aug 1 10:14:27 2016 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Mon Aug 1 10:16:12 2016 +0200
----------------------------------------------------------------------
.../springboot/BeanLanguageConfiguration.java | 53 ---------
.../TokenizeLanguageConfiguration.java | 115 -------------------
.../XMLTokenizeLanguageConfiguration.java | 24 ----
.../springboot/XPathLanguageConfiguration.java | 12 --
.../springboot/XQueryLanguageConfiguration.java | 12 --
.../SpringBootAutoConfigurationMojo.java | 33 +++++-
6 files changed, 31 insertions(+), 218 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/aa4bdf65/camel-core/src/main/java/org/apache/camel/language/bean/springboot/BeanLanguageConfiguration.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/language/bean/springboot/BeanLanguageConfiguration.java b/camel-core/src/main/java/org/apache/camel/language/bean/springboot/BeanLanguageConfiguration.java
index 6fbb0c6..b39a7ac 100644
--- a/camel-core/src/main/java/org/apache/camel/language/bean/springboot/BeanLanguageConfiguration.java
+++ b/camel-core/src/main/java/org/apache/camel/language/bean/springboot/BeanLanguageConfiguration.java
@@ -17,7 +17,6 @@
package org.apache.camel.language.bean.springboot;
import org.springframework.boot.context.properties.ConfigurationProperties;
-import org.springframework.boot.context.properties.DeprecatedConfigurationProperty;
/**
* For expressions and predicates using a java bean (aka method call)
@@ -28,63 +27,11 @@ import org.springframework.boot.context.properties.DeprecatedConfigurationProper
public class BeanLanguageConfiguration {
/**
- * Either a reference or a class name of the bean to use
- */
- @Deprecated
- private String bean;
- /**
- * Reference to bean to lookup in the registry
- */
- private String ref;
- /**
- * Name of method to call
- */
- private String method;
- /**
- * Class name of the bean to use
- */
- private String beanType;
- /**
* Whether to trim the value to remove leading and trailing whitespaces and
* line breaks
*/
private Boolean trim = true;
- @Deprecated
- @DeprecatedConfigurationProperty
- public String getBean() {
- return bean;
- }
-
- @Deprecated
- public void setBean(String bean) {
- this.bean = bean;
- }
-
- public String getRef() {
- return ref;
- }
-
- public void setRef(String ref) {
- this.ref = ref;
- }
-
- public String getMethod() {
- return method;
- }
-
- public void setMethod(String method) {
- this.method = method;
- }
-
- public String getBeanType() {
- return beanType;
- }
-
- public void setBeanType(String beanType) {
- this.beanType = beanType;
- }
-
public Boolean getTrim() {
return trim;
}
http://git-wip-us.apache.org/repos/asf/camel/blob/aa4bdf65/camel-core/src/main/java/org/apache/camel/language/tokenizer/springboot/TokenizeLanguageConfiguration.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/language/tokenizer/springboot/TokenizeLanguageConfiguration.java b/camel-core/src/main/java/org/apache/camel/language/tokenizer/springboot/TokenizeLanguageConfiguration.java
index 099015a..8d0632e 100644
--- a/camel-core/src/main/java/org/apache/camel/language/tokenizer/springboot/TokenizeLanguageConfiguration.java
+++ b/camel-core/src/main/java/org/apache/camel/language/tokenizer/springboot/TokenizeLanguageConfiguration.java
@@ -27,126 +27,11 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
public class TokenizeLanguageConfiguration {
/**
- * The (start) token to use as tokenizer for example \n for a new line
- * token. You can use simple language as the token to support dynamic
- * tokens.
- */
- private String token;
- /**
- * The end token to use as tokenizer if using start/end token pairs. You can
- * use simple language as the token to support dynamic tokens.
- */
- private String endToken;
- /**
- * To inherit namespaces from a root/parent tag name when using XML You can
- * use simple language as the tag name to support dynamic names.
- */
- private String inheritNamespaceTagName;
- /**
- * Name of header to tokenize instead of using the message body.
- */
- private String headerName;
- /**
- * If the token is a regular expression pattern. The default value is false
- */
- private Boolean regex = false;
- /**
- * Whether the input is XML messages. This option must be set to true if
- * working with XML payloads.
- */
- private Boolean xml = false;
- /**
- * Whether to include the tokens in the parts when using pairs The default
- * value is false
- */
- private Boolean includeTokens = false;
- /**
- * To group N parts together for example to split big files into chunks of
- * 1000 lines.
- */
- private Integer group;
- /**
- * To skip the very first element
- */
- private Boolean skipFirst = false;
- /**
* Whether to trim the value to remove leading and trailing whitespaces and
* line breaks
*/
private Boolean trim = true;
- public String getToken() {
- return token;
- }
-
- public void setToken(String token) {
- this.token = token;
- }
-
- public String getEndToken() {
- return endToken;
- }
-
- public void setEndToken(String endToken) {
- this.endToken = endToken;
- }
-
- public String getInheritNamespaceTagName() {
- return inheritNamespaceTagName;
- }
-
- public void setInheritNamespaceTagName(String inheritNamespaceTagName) {
- this.inheritNamespaceTagName = inheritNamespaceTagName;
- }
-
- public String getHeaderName() {
- return headerName;
- }
-
- public void setHeaderName(String headerName) {
- this.headerName = headerName;
- }
-
- public Boolean getRegex() {
- return regex;
- }
-
- public void setRegex(Boolean regex) {
- this.regex = regex;
- }
-
- public Boolean getXml() {
- return xml;
- }
-
- public void setXml(Boolean xml) {
- this.xml = xml;
- }
-
- public Boolean getIncludeTokens() {
- return includeTokens;
- }
-
- public void setIncludeTokens(Boolean includeTokens) {
- this.includeTokens = includeTokens;
- }
-
- public Integer getGroup() {
- return group;
- }
-
- public void setGroup(Integer group) {
- this.group = group;
- }
-
- public Boolean getSkipFirst() {
- return skipFirst;
- }
-
- public void setSkipFirst(Boolean skipFirst) {
- this.skipFirst = skipFirst;
- }
-
public Boolean getTrim() {
return trim;
}
http://git-wip-us.apache.org/repos/asf/camel/blob/aa4bdf65/camel-core/src/main/java/org/apache/camel/language/tokenizer/springboot/XMLTokenizeLanguageConfiguration.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/language/tokenizer/springboot/XMLTokenizeLanguageConfiguration.java b/camel-core/src/main/java/org/apache/camel/language/tokenizer/springboot/XMLTokenizeLanguageConfiguration.java
index 00d591e..a245dc4 100644
--- a/camel-core/src/main/java/org/apache/camel/language/tokenizer/springboot/XMLTokenizeLanguageConfiguration.java
+++ b/camel-core/src/main/java/org/apache/camel/language/tokenizer/springboot/XMLTokenizeLanguageConfiguration.java
@@ -27,10 +27,6 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
public class XMLTokenizeLanguageConfiguration {
/**
- * Name of header to tokenize instead of using the message body.
- */
- private String headerName;
- /**
* The extraction mode. The available extraction modes are: i - injecting
* the contextual namespace bindings into the extracted token (default) w -
* wrapping the extracted token in its ancestor context u - unwrapping the
@@ -39,23 +35,11 @@ public class XMLTokenizeLanguageConfiguration {
*/
private String mode;
/**
- * To group N parts together
- */
- private Integer group;
- /**
* Whether to trim the value to remove leading and trailing whitespaces and
* line breaks
*/
private Boolean trim = true;
- public String getHeaderName() {
- return headerName;
- }
-
- public void setHeaderName(String headerName) {
- this.headerName = headerName;
- }
-
public String getMode() {
return mode;
}
@@ -64,14 +48,6 @@ public class XMLTokenizeLanguageConfiguration {
this.mode = mode;
}
- public Integer getGroup() {
- return group;
- }
-
- public void setGroup(Integer group) {
- this.group = group;
- }
-
public Boolean getTrim() {
return trim;
}
http://git-wip-us.apache.org/repos/asf/camel/blob/aa4bdf65/camel-core/src/main/java/org/apache/camel/language/xpath/springboot/XPathLanguageConfiguration.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/language/xpath/springboot/XPathLanguageConfiguration.java b/camel-core/src/main/java/org/apache/camel/language/xpath/springboot/XPathLanguageConfiguration.java
index ea54a32..efa0046 100644
--- a/camel-core/src/main/java/org/apache/camel/language/xpath/springboot/XPathLanguageConfiguration.java
+++ b/camel-core/src/main/java/org/apache/camel/language/xpath/springboot/XPathLanguageConfiguration.java
@@ -47,10 +47,6 @@ public class XPathLanguageConfiguration {
*/
private Boolean logNamespaces = false;
/**
- * Name of header to use as input instead of the message body
- */
- private String headerName;
- /**
* Whether to trim the value to remove leading and trailing whitespaces and
* line breaks
*/
@@ -96,14 +92,6 @@ public class XPathLanguageConfiguration {
this.logNamespaces = logNamespaces;
}
- public String getHeaderName() {
- return headerName;
- }
-
- public void setHeaderName(String headerName) {
- this.headerName = headerName;
- }
-
public Boolean getTrim() {
return trim;
}
http://git-wip-us.apache.org/repos/asf/camel/blob/aa4bdf65/components/camel-saxon/src/main/java/org/apache/camel/language/xquery/springboot/XQueryLanguageConfiguration.java
----------------------------------------------------------------------
diff --git a/components/camel-saxon/src/main/java/org/apache/camel/language/xquery/springboot/XQueryLanguageConfiguration.java b/components/camel-saxon/src/main/java/org/apache/camel/language/xquery/springboot/XQueryLanguageConfiguration.java
index fda83c3..d45e4c4 100644
--- a/components/camel-saxon/src/main/java/org/apache/camel/language/xquery/springboot/XQueryLanguageConfiguration.java
+++ b/components/camel-saxon/src/main/java/org/apache/camel/language/xquery/springboot/XQueryLanguageConfiguration.java
@@ -32,10 +32,6 @@ public class XQueryLanguageConfiguration {
*/
private String type;
/**
- * Name of header to use as input instead of the message body
- */
- private String headerName;
- /**
* Whether to trim the value to remove leading and trailing whitespaces and
* line breaks
*/
@@ -49,14 +45,6 @@ public class XQueryLanguageConfiguration {
this.type = type;
}
- public String getHeaderName() {
- return headerName;
- }
-
- public void setHeaderName(String headerName) {
- this.headerName = headerName;
- }
-
public Boolean getTrim() {
return trim;
}
http://git-wip-us.apache.org/repos/asf/camel/blob/aa4bdf65/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/SpringBootAutoConfigurationMojo.java
----------------------------------------------------------------------
diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/SpringBootAutoConfigurationMojo.java b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/SpringBootAutoConfigurationMojo.java
index 85cd583..92e85b4 100644
--- a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/SpringBootAutoConfigurationMojo.java
+++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/SpringBootAutoConfigurationMojo.java
@@ -251,7 +251,7 @@ public class SpringBootAutoConfigurationMojo extends AbstractMojo {
String overrideLanguageName = null;
if (aliases.size() > 1) {
- // determine component name when there are multiple ones
+ // determine language name when there are multiple ones
overrideLanguageName = model.getArtifactId().replace("camel-", "");
}
@@ -469,10 +469,39 @@ public class SpringBootAutoConfigurationMojo extends AbstractMojo {
javaClass.addAnnotation("org.springframework.boot.context.properties.ConfigurationProperties").setStringValue("prefix", prefix);
for (LanguageOptionModel option : model.getLanguageOptions()) {
- // skip option with name id, expression, or resultType in language as we do not need that
+ // skip option with name id, or expression in language as we do not need that and skip resultType as they are not global options
if ("id".equals(option.getName()) || "expression".equals(option.getName()) || "resultType".equals(option.getName())) {
continue;
}
+ if ("bean".equals(model.getName())) {
+ // and skip following as they are not global options
+ if ("bean".equals(option.getName()) || "ref".equals(option.getName()) || "method".equals(option.getName()) || "beanType".equals(option.getName())) {
+ continue;
+ }
+ } else if ("tokenize".equals(model.getName())) {
+ // and skip following as they are not global options
+ if ("token".equals(option.getName()) || "endToken".equals(option.getName()) || "inheritNamespaceTagName".equals(option.getName())
+ || "headerName".equals(option.getName()) || "regex".equals(option.getName()) || "xml".equals(option.getName())
+ || "includeTokens".equals(option.getName()) || "group".equals(option.getName()) || "skipFirst".equals(option.getName())) {
+ continue;
+ }
+ } else if ("xtokenize".equals(model.getName())) {
+ // and skip following as they are not global options
+ if ("headerName".equals(option.getName()) || "group".equals(option.getName())) {
+ continue;
+ }
+ } else if ("xpath".equals(model.getName())) {
+ // and skip following as they are not global options
+ if ("headerName".equals(option.getName())) {
+ continue;
+ }
+ } else if ("xquery".equals(model.getName())) {
+ // and skip following as they are not global options
+ if ("headerName".equals(option.getName())) {
+ continue;
+ }
+ }
+
// remove <?> as generic type as Roaster (Eclipse JDT) cannot use that
String type = option.getJavaType();
type = type.replaceAll("\\<\\?\\>", "");
[2/4] camel git commit: CAMEL-10209: spring boot - Auto configuration
for languages
Posted by da...@apache.org.
http://git-wip-us.apache.org/repos/asf/camel/blob/53eba311/components/camel-jsonpath/src/main/java/org/apache/camel/jsonpath/springboot/JsonPathLanguageAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components/camel-jsonpath/src/main/java/org/apache/camel/jsonpath/springboot/JsonPathLanguageAutoConfiguration.java b/components/camel-jsonpath/src/main/java/org/apache/camel/jsonpath/springboot/JsonPathLanguageAutoConfiguration.java
new file mode 100644
index 0000000..2c3e9fe
--- /dev/null
+++ b/components/camel-jsonpath/src/main/java/org/apache/camel/jsonpath/springboot/JsonPathLanguageAutoConfiguration.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.jsonpath.springboot;
+
+import java.util.HashMap;
+import java.util.Map;
+import org.apache.camel.CamelContext;
+import org.apache.camel.CamelContextAware;
+import org.apache.camel.jsonpath.JsonPathLanguage;
+import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@Configuration
+@EnableConfigurationProperties(JsonPathLanguageConfiguration.class)
+public class JsonPathLanguageAutoConfiguration {
+
+ @Bean(name = "jsonpath-language")
+ @ConditionalOnClass(CamelContext.class)
+ @ConditionalOnMissingBean(JsonPathLanguage.class)
+ public JsonPathLanguage configureJsonPathLanguage(
+ CamelContext camelContext,
+ JsonPathLanguageConfiguration configuration) throws Exception {
+ JsonPathLanguage language = new JsonPathLanguage();
+ if (language instanceof CamelContextAware) {
+ ((CamelContextAware) language).setCamelContext(camelContext);
+ }
+ Map<String, Object> parameters = new HashMap<>();
+ IntrospectionSupport.getProperties(configuration, parameters, null,
+ false);
+ IntrospectionSupport.setProperties(camelContext,
+ camelContext.getTypeConverter(), language, parameters);
+ return language;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/53eba311/components/camel-jsonpath/src/main/java/org/apache/camel/jsonpath/springboot/JsonPathLanguageConfiguration.java
----------------------------------------------------------------------
diff --git a/components/camel-jsonpath/src/main/java/org/apache/camel/jsonpath/springboot/JsonPathLanguageConfiguration.java b/components/camel-jsonpath/src/main/java/org/apache/camel/jsonpath/springboot/JsonPathLanguageConfiguration.java
new file mode 100644
index 0000000..36ced8f
--- /dev/null
+++ b/components/camel-jsonpath/src/main/java/org/apache/camel/jsonpath/springboot/JsonPathLanguageConfiguration.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.jsonpath.springboot;
+
+import org.springframework.boot.context.properties.ConfigurationProperties;
+
+/**
+ * For JSonPath expressions and predicates
+ *
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@ConfigurationProperties(prefix = "camel.language.jsonpath")
+public class JsonPathLanguageConfiguration {
+
+ /**
+ * Whether to suppress exceptions such as PathNotFoundException.
+ */
+ private Boolean suppressExceptions = false;
+ /**
+ * Whether to allow in inlined simple exceptions in the json path expression
+ */
+ private Boolean allowSimple = true;
+ /**
+ * Whether to trim the value to remove leading and trailing whitespaces and
+ * line breaks
+ */
+ private Boolean trim = true;
+
+ public Boolean getSuppressExceptions() {
+ return suppressExceptions;
+ }
+
+ public void setSuppressExceptions(Boolean suppressExceptions) {
+ this.suppressExceptions = suppressExceptions;
+ }
+
+ public Boolean getAllowSimple() {
+ return allowSimple;
+ }
+
+ public void setAllowSimple(Boolean allowSimple) {
+ this.allowSimple = allowSimple;
+ }
+
+ public Boolean getTrim() {
+ return trim;
+ }
+
+ public void setTrim(Boolean trim) {
+ this.trim = trim;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/53eba311/components/camel-jsonpath/src/main/resources/META-INF/spring.factories
----------------------------------------------------------------------
diff --git a/components/camel-jsonpath/src/main/resources/META-INF/spring.factories b/components/camel-jsonpath/src/main/resources/META-INF/spring.factories
new file mode 100644
index 0000000..12720fc
--- /dev/null
+++ b/components/camel-jsonpath/src/main/resources/META-INF/spring.factories
@@ -0,0 +1,19 @@
+#
+# 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.
+#
+
+org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
+org.apache.camel.jsonpath.springboot.JsonPathLanguageAutoConfiguration
http://git-wip-us.apache.org/repos/asf/camel/blob/53eba311/components/camel-juel/src/main/java/org/apache/camel/language/juel/springboot/JuelLanguageAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components/camel-juel/src/main/java/org/apache/camel/language/juel/springboot/JuelLanguageAutoConfiguration.java b/components/camel-juel/src/main/java/org/apache/camel/language/juel/springboot/JuelLanguageAutoConfiguration.java
new file mode 100644
index 0000000..376e30e
--- /dev/null
+++ b/components/camel-juel/src/main/java/org/apache/camel/language/juel/springboot/JuelLanguageAutoConfiguration.java
@@ -0,0 +1,54 @@
+/**
+ * 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.juel.springboot;
+
+import java.util.HashMap;
+import java.util.Map;
+import org.apache.camel.CamelContext;
+import org.apache.camel.CamelContextAware;
+import org.apache.camel.language.juel.JuelLanguage;
+import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@Configuration
+@EnableConfigurationProperties(JuelLanguageConfiguration.class)
+public class JuelLanguageAutoConfiguration {
+
+ @Bean(name = "el-language")
+ @ConditionalOnClass(CamelContext.class)
+ @ConditionalOnMissingBean(JuelLanguage.class)
+ public JuelLanguage configureJuelLanguage(CamelContext camelContext,
+ JuelLanguageConfiguration configuration) throws Exception {
+ JuelLanguage language = new JuelLanguage();
+ if (language instanceof CamelContextAware) {
+ ((CamelContextAware) language).setCamelContext(camelContext);
+ }
+ Map<String, Object> parameters = new HashMap<>();
+ IntrospectionSupport.getProperties(configuration, parameters, null,
+ false);
+ IntrospectionSupport.setProperties(camelContext,
+ camelContext.getTypeConverter(), language, parameters);
+ return language;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/53eba311/components/camel-juel/src/main/java/org/apache/camel/language/juel/springboot/JuelLanguageConfiguration.java
----------------------------------------------------------------------
diff --git a/components/camel-juel/src/main/java/org/apache/camel/language/juel/springboot/JuelLanguageConfiguration.java b/components/camel-juel/src/main/java/org/apache/camel/language/juel/springboot/JuelLanguageConfiguration.java
new file mode 100644
index 0000000..08ae2da
--- /dev/null
+++ b/components/camel-juel/src/main/java/org/apache/camel/language/juel/springboot/JuelLanguageConfiguration.java
@@ -0,0 +1,42 @@
+/**
+ * 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.juel.springboot;
+
+import org.springframework.boot.context.properties.ConfigurationProperties;
+
+/**
+ * For EL expressions and predicates
+ *
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@ConfigurationProperties(prefix = "camel.language.el")
+public class JuelLanguageConfiguration {
+
+ /**
+ * Whether to trim the value to remove leading and trailing whitespaces and
+ * line breaks
+ */
+ private Boolean trim = true;
+
+ public Boolean getTrim() {
+ return trim;
+ }
+
+ public void setTrim(Boolean trim) {
+ this.trim = trim;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/53eba311/components/camel-juel/src/main/resources/META-INF/spring.factories
----------------------------------------------------------------------
diff --git a/components/camel-juel/src/main/resources/META-INF/spring.factories b/components/camel-juel/src/main/resources/META-INF/spring.factories
new file mode 100644
index 0000000..4f44afa
--- /dev/null
+++ b/components/camel-juel/src/main/resources/META-INF/spring.factories
@@ -0,0 +1,19 @@
+#
+# 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.
+#
+
+org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
+org.apache.camel.language.juel.springboot.JuelLanguageAutoConfiguration
http://git-wip-us.apache.org/repos/asf/camel/blob/53eba311/components/camel-jxpath/src/main/java/org/apache/camel/language/jxpath/springboot/JXPathLanguageAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components/camel-jxpath/src/main/java/org/apache/camel/language/jxpath/springboot/JXPathLanguageAutoConfiguration.java b/components/camel-jxpath/src/main/java/org/apache/camel/language/jxpath/springboot/JXPathLanguageAutoConfiguration.java
new file mode 100644
index 0000000..a0e2c92
--- /dev/null
+++ b/components/camel-jxpath/src/main/java/org/apache/camel/language/jxpath/springboot/JXPathLanguageAutoConfiguration.java
@@ -0,0 +1,54 @@
+/**
+ * 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.jxpath.springboot;
+
+import java.util.HashMap;
+import java.util.Map;
+import org.apache.camel.CamelContext;
+import org.apache.camel.CamelContextAware;
+import org.apache.camel.language.jxpath.JXPathLanguage;
+import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@Configuration
+@EnableConfigurationProperties(JXPathLanguageConfiguration.class)
+public class JXPathLanguageAutoConfiguration {
+
+ @Bean(name = "jxpath-language")
+ @ConditionalOnClass(CamelContext.class)
+ @ConditionalOnMissingBean(JXPathLanguage.class)
+ public JXPathLanguage configureJXPathLanguage(CamelContext camelContext,
+ JXPathLanguageConfiguration configuration) throws Exception {
+ JXPathLanguage language = new JXPathLanguage();
+ if (language instanceof CamelContextAware) {
+ ((CamelContextAware) language).setCamelContext(camelContext);
+ }
+ Map<String, Object> parameters = new HashMap<>();
+ IntrospectionSupport.getProperties(configuration, parameters, null,
+ false);
+ IntrospectionSupport.setProperties(camelContext,
+ camelContext.getTypeConverter(), language, parameters);
+ return language;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/53eba311/components/camel-jxpath/src/main/java/org/apache/camel/language/jxpath/springboot/JXPathLanguageConfiguration.java
----------------------------------------------------------------------
diff --git a/components/camel-jxpath/src/main/java/org/apache/camel/language/jxpath/springboot/JXPathLanguageConfiguration.java b/components/camel-jxpath/src/main/java/org/apache/camel/language/jxpath/springboot/JXPathLanguageConfiguration.java
new file mode 100644
index 0000000..ca46049
--- /dev/null
+++ b/components/camel-jxpath/src/main/java/org/apache/camel/language/jxpath/springboot/JXPathLanguageConfiguration.java
@@ -0,0 +1,56 @@
+/**
+ * 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.jxpath.springboot;
+
+import org.springframework.boot.context.properties.ConfigurationProperties;
+
+/**
+ * For JXPath expressions and predicates
+ *
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@ConfigurationProperties(prefix = "camel.language.jxpath")
+public class JXPathLanguageConfiguration {
+
+ /**
+ * Allows to turn lenient on the JXPathContext. When turned on this allows
+ * the JXPath expression to evaluate against expressions and message bodies
+ * which may be invalid / missing data. This option is by default false
+ */
+ private Boolean lenient = false;
+ /**
+ * Whether to trim the value to remove leading and trailing whitespaces and
+ * line breaks
+ */
+ private Boolean trim = true;
+
+ public Boolean getLenient() {
+ return lenient;
+ }
+
+ public void setLenient(Boolean lenient) {
+ this.lenient = lenient;
+ }
+
+ public Boolean getTrim() {
+ return trim;
+ }
+
+ public void setTrim(Boolean trim) {
+ this.trim = trim;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/53eba311/components/camel-jxpath/src/main/resources/META-INF/spring.factories
----------------------------------------------------------------------
diff --git a/components/camel-jxpath/src/main/resources/META-INF/spring.factories b/components/camel-jxpath/src/main/resources/META-INF/spring.factories
new file mode 100644
index 0000000..b6db2e5
--- /dev/null
+++ b/components/camel-jxpath/src/main/resources/META-INF/spring.factories
@@ -0,0 +1,19 @@
+#
+# 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.
+#
+
+org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
+org.apache.camel.language.jxpath.springboot.JXPathLanguageAutoConfiguration
http://git-wip-us.apache.org/repos/asf/camel/blob/53eba311/components/camel-mvel/src/main/java/org/apache/camel/language/mvel/springboot/MvelLanguageAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components/camel-mvel/src/main/java/org/apache/camel/language/mvel/springboot/MvelLanguageAutoConfiguration.java b/components/camel-mvel/src/main/java/org/apache/camel/language/mvel/springboot/MvelLanguageAutoConfiguration.java
new file mode 100644
index 0000000..caffb48
--- /dev/null
+++ b/components/camel-mvel/src/main/java/org/apache/camel/language/mvel/springboot/MvelLanguageAutoConfiguration.java
@@ -0,0 +1,54 @@
+/**
+ * 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.mvel.springboot;
+
+import java.util.HashMap;
+import java.util.Map;
+import org.apache.camel.CamelContext;
+import org.apache.camel.CamelContextAware;
+import org.apache.camel.language.mvel.MvelLanguage;
+import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@Configuration
+@EnableConfigurationProperties(MvelLanguageConfiguration.class)
+public class MvelLanguageAutoConfiguration {
+
+ @Bean(name = "mvel-language")
+ @ConditionalOnClass(CamelContext.class)
+ @ConditionalOnMissingBean(MvelLanguage.class)
+ public MvelLanguage configureMvelLanguage(CamelContext camelContext,
+ MvelLanguageConfiguration configuration) throws Exception {
+ MvelLanguage language = new MvelLanguage();
+ if (language instanceof CamelContextAware) {
+ ((CamelContextAware) language).setCamelContext(camelContext);
+ }
+ Map<String, Object> parameters = new HashMap<>();
+ IntrospectionSupport.getProperties(configuration, parameters, null,
+ false);
+ IntrospectionSupport.setProperties(camelContext,
+ camelContext.getTypeConverter(), language, parameters);
+ return language;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/53eba311/components/camel-mvel/src/main/java/org/apache/camel/language/mvel/springboot/MvelLanguageConfiguration.java
----------------------------------------------------------------------
diff --git a/components/camel-mvel/src/main/java/org/apache/camel/language/mvel/springboot/MvelLanguageConfiguration.java b/components/camel-mvel/src/main/java/org/apache/camel/language/mvel/springboot/MvelLanguageConfiguration.java
new file mode 100644
index 0000000..cad6bd9
--- /dev/null
+++ b/components/camel-mvel/src/main/java/org/apache/camel/language/mvel/springboot/MvelLanguageConfiguration.java
@@ -0,0 +1,42 @@
+/**
+ * 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.mvel.springboot;
+
+import org.springframework.boot.context.properties.ConfigurationProperties;
+
+/**
+ * For MVEL expressions and predicates
+ *
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@ConfigurationProperties(prefix = "camel.language.mvel")
+public class MvelLanguageConfiguration {
+
+ /**
+ * Whether to trim the value to remove leading and trailing whitespaces and
+ * line breaks
+ */
+ private Boolean trim = true;
+
+ public Boolean getTrim() {
+ return trim;
+ }
+
+ public void setTrim(Boolean trim) {
+ this.trim = trim;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/53eba311/components/camel-mvel/src/main/resources/META-INF/spring.factories
----------------------------------------------------------------------
diff --git a/components/camel-mvel/src/main/resources/META-INF/spring.factories b/components/camel-mvel/src/main/resources/META-INF/spring.factories
new file mode 100644
index 0000000..364248d
--- /dev/null
+++ b/components/camel-mvel/src/main/resources/META-INF/spring.factories
@@ -0,0 +1,19 @@
+#
+# 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.
+#
+
+org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
+org.apache.camel.language.mvel.springboot.MvelLanguageAutoConfiguration
http://git-wip-us.apache.org/repos/asf/camel/blob/53eba311/components/camel-ognl/src/main/java/org/apache/camel/language/ognl/springboot/OgnlLanguageAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components/camel-ognl/src/main/java/org/apache/camel/language/ognl/springboot/OgnlLanguageAutoConfiguration.java b/components/camel-ognl/src/main/java/org/apache/camel/language/ognl/springboot/OgnlLanguageAutoConfiguration.java
new file mode 100644
index 0000000..d57b797
--- /dev/null
+++ b/components/camel-ognl/src/main/java/org/apache/camel/language/ognl/springboot/OgnlLanguageAutoConfiguration.java
@@ -0,0 +1,54 @@
+/**
+ * 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.ognl.springboot;
+
+import java.util.HashMap;
+import java.util.Map;
+import org.apache.camel.CamelContext;
+import org.apache.camel.CamelContextAware;
+import org.apache.camel.language.ognl.OgnlLanguage;
+import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@Configuration
+@EnableConfigurationProperties(OgnlLanguageConfiguration.class)
+public class OgnlLanguageAutoConfiguration {
+
+ @Bean(name = "ognl-language")
+ @ConditionalOnClass(CamelContext.class)
+ @ConditionalOnMissingBean(OgnlLanguage.class)
+ public OgnlLanguage configureOgnlLanguage(CamelContext camelContext,
+ OgnlLanguageConfiguration configuration) throws Exception {
+ OgnlLanguage language = new OgnlLanguage();
+ if (language instanceof CamelContextAware) {
+ ((CamelContextAware) language).setCamelContext(camelContext);
+ }
+ Map<String, Object> parameters = new HashMap<>();
+ IntrospectionSupport.getProperties(configuration, parameters, null,
+ false);
+ IntrospectionSupport.setProperties(camelContext,
+ camelContext.getTypeConverter(), language, parameters);
+ return language;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/53eba311/components/camel-ognl/src/main/java/org/apache/camel/language/ognl/springboot/OgnlLanguageConfiguration.java
----------------------------------------------------------------------
diff --git a/components/camel-ognl/src/main/java/org/apache/camel/language/ognl/springboot/OgnlLanguageConfiguration.java b/components/camel-ognl/src/main/java/org/apache/camel/language/ognl/springboot/OgnlLanguageConfiguration.java
new file mode 100644
index 0000000..c0db250
--- /dev/null
+++ b/components/camel-ognl/src/main/java/org/apache/camel/language/ognl/springboot/OgnlLanguageConfiguration.java
@@ -0,0 +1,42 @@
+/**
+ * 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.ognl.springboot;
+
+import org.springframework.boot.context.properties.ConfigurationProperties;
+
+/**
+ * For OGNL expressions and predicates
+ *
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@ConfigurationProperties(prefix = "camel.language.ognl")
+public class OgnlLanguageConfiguration {
+
+ /**
+ * Whether to trim the value to remove leading and trailing whitespaces and
+ * line breaks
+ */
+ private Boolean trim = true;
+
+ public Boolean getTrim() {
+ return trim;
+ }
+
+ public void setTrim(Boolean trim) {
+ this.trim = trim;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/53eba311/components/camel-ognl/src/main/resources/META-INF/spring.factories
----------------------------------------------------------------------
diff --git a/components/camel-ognl/src/main/resources/META-INF/spring.factories b/components/camel-ognl/src/main/resources/META-INF/spring.factories
new file mode 100644
index 0000000..f7cf96f
--- /dev/null
+++ b/components/camel-ognl/src/main/resources/META-INF/spring.factories
@@ -0,0 +1,19 @@
+#
+# 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.
+#
+
+org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
+org.apache.camel.language.ognl.springboot.OgnlLanguageAutoConfiguration
http://git-wip-us.apache.org/repos/asf/camel/blob/53eba311/components/camel-saxon/src/main/java/org/apache/camel/language/xquery/springboot/XQueryLanguageAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components/camel-saxon/src/main/java/org/apache/camel/language/xquery/springboot/XQueryLanguageAutoConfiguration.java b/components/camel-saxon/src/main/java/org/apache/camel/language/xquery/springboot/XQueryLanguageAutoConfiguration.java
new file mode 100644
index 0000000..b0eac0c
--- /dev/null
+++ b/components/camel-saxon/src/main/java/org/apache/camel/language/xquery/springboot/XQueryLanguageAutoConfiguration.java
@@ -0,0 +1,54 @@
+/**
+ * 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.xquery.springboot;
+
+import java.util.HashMap;
+import java.util.Map;
+import org.apache.camel.CamelContext;
+import org.apache.camel.CamelContextAware;
+import org.apache.camel.language.xquery.XQueryLanguage;
+import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@Configuration
+@EnableConfigurationProperties(XQueryLanguageConfiguration.class)
+public class XQueryLanguageAutoConfiguration {
+
+ @Bean(name = "xquery-language")
+ @ConditionalOnClass(CamelContext.class)
+ @ConditionalOnMissingBean(XQueryLanguage.class)
+ public XQueryLanguage configureXQueryLanguage(CamelContext camelContext,
+ XQueryLanguageConfiguration configuration) throws Exception {
+ XQueryLanguage language = new XQueryLanguage();
+ if (language instanceof CamelContextAware) {
+ ((CamelContextAware) language).setCamelContext(camelContext);
+ }
+ Map<String, Object> parameters = new HashMap<>();
+ IntrospectionSupport.getProperties(configuration, parameters, null,
+ false);
+ IntrospectionSupport.setProperties(camelContext,
+ camelContext.getTypeConverter(), language, parameters);
+ return language;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/53eba311/components/camel-saxon/src/main/java/org/apache/camel/language/xquery/springboot/XQueryLanguageConfiguration.java
----------------------------------------------------------------------
diff --git a/components/camel-saxon/src/main/java/org/apache/camel/language/xquery/springboot/XQueryLanguageConfiguration.java b/components/camel-saxon/src/main/java/org/apache/camel/language/xquery/springboot/XQueryLanguageConfiguration.java
new file mode 100644
index 0000000..fda83c3
--- /dev/null
+++ b/components/camel-saxon/src/main/java/org/apache/camel/language/xquery/springboot/XQueryLanguageConfiguration.java
@@ -0,0 +1,67 @@
+/**
+ * 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.xquery.springboot;
+
+import org.springframework.boot.context.properties.ConfigurationProperties;
+
+/**
+ * For XQuery expressions and predicates
+ *
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@ConfigurationProperties(prefix = "camel.language.xquery")
+public class XQueryLanguageConfiguration {
+
+ /**
+ * Sets the class name of the result type (type from output) The default
+ * result type is NodeSet
+ */
+ private String type;
+ /**
+ * Name of header to use as input instead of the message body
+ */
+ private String headerName;
+ /**
+ * Whether to trim the value to remove leading and trailing whitespaces and
+ * line breaks
+ */
+ private Boolean trim = true;
+
+ public String getType() {
+ return type;
+ }
+
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ public String getHeaderName() {
+ return headerName;
+ }
+
+ public void setHeaderName(String headerName) {
+ this.headerName = headerName;
+ }
+
+ public Boolean getTrim() {
+ return trim;
+ }
+
+ public void setTrim(Boolean trim) {
+ this.trim = trim;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/53eba311/components/camel-saxon/src/main/resources/META-INF/spring.factories
----------------------------------------------------------------------
diff --git a/components/camel-saxon/src/main/resources/META-INF/spring.factories b/components/camel-saxon/src/main/resources/META-INF/spring.factories
index e9b7419..06c7916 100644
--- a/components/camel-saxon/src/main/resources/META-INF/spring.factories
+++ b/components/camel-saxon/src/main/resources/META-INF/spring.factories
@@ -16,4 +16,6 @@
#
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
-org.apache.camel.component.xquery.springboot.XQueryComponentAutoConfiguration
+org.apache.camel.component.xquery.springboot.XQueryComponentAutoConfiguration,\
+org.apache.camel.language.xquery.springboot.XQueryLanguageAutoConfiguration
+
http://git-wip-us.apache.org/repos/asf/camel/blob/53eba311/components/camel-script/src/main/java/org/apache/camel/builder/script/springboot/JavaScriptLanguageAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components/camel-script/src/main/java/org/apache/camel/builder/script/springboot/JavaScriptLanguageAutoConfiguration.java b/components/camel-script/src/main/java/org/apache/camel/builder/script/springboot/JavaScriptLanguageAutoConfiguration.java
new file mode 100644
index 0000000..7462a2e
--- /dev/null
+++ b/components/camel-script/src/main/java/org/apache/camel/builder/script/springboot/JavaScriptLanguageAutoConfiguration.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.builder.script.springboot;
+
+import java.util.HashMap;
+import java.util.Map;
+import org.apache.camel.CamelContext;
+import org.apache.camel.CamelContextAware;
+import org.apache.camel.builder.script.JavaScriptLanguage;
+import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@Configuration
+@EnableConfigurationProperties(JavaScriptLanguageConfiguration.class)
+public class JavaScriptLanguageAutoConfiguration {
+
+ @Bean(name = "javaScript-language")
+ @ConditionalOnClass(CamelContext.class)
+ @ConditionalOnMissingBean(JavaScriptLanguage.class)
+ public JavaScriptLanguage configureJavaScriptLanguage(
+ CamelContext camelContext,
+ JavaScriptLanguageConfiguration configuration) throws Exception {
+ JavaScriptLanguage language = new JavaScriptLanguage();
+ if (language instanceof CamelContextAware) {
+ ((CamelContextAware) language).setCamelContext(camelContext);
+ }
+ Map<String, Object> parameters = new HashMap<>();
+ IntrospectionSupport.getProperties(configuration, parameters, null,
+ false);
+ IntrospectionSupport.setProperties(camelContext,
+ camelContext.getTypeConverter(), language, parameters);
+ return language;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/53eba311/components/camel-script/src/main/java/org/apache/camel/builder/script/springboot/JavaScriptLanguageConfiguration.java
----------------------------------------------------------------------
diff --git a/components/camel-script/src/main/java/org/apache/camel/builder/script/springboot/JavaScriptLanguageConfiguration.java b/components/camel-script/src/main/java/org/apache/camel/builder/script/springboot/JavaScriptLanguageConfiguration.java
new file mode 100644
index 0000000..d7be77d
--- /dev/null
+++ b/components/camel-script/src/main/java/org/apache/camel/builder/script/springboot/JavaScriptLanguageConfiguration.java
@@ -0,0 +1,42 @@
+/**
+ * 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.builder.script.springboot;
+
+import org.springframework.boot.context.properties.ConfigurationProperties;
+
+/**
+ * For JavaScript expressions and predicates
+ *
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@ConfigurationProperties(prefix = "camel.language.javascript")
+public class JavaScriptLanguageConfiguration {
+
+ /**
+ * Whether to trim the value to remove leading and trailing whitespaces and
+ * line breaks
+ */
+ private Boolean trim = true;
+
+ public Boolean getTrim() {
+ return trim;
+ }
+
+ public void setTrim(Boolean trim) {
+ this.trim = trim;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/53eba311/components/camel-script/src/main/java/org/apache/camel/builder/script/springboot/PhpLanguageAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components/camel-script/src/main/java/org/apache/camel/builder/script/springboot/PhpLanguageAutoConfiguration.java b/components/camel-script/src/main/java/org/apache/camel/builder/script/springboot/PhpLanguageAutoConfiguration.java
new file mode 100644
index 0000000..e5c520ed
--- /dev/null
+++ b/components/camel-script/src/main/java/org/apache/camel/builder/script/springboot/PhpLanguageAutoConfiguration.java
@@ -0,0 +1,54 @@
+/**
+ * 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.builder.script.springboot;
+
+import java.util.HashMap;
+import java.util.Map;
+import org.apache.camel.CamelContext;
+import org.apache.camel.CamelContextAware;
+import org.apache.camel.builder.script.PhpLanguage;
+import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@Configuration
+@EnableConfigurationProperties(PhpLanguageConfiguration.class)
+public class PhpLanguageAutoConfiguration {
+
+ @Bean(name = "php-language")
+ @ConditionalOnClass(CamelContext.class)
+ @ConditionalOnMissingBean(PhpLanguage.class)
+ public PhpLanguage configurePhpLanguage(CamelContext camelContext,
+ PhpLanguageConfiguration configuration) throws Exception {
+ PhpLanguage language = new PhpLanguage();
+ if (language instanceof CamelContextAware) {
+ ((CamelContextAware) language).setCamelContext(camelContext);
+ }
+ Map<String, Object> parameters = new HashMap<>();
+ IntrospectionSupport.getProperties(configuration, parameters, null,
+ false);
+ IntrospectionSupport.setProperties(camelContext,
+ camelContext.getTypeConverter(), language, parameters);
+ return language;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/53eba311/components/camel-script/src/main/java/org/apache/camel/builder/script/springboot/PhpLanguageConfiguration.java
----------------------------------------------------------------------
diff --git a/components/camel-script/src/main/java/org/apache/camel/builder/script/springboot/PhpLanguageConfiguration.java b/components/camel-script/src/main/java/org/apache/camel/builder/script/springboot/PhpLanguageConfiguration.java
new file mode 100644
index 0000000..0bdee8e
--- /dev/null
+++ b/components/camel-script/src/main/java/org/apache/camel/builder/script/springboot/PhpLanguageConfiguration.java
@@ -0,0 +1,42 @@
+/**
+ * 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.builder.script.springboot;
+
+import org.springframework.boot.context.properties.ConfigurationProperties;
+
+/**
+ * For PHP expressions and predicates
+ *
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@ConfigurationProperties(prefix = "camel.language.php")
+public class PhpLanguageConfiguration {
+
+ /**
+ * Whether to trim the value to remove leading and trailing whitespaces and
+ * line breaks
+ */
+ private Boolean trim = true;
+
+ public Boolean getTrim() {
+ return trim;
+ }
+
+ public void setTrim(Boolean trim) {
+ this.trim = trim;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/53eba311/components/camel-script/src/main/java/org/apache/camel/builder/script/springboot/PythonLanguageAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components/camel-script/src/main/java/org/apache/camel/builder/script/springboot/PythonLanguageAutoConfiguration.java b/components/camel-script/src/main/java/org/apache/camel/builder/script/springboot/PythonLanguageAutoConfiguration.java
new file mode 100644
index 0000000..afe86e4
--- /dev/null
+++ b/components/camel-script/src/main/java/org/apache/camel/builder/script/springboot/PythonLanguageAutoConfiguration.java
@@ -0,0 +1,54 @@
+/**
+ * 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.builder.script.springboot;
+
+import java.util.HashMap;
+import java.util.Map;
+import org.apache.camel.CamelContext;
+import org.apache.camel.CamelContextAware;
+import org.apache.camel.builder.script.PythonLanguage;
+import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@Configuration
+@EnableConfigurationProperties(PythonLanguageConfiguration.class)
+public class PythonLanguageAutoConfiguration {
+
+ @Bean(name = "python-language")
+ @ConditionalOnClass(CamelContext.class)
+ @ConditionalOnMissingBean(PythonLanguage.class)
+ public PythonLanguage configurePythonLanguage(CamelContext camelContext,
+ PythonLanguageConfiguration configuration) throws Exception {
+ PythonLanguage language = new PythonLanguage();
+ if (language instanceof CamelContextAware) {
+ ((CamelContextAware) language).setCamelContext(camelContext);
+ }
+ Map<String, Object> parameters = new HashMap<>();
+ IntrospectionSupport.getProperties(configuration, parameters, null,
+ false);
+ IntrospectionSupport.setProperties(camelContext,
+ camelContext.getTypeConverter(), language, parameters);
+ return language;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/53eba311/components/camel-script/src/main/java/org/apache/camel/builder/script/springboot/PythonLanguageConfiguration.java
----------------------------------------------------------------------
diff --git a/components/camel-script/src/main/java/org/apache/camel/builder/script/springboot/PythonLanguageConfiguration.java b/components/camel-script/src/main/java/org/apache/camel/builder/script/springboot/PythonLanguageConfiguration.java
new file mode 100644
index 0000000..1b0f256
--- /dev/null
+++ b/components/camel-script/src/main/java/org/apache/camel/builder/script/springboot/PythonLanguageConfiguration.java
@@ -0,0 +1,42 @@
+/**
+ * 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.builder.script.springboot;
+
+import org.springframework.boot.context.properties.ConfigurationProperties;
+
+/**
+ * For Python expressions and predicates
+ *
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@ConfigurationProperties(prefix = "camel.language.python")
+public class PythonLanguageConfiguration {
+
+ /**
+ * Whether to trim the value to remove leading and trailing whitespaces and
+ * line breaks
+ */
+ private Boolean trim = true;
+
+ public Boolean getTrim() {
+ return trim;
+ }
+
+ public void setTrim(Boolean trim) {
+ this.trim = trim;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/53eba311/components/camel-script/src/main/java/org/apache/camel/builder/script/springboot/RubyLanguageAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components/camel-script/src/main/java/org/apache/camel/builder/script/springboot/RubyLanguageAutoConfiguration.java b/components/camel-script/src/main/java/org/apache/camel/builder/script/springboot/RubyLanguageAutoConfiguration.java
new file mode 100644
index 0000000..ce868a9
--- /dev/null
+++ b/components/camel-script/src/main/java/org/apache/camel/builder/script/springboot/RubyLanguageAutoConfiguration.java
@@ -0,0 +1,54 @@
+/**
+ * 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.builder.script.springboot;
+
+import java.util.HashMap;
+import java.util.Map;
+import org.apache.camel.CamelContext;
+import org.apache.camel.CamelContextAware;
+import org.apache.camel.builder.script.RubyLanguage;
+import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@Configuration
+@EnableConfigurationProperties(RubyLanguageConfiguration.class)
+public class RubyLanguageAutoConfiguration {
+
+ @Bean(name = "ruby-language")
+ @ConditionalOnClass(CamelContext.class)
+ @ConditionalOnMissingBean(RubyLanguage.class)
+ public RubyLanguage configureRubyLanguage(CamelContext camelContext,
+ RubyLanguageConfiguration configuration) throws Exception {
+ RubyLanguage language = new RubyLanguage();
+ if (language instanceof CamelContextAware) {
+ ((CamelContextAware) language).setCamelContext(camelContext);
+ }
+ Map<String, Object> parameters = new HashMap<>();
+ IntrospectionSupport.getProperties(configuration, parameters, null,
+ false);
+ IntrospectionSupport.setProperties(camelContext,
+ camelContext.getTypeConverter(), language, parameters);
+ return language;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/53eba311/components/camel-script/src/main/java/org/apache/camel/builder/script/springboot/RubyLanguageConfiguration.java
----------------------------------------------------------------------
diff --git a/components/camel-script/src/main/java/org/apache/camel/builder/script/springboot/RubyLanguageConfiguration.java b/components/camel-script/src/main/java/org/apache/camel/builder/script/springboot/RubyLanguageConfiguration.java
new file mode 100644
index 0000000..865fb78
--- /dev/null
+++ b/components/camel-script/src/main/java/org/apache/camel/builder/script/springboot/RubyLanguageConfiguration.java
@@ -0,0 +1,42 @@
+/**
+ * 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.builder.script.springboot;
+
+import org.springframework.boot.context.properties.ConfigurationProperties;
+
+/**
+ * For Ruby expressions and predicates
+ *
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@ConfigurationProperties(prefix = "camel.language.ruby")
+public class RubyLanguageConfiguration {
+
+ /**
+ * Whether to trim the value to remove leading and trailing whitespaces and
+ * line breaks
+ */
+ private Boolean trim = true;
+
+ public Boolean getTrim() {
+ return trim;
+ }
+
+ public void setTrim(Boolean trim) {
+ this.trim = trim;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/53eba311/components/camel-script/src/main/resources/META-INF/spring.factories
----------------------------------------------------------------------
diff --git a/components/camel-script/src/main/resources/META-INF/spring.factories b/components/camel-script/src/main/resources/META-INF/spring.factories
new file mode 100644
index 0000000..9aa0768
--- /dev/null
+++ b/components/camel-script/src/main/resources/META-INF/spring.factories
@@ -0,0 +1,25 @@
+#
+# 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.
+#
+
+org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
+org.apache.camel.builder.script.springboot.JavaScriptLanguageAutoConfiguration,\
+org.apache.camel.builder.script.springboot.PythonLanguageAutoConfiguration,\
+org.apache.camel.builder.script.springboot.PhpLanguageAutoConfiguration,\
+org.apache.camel.builder.script.springboot.RubyLanguageAutoConfiguration
+
+
+
http://git-wip-us.apache.org/repos/asf/camel/blob/53eba311/components/camel-spring/src/main/java/org/apache/camel/language/spel/springboot/SpelLanguageAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components/camel-spring/src/main/java/org/apache/camel/language/spel/springboot/SpelLanguageAutoConfiguration.java b/components/camel-spring/src/main/java/org/apache/camel/language/spel/springboot/SpelLanguageAutoConfiguration.java
new file mode 100644
index 0000000..0d66bdf
--- /dev/null
+++ b/components/camel-spring/src/main/java/org/apache/camel/language/spel/springboot/SpelLanguageAutoConfiguration.java
@@ -0,0 +1,54 @@
+/**
+ * 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.spel.springboot;
+
+import java.util.HashMap;
+import java.util.Map;
+import org.apache.camel.CamelContext;
+import org.apache.camel.CamelContextAware;
+import org.apache.camel.language.spel.SpelLanguage;
+import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@Configuration
+@EnableConfigurationProperties(SpelLanguageConfiguration.class)
+public class SpelLanguageAutoConfiguration {
+
+ @Bean(name = "spel-language")
+ @ConditionalOnClass(CamelContext.class)
+ @ConditionalOnMissingBean(SpelLanguage.class)
+ public SpelLanguage configureSpelLanguage(CamelContext camelContext,
+ SpelLanguageConfiguration configuration) throws Exception {
+ SpelLanguage language = new SpelLanguage();
+ if (language instanceof CamelContextAware) {
+ ((CamelContextAware) language).setCamelContext(camelContext);
+ }
+ Map<String, Object> parameters = new HashMap<>();
+ IntrospectionSupport.getProperties(configuration, parameters, null,
+ false);
+ IntrospectionSupport.setProperties(camelContext,
+ camelContext.getTypeConverter(), language, parameters);
+ return language;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/53eba311/components/camel-spring/src/main/java/org/apache/camel/language/spel/springboot/SpelLanguageConfiguration.java
----------------------------------------------------------------------
diff --git a/components/camel-spring/src/main/java/org/apache/camel/language/spel/springboot/SpelLanguageConfiguration.java b/components/camel-spring/src/main/java/org/apache/camel/language/spel/springboot/SpelLanguageConfiguration.java
new file mode 100644
index 0000000..b8dddfd
--- /dev/null
+++ b/components/camel-spring/src/main/java/org/apache/camel/language/spel/springboot/SpelLanguageConfiguration.java
@@ -0,0 +1,42 @@
+/**
+ * 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.spel.springboot;
+
+import org.springframework.boot.context.properties.ConfigurationProperties;
+
+/**
+ * For Spring Expression Language (SpEL) expressions and predicates
+ *
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@ConfigurationProperties(prefix = "camel.language.spel")
+public class SpelLanguageConfiguration {
+
+ /**
+ * Whether to trim the value to remove leading and trailing whitespaces and
+ * line breaks
+ */
+ private Boolean trim = true;
+
+ public Boolean getTrim() {
+ return trim;
+ }
+
+ public void setTrim(Boolean trim) {
+ this.trim = trim;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/53eba311/components/camel-spring/src/main/resources/META-INF/spring.factories
----------------------------------------------------------------------
diff --git a/components/camel-spring/src/main/resources/META-INF/spring.factories b/components/camel-spring/src/main/resources/META-INF/spring.factories
index 3b58cd1..69ce171 100644
--- a/components/camel-spring/src/main/resources/META-INF/spring.factories
+++ b/components/camel-spring/src/main/resources/META-INF/spring.factories
@@ -16,4 +16,6 @@
#
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
-org.apache.camel.component.event.springboot.EventComponentAutoConfiguration
+org.apache.camel.component.event.springboot.EventComponentAutoConfiguration,\
+org.apache.camel.language.spel.springboot.SpelLanguageAutoConfiguration
+
[3/4] camel git commit: CAMEL-10209: spring boot - Auto configuration
for languages
Posted by da...@apache.org.
CAMEL-10209: spring boot - Auto configuration for languages
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/53eba311
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/53eba311
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/53eba311
Branch: refs/heads/master
Commit: 53eba311b09d3b40b5fdaddce9f1a04f735e0314
Parents: a7dedd6
Author: Claus Ibsen <da...@apache.org>
Authored: Mon Aug 1 09:39:54 2016 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Mon Aug 1 10:16:12 2016 +0200
----------------------------------------------------------------------
.../BeanLanguageAutoConfiguration.java | 54 +++++++
.../springboot/BeanLanguageConfiguration.java | 95 +++++++++++
.../ConstantLanguageAutoConfiguration.java | 55 +++++++
.../ConstantLanguageConfiguration.java | 42 +++++
.../HeaderLanguageAutoConfiguration.java | 54 +++++++
.../springboot/HeaderLanguageConfiguration.java | 42 +++++
...changePropertyLanguageAutoConfiguration.java | 56 +++++++
.../ExchangePropertyLanguageConfiguration.java | 42 +++++
.../RefLanguageAutoConfiguration.java | 54 +++++++
.../springboot/RefLanguageConfiguration.java | 42 +++++
.../FileLanguageAutoConfiguration.java | 54 +++++++
.../springboot/FileLanguageConfiguration.java | 42 +++++
.../SimpleLanguageAutoConfiguration.java | 54 +++++++
.../springboot/SimpleLanguageConfiguration.java | 42 +++++
.../TokenizeLanguageAutoConfiguration.java | 55 +++++++
.../TokenizeLanguageConfiguration.java | 157 +++++++++++++++++++
.../XMLTokenizeLanguageAutoConfiguration.java | 55 +++++++
.../XMLTokenizeLanguageConfiguration.java | 82 ++++++++++
.../XPathLanguageAutoConfiguration.java | 54 +++++++
.../springboot/XPathLanguageConfiguration.java | 114 ++++++++++++++
.../main/resources/META-INF/spring.factories | 22 ++-
.../GroovyLanguageAutoConfiguration.java | 54 +++++++
.../springboot/GroovyLanguageConfiguration.java | 42 +++++
.../main/resources/META-INF/spring.factories | 19 +++
.../TerserLanguageAutoConfiguration.java | 54 +++++++
.../springboot/TerserLanguageConfiguration.java | 42 +++++
.../main/resources/META-INF/spring.factories | 4 +-
.../SqlLanguageAutoConfiguration.java | 54 +++++++
.../springboot/SqlLanguageConfiguration.java | 42 +++++
.../main/resources/META-INF/spring.factories | 19 +++
.../JsonPathLanguageAutoConfiguration.java | 55 +++++++
.../JsonPathLanguageConfiguration.java | 66 ++++++++
.../main/resources/META-INF/spring.factories | 19 +++
.../JuelLanguageAutoConfiguration.java | 54 +++++++
.../springboot/JuelLanguageConfiguration.java | 42 +++++
.../main/resources/META-INF/spring.factories | 19 +++
.../JXPathLanguageAutoConfiguration.java | 54 +++++++
.../springboot/JXPathLanguageConfiguration.java | 56 +++++++
.../main/resources/META-INF/spring.factories | 19 +++
.../MvelLanguageAutoConfiguration.java | 54 +++++++
.../springboot/MvelLanguageConfiguration.java | 42 +++++
.../main/resources/META-INF/spring.factories | 19 +++
.../OgnlLanguageAutoConfiguration.java | 54 +++++++
.../springboot/OgnlLanguageConfiguration.java | 42 +++++
.../main/resources/META-INF/spring.factories | 19 +++
.../XQueryLanguageAutoConfiguration.java | 54 +++++++
.../springboot/XQueryLanguageConfiguration.java | 67 ++++++++
.../main/resources/META-INF/spring.factories | 4 +-
.../JavaScriptLanguageAutoConfiguration.java | 55 +++++++
.../JavaScriptLanguageConfiguration.java | 42 +++++
.../PhpLanguageAutoConfiguration.java | 54 +++++++
.../springboot/PhpLanguageConfiguration.java | 42 +++++
.../PythonLanguageAutoConfiguration.java | 54 +++++++
.../springboot/PythonLanguageConfiguration.java | 42 +++++
.../RubyLanguageAutoConfiguration.java | 54 +++++++
.../springboot/RubyLanguageConfiguration.java | 42 +++++
.../main/resources/META-INF/spring.factories | 25 +++
.../SpelLanguageAutoConfiguration.java | 54 +++++++
.../springboot/SpelLanguageConfiguration.java | 42 +++++
.../main/resources/META-INF/spring.factories | 4 +-
60 files changed, 2842 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/53eba311/camel-core/src/main/java/org/apache/camel/language/bean/springboot/BeanLanguageAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/language/bean/springboot/BeanLanguageAutoConfiguration.java b/camel-core/src/main/java/org/apache/camel/language/bean/springboot/BeanLanguageAutoConfiguration.java
new file mode 100644
index 0000000..d059788
--- /dev/null
+++ b/camel-core/src/main/java/org/apache/camel/language/bean/springboot/BeanLanguageAutoConfiguration.java
@@ -0,0 +1,54 @@
+/**
+ * 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.bean.springboot;
+
+import java.util.HashMap;
+import java.util.Map;
+import org.apache.camel.CamelContext;
+import org.apache.camel.CamelContextAware;
+import org.apache.camel.language.bean.BeanLanguage;
+import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@Configuration
+@EnableConfigurationProperties(BeanLanguageConfiguration.class)
+public class BeanLanguageAutoConfiguration {
+
+ @Bean(name = "bean-language")
+ @ConditionalOnClass(CamelContext.class)
+ @ConditionalOnMissingBean(BeanLanguage.class)
+ public BeanLanguage configureBeanLanguage(CamelContext camelContext,
+ BeanLanguageConfiguration configuration) throws Exception {
+ BeanLanguage language = new BeanLanguage();
+ if (language instanceof CamelContextAware) {
+ ((CamelContextAware) language).setCamelContext(camelContext);
+ }
+ Map<String, Object> parameters = new HashMap<>();
+ IntrospectionSupport.getProperties(configuration, parameters, null,
+ false);
+ IntrospectionSupport.setProperties(camelContext,
+ camelContext.getTypeConverter(), language, parameters);
+ return language;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/53eba311/camel-core/src/main/java/org/apache/camel/language/bean/springboot/BeanLanguageConfiguration.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/language/bean/springboot/BeanLanguageConfiguration.java b/camel-core/src/main/java/org/apache/camel/language/bean/springboot/BeanLanguageConfiguration.java
new file mode 100644
index 0000000..6fbb0c6
--- /dev/null
+++ b/camel-core/src/main/java/org/apache/camel/language/bean/springboot/BeanLanguageConfiguration.java
@@ -0,0 +1,95 @@
+/**
+ * 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.bean.springboot;
+
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.boot.context.properties.DeprecatedConfigurationProperty;
+
+/**
+ * For expressions and predicates using a java bean (aka method call)
+ *
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@ConfigurationProperties(prefix = "camel.language.bean")
+public class BeanLanguageConfiguration {
+
+ /**
+ * Either a reference or a class name of the bean to use
+ */
+ @Deprecated
+ private String bean;
+ /**
+ * Reference to bean to lookup in the registry
+ */
+ private String ref;
+ /**
+ * Name of method to call
+ */
+ private String method;
+ /**
+ * Class name of the bean to use
+ */
+ private String beanType;
+ /**
+ * Whether to trim the value to remove leading and trailing whitespaces and
+ * line breaks
+ */
+ private Boolean trim = true;
+
+ @Deprecated
+ @DeprecatedConfigurationProperty
+ public String getBean() {
+ return bean;
+ }
+
+ @Deprecated
+ public void setBean(String bean) {
+ this.bean = bean;
+ }
+
+ public String getRef() {
+ return ref;
+ }
+
+ public void setRef(String ref) {
+ this.ref = ref;
+ }
+
+ public String getMethod() {
+ return method;
+ }
+
+ public void setMethod(String method) {
+ this.method = method;
+ }
+
+ public String getBeanType() {
+ return beanType;
+ }
+
+ public void setBeanType(String beanType) {
+ this.beanType = beanType;
+ }
+
+ public Boolean getTrim() {
+ return trim;
+ }
+
+ public void setTrim(Boolean trim) {
+ this.trim = trim;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/53eba311/camel-core/src/main/java/org/apache/camel/language/constant/springboot/ConstantLanguageAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/language/constant/springboot/ConstantLanguageAutoConfiguration.java b/camel-core/src/main/java/org/apache/camel/language/constant/springboot/ConstantLanguageAutoConfiguration.java
new file mode 100644
index 0000000..996c5d2
--- /dev/null
+++ b/camel-core/src/main/java/org/apache/camel/language/constant/springboot/ConstantLanguageAutoConfiguration.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.constant.springboot;
+
+import java.util.HashMap;
+import java.util.Map;
+import org.apache.camel.CamelContext;
+import org.apache.camel.CamelContextAware;
+import org.apache.camel.language.constant.ConstantLanguage;
+import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@Configuration
+@EnableConfigurationProperties(ConstantLanguageConfiguration.class)
+public class ConstantLanguageAutoConfiguration {
+
+ @Bean(name = "constant-language")
+ @ConditionalOnClass(CamelContext.class)
+ @ConditionalOnMissingBean(ConstantLanguage.class)
+ public ConstantLanguage configureConstantLanguage(
+ CamelContext camelContext,
+ ConstantLanguageConfiguration configuration) throws Exception {
+ ConstantLanguage language = new ConstantLanguage();
+ if (language instanceof CamelContextAware) {
+ ((CamelContextAware) language).setCamelContext(camelContext);
+ }
+ Map<String, Object> parameters = new HashMap<>();
+ IntrospectionSupport.getProperties(configuration, parameters, null,
+ false);
+ IntrospectionSupport.setProperties(camelContext,
+ camelContext.getTypeConverter(), language, parameters);
+ return language;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/53eba311/camel-core/src/main/java/org/apache/camel/language/constant/springboot/ConstantLanguageConfiguration.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/language/constant/springboot/ConstantLanguageConfiguration.java b/camel-core/src/main/java/org/apache/camel/language/constant/springboot/ConstantLanguageConfiguration.java
new file mode 100644
index 0000000..cec0509
--- /dev/null
+++ b/camel-core/src/main/java/org/apache/camel/language/constant/springboot/ConstantLanguageConfiguration.java
@@ -0,0 +1,42 @@
+/**
+ * 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.constant.springboot;
+
+import org.springframework.boot.context.properties.ConfigurationProperties;
+
+/**
+ * For expressions and predicates using a constant
+ *
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@ConfigurationProperties(prefix = "camel.language.constant")
+public class ConstantLanguageConfiguration {
+
+ /**
+ * Whether to trim the value to remove leading and trailing whitespaces and
+ * line breaks
+ */
+ private Boolean trim = true;
+
+ public Boolean getTrim() {
+ return trim;
+ }
+
+ public void setTrim(Boolean trim) {
+ this.trim = trim;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/53eba311/camel-core/src/main/java/org/apache/camel/language/header/springboot/HeaderLanguageAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/language/header/springboot/HeaderLanguageAutoConfiguration.java b/camel-core/src/main/java/org/apache/camel/language/header/springboot/HeaderLanguageAutoConfiguration.java
new file mode 100644
index 0000000..93276ef
--- /dev/null
+++ b/camel-core/src/main/java/org/apache/camel/language/header/springboot/HeaderLanguageAutoConfiguration.java
@@ -0,0 +1,54 @@
+/**
+ * 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.header.springboot;
+
+import java.util.HashMap;
+import java.util.Map;
+import org.apache.camel.CamelContext;
+import org.apache.camel.CamelContextAware;
+import org.apache.camel.language.header.HeaderLanguage;
+import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@Configuration
+@EnableConfigurationProperties(HeaderLanguageConfiguration.class)
+public class HeaderLanguageAutoConfiguration {
+
+ @Bean(name = "header-language")
+ @ConditionalOnClass(CamelContext.class)
+ @ConditionalOnMissingBean(HeaderLanguage.class)
+ public HeaderLanguage configureHeaderLanguage(CamelContext camelContext,
+ HeaderLanguageConfiguration configuration) throws Exception {
+ HeaderLanguage language = new HeaderLanguage();
+ if (language instanceof CamelContextAware) {
+ ((CamelContextAware) language).setCamelContext(camelContext);
+ }
+ Map<String, Object> parameters = new HashMap<>();
+ IntrospectionSupport.getProperties(configuration, parameters, null,
+ false);
+ IntrospectionSupport.setProperties(camelContext,
+ camelContext.getTypeConverter(), language, parameters);
+ return language;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/53eba311/camel-core/src/main/java/org/apache/camel/language/header/springboot/HeaderLanguageConfiguration.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/language/header/springboot/HeaderLanguageConfiguration.java b/camel-core/src/main/java/org/apache/camel/language/header/springboot/HeaderLanguageConfiguration.java
new file mode 100644
index 0000000..bf00d3a
--- /dev/null
+++ b/camel-core/src/main/java/org/apache/camel/language/header/springboot/HeaderLanguageConfiguration.java
@@ -0,0 +1,42 @@
+/**
+ * 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.header.springboot;
+
+import org.springframework.boot.context.properties.ConfigurationProperties;
+
+/**
+ * An expression which extracts the named exchange header
+ *
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@ConfigurationProperties(prefix = "camel.language.header")
+public class HeaderLanguageConfiguration {
+
+ /**
+ * Whether to trim the value to remove leading and trailing whitespaces and
+ * line breaks
+ */
+ private Boolean trim = true;
+
+ public Boolean getTrim() {
+ return trim;
+ }
+
+ public void setTrim(Boolean trim) {
+ this.trim = trim;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/53eba311/camel-core/src/main/java/org/apache/camel/language/property/springboot/ExchangePropertyLanguageAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/language/property/springboot/ExchangePropertyLanguageAutoConfiguration.java b/camel-core/src/main/java/org/apache/camel/language/property/springboot/ExchangePropertyLanguageAutoConfiguration.java
new file mode 100644
index 0000000..824866b
--- /dev/null
+++ b/camel-core/src/main/java/org/apache/camel/language/property/springboot/ExchangePropertyLanguageAutoConfiguration.java
@@ -0,0 +1,56 @@
+/**
+ * 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.property.springboot;
+
+import java.util.HashMap;
+import java.util.Map;
+import org.apache.camel.CamelContext;
+import org.apache.camel.CamelContextAware;
+import org.apache.camel.language.property.ExchangePropertyLanguage;
+import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@Configuration
+@EnableConfigurationProperties(ExchangePropertyLanguageConfiguration.class)
+public class ExchangePropertyLanguageAutoConfiguration {
+
+ @Bean(name = "exchangeProperty-language")
+ @ConditionalOnClass(CamelContext.class)
+ @ConditionalOnMissingBean(ExchangePropertyLanguage.class)
+ public ExchangePropertyLanguage configureExchangePropertyLanguage(
+ CamelContext camelContext,
+ ExchangePropertyLanguageConfiguration configuration)
+ throws Exception {
+ ExchangePropertyLanguage language = new ExchangePropertyLanguage();
+ if (language instanceof CamelContextAware) {
+ ((CamelContextAware) language).setCamelContext(camelContext);
+ }
+ Map<String, Object> parameters = new HashMap<>();
+ IntrospectionSupport.getProperties(configuration, parameters, null,
+ false);
+ IntrospectionSupport.setProperties(camelContext,
+ camelContext.getTypeConverter(), language, parameters);
+ return language;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/53eba311/camel-core/src/main/java/org/apache/camel/language/property/springboot/ExchangePropertyLanguageConfiguration.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/language/property/springboot/ExchangePropertyLanguageConfiguration.java b/camel-core/src/main/java/org/apache/camel/language/property/springboot/ExchangePropertyLanguageConfiguration.java
new file mode 100644
index 0000000..ef7a21c
--- /dev/null
+++ b/camel-core/src/main/java/org/apache/camel/language/property/springboot/ExchangePropertyLanguageConfiguration.java
@@ -0,0 +1,42 @@
+/**
+ * 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.property.springboot;
+
+import org.springframework.boot.context.properties.ConfigurationProperties;
+
+/**
+ * An expression which extracts the named exchange property
+ *
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@ConfigurationProperties(prefix = "camel.language.exchangeproperty")
+public class ExchangePropertyLanguageConfiguration {
+
+ /**
+ * Whether to trim the value to remove leading and trailing whitespaces and
+ * line breaks
+ */
+ private Boolean trim = true;
+
+ public Boolean getTrim() {
+ return trim;
+ }
+
+ public void setTrim(Boolean trim) {
+ this.trim = trim;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/53eba311/camel-core/src/main/java/org/apache/camel/language/ref/springboot/RefLanguageAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/language/ref/springboot/RefLanguageAutoConfiguration.java b/camel-core/src/main/java/org/apache/camel/language/ref/springboot/RefLanguageAutoConfiguration.java
new file mode 100644
index 0000000..49f3588
--- /dev/null
+++ b/camel-core/src/main/java/org/apache/camel/language/ref/springboot/RefLanguageAutoConfiguration.java
@@ -0,0 +1,54 @@
+/**
+ * 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.ref.springboot;
+
+import java.util.HashMap;
+import java.util.Map;
+import org.apache.camel.CamelContext;
+import org.apache.camel.CamelContextAware;
+import org.apache.camel.language.ref.RefLanguage;
+import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@Configuration
+@EnableConfigurationProperties(RefLanguageConfiguration.class)
+public class RefLanguageAutoConfiguration {
+
+ @Bean(name = "ref-language")
+ @ConditionalOnClass(CamelContext.class)
+ @ConditionalOnMissingBean(RefLanguage.class)
+ public RefLanguage configureRefLanguage(CamelContext camelContext,
+ RefLanguageConfiguration configuration) throws Exception {
+ RefLanguage language = new RefLanguage();
+ if (language instanceof CamelContextAware) {
+ ((CamelContextAware) language).setCamelContext(camelContext);
+ }
+ Map<String, Object> parameters = new HashMap<>();
+ IntrospectionSupport.getProperties(configuration, parameters, null,
+ false);
+ IntrospectionSupport.setProperties(camelContext,
+ camelContext.getTypeConverter(), language, parameters);
+ return language;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/53eba311/camel-core/src/main/java/org/apache/camel/language/ref/springboot/RefLanguageConfiguration.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/language/ref/springboot/RefLanguageConfiguration.java b/camel-core/src/main/java/org/apache/camel/language/ref/springboot/RefLanguageConfiguration.java
new file mode 100644
index 0000000..29500c5
--- /dev/null
+++ b/camel-core/src/main/java/org/apache/camel/language/ref/springboot/RefLanguageConfiguration.java
@@ -0,0 +1,42 @@
+/**
+ * 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.ref.springboot;
+
+import org.springframework.boot.context.properties.ConfigurationProperties;
+
+/**
+ * For using a custom expression
+ *
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@ConfigurationProperties(prefix = "camel.language.ref")
+public class RefLanguageConfiguration {
+
+ /**
+ * Whether to trim the value to remove leading and trailing whitespaces and
+ * line breaks
+ */
+ private Boolean trim = true;
+
+ public Boolean getTrim() {
+ return trim;
+ }
+
+ public void setTrim(Boolean trim) {
+ this.trim = trim;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/53eba311/camel-core/src/main/java/org/apache/camel/language/simple/springboot/FileLanguageAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/language/simple/springboot/FileLanguageAutoConfiguration.java b/camel-core/src/main/java/org/apache/camel/language/simple/springboot/FileLanguageAutoConfiguration.java
new file mode 100644
index 0000000..422ea84
--- /dev/null
+++ b/camel-core/src/main/java/org/apache/camel/language/simple/springboot/FileLanguageAutoConfiguration.java
@@ -0,0 +1,54 @@
+/**
+ * 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.springboot;
+
+import java.util.HashMap;
+import java.util.Map;
+import org.apache.camel.CamelContext;
+import org.apache.camel.CamelContextAware;
+import org.apache.camel.language.simple.FileLanguage;
+import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@Configuration
+@EnableConfigurationProperties(FileLanguageConfiguration.class)
+public class FileLanguageAutoConfiguration {
+
+ @Bean(name = "file-language")
+ @ConditionalOnClass(CamelContext.class)
+ @ConditionalOnMissingBean(FileLanguage.class)
+ public FileLanguage configureFileLanguage(CamelContext camelContext,
+ FileLanguageConfiguration configuration) throws Exception {
+ FileLanguage language = new FileLanguage();
+ if (language instanceof CamelContextAware) {
+ ((CamelContextAware) language).setCamelContext(camelContext);
+ }
+ Map<String, Object> parameters = new HashMap<>();
+ IntrospectionSupport.getProperties(configuration, parameters, null,
+ false);
+ IntrospectionSupport.setProperties(camelContext,
+ camelContext.getTypeConverter(), language, parameters);
+ return language;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/53eba311/camel-core/src/main/java/org/apache/camel/language/simple/springboot/FileLanguageConfiguration.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/language/simple/springboot/FileLanguageConfiguration.java b/camel-core/src/main/java/org/apache/camel/language/simple/springboot/FileLanguageConfiguration.java
new file mode 100644
index 0000000..f80a9e4
--- /dev/null
+++ b/camel-core/src/main/java/org/apache/camel/language/simple/springboot/FileLanguageConfiguration.java
@@ -0,0 +1,42 @@
+/**
+ * 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.springboot;
+
+import org.springframework.boot.context.properties.ConfigurationProperties;
+
+/**
+ * For expressions and predicates using the file/simple language
+ *
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@ConfigurationProperties(prefix = "camel.language.file")
+public class FileLanguageConfiguration {
+
+ /**
+ * Whether to trim the value to remove leading and trailing whitespaces and
+ * line breaks
+ */
+ private Boolean trim = true;
+
+ public Boolean getTrim() {
+ return trim;
+ }
+
+ public void setTrim(Boolean trim) {
+ this.trim = trim;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/53eba311/camel-core/src/main/java/org/apache/camel/language/simple/springboot/SimpleLanguageAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/language/simple/springboot/SimpleLanguageAutoConfiguration.java b/camel-core/src/main/java/org/apache/camel/language/simple/springboot/SimpleLanguageAutoConfiguration.java
new file mode 100644
index 0000000..52811ec
--- /dev/null
+++ b/camel-core/src/main/java/org/apache/camel/language/simple/springboot/SimpleLanguageAutoConfiguration.java
@@ -0,0 +1,54 @@
+/**
+ * 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.springboot;
+
+import java.util.HashMap;
+import java.util.Map;
+import org.apache.camel.CamelContext;
+import org.apache.camel.CamelContextAware;
+import org.apache.camel.language.simple.SimpleLanguage;
+import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@Configuration
+@EnableConfigurationProperties(SimpleLanguageConfiguration.class)
+public class SimpleLanguageAutoConfiguration {
+
+ @Bean(name = "simple-language")
+ @ConditionalOnClass(CamelContext.class)
+ @ConditionalOnMissingBean(SimpleLanguage.class)
+ public SimpleLanguage configureSimpleLanguage(CamelContext camelContext,
+ SimpleLanguageConfiguration configuration) throws Exception {
+ SimpleLanguage language = new SimpleLanguage();
+ if (language instanceof CamelContextAware) {
+ ((CamelContextAware) language).setCamelContext(camelContext);
+ }
+ Map<String, Object> parameters = new HashMap<>();
+ IntrospectionSupport.getProperties(configuration, parameters, null,
+ false);
+ IntrospectionSupport.setProperties(camelContext,
+ camelContext.getTypeConverter(), language, parameters);
+ return language;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/53eba311/camel-core/src/main/java/org/apache/camel/language/simple/springboot/SimpleLanguageConfiguration.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/language/simple/springboot/SimpleLanguageConfiguration.java b/camel-core/src/main/java/org/apache/camel/language/simple/springboot/SimpleLanguageConfiguration.java
new file mode 100644
index 0000000..4c1e2e9
--- /dev/null
+++ b/camel-core/src/main/java/org/apache/camel/language/simple/springboot/SimpleLanguageConfiguration.java
@@ -0,0 +1,42 @@
+/**
+ * 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.springboot;
+
+import org.springframework.boot.context.properties.ConfigurationProperties;
+
+/**
+ * For expressions and predicates using the simple language
+ *
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@ConfigurationProperties(prefix = "camel.language.simple")
+public class SimpleLanguageConfiguration {
+
+ /**
+ * Whether to trim the value to remove leading and trailing whitespaces and
+ * line breaks
+ */
+ private Boolean trim = true;
+
+ public Boolean getTrim() {
+ return trim;
+ }
+
+ public void setTrim(Boolean trim) {
+ this.trim = trim;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/53eba311/camel-core/src/main/java/org/apache/camel/language/tokenizer/springboot/TokenizeLanguageAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/language/tokenizer/springboot/TokenizeLanguageAutoConfiguration.java b/camel-core/src/main/java/org/apache/camel/language/tokenizer/springboot/TokenizeLanguageAutoConfiguration.java
new file mode 100644
index 0000000..6a902ac
--- /dev/null
+++ b/camel-core/src/main/java/org/apache/camel/language/tokenizer/springboot/TokenizeLanguageAutoConfiguration.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.tokenizer.springboot;
+
+import java.util.HashMap;
+import java.util.Map;
+import org.apache.camel.CamelContext;
+import org.apache.camel.CamelContextAware;
+import org.apache.camel.language.tokenizer.TokenizeLanguage;
+import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@Configuration
+@EnableConfigurationProperties(TokenizeLanguageConfiguration.class)
+public class TokenizeLanguageAutoConfiguration {
+
+ @Bean(name = "tokenize-language")
+ @ConditionalOnClass(CamelContext.class)
+ @ConditionalOnMissingBean(TokenizeLanguage.class)
+ public TokenizeLanguage configureTokenizeLanguage(
+ CamelContext camelContext,
+ TokenizeLanguageConfiguration configuration) throws Exception {
+ TokenizeLanguage language = new TokenizeLanguage();
+ if (language instanceof CamelContextAware) {
+ ((CamelContextAware) language).setCamelContext(camelContext);
+ }
+ Map<String, Object> parameters = new HashMap<>();
+ IntrospectionSupport.getProperties(configuration, parameters, null,
+ false);
+ IntrospectionSupport.setProperties(camelContext,
+ camelContext.getTypeConverter(), language, parameters);
+ return language;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/53eba311/camel-core/src/main/java/org/apache/camel/language/tokenizer/springboot/TokenizeLanguageConfiguration.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/language/tokenizer/springboot/TokenizeLanguageConfiguration.java b/camel-core/src/main/java/org/apache/camel/language/tokenizer/springboot/TokenizeLanguageConfiguration.java
new file mode 100644
index 0000000..099015a
--- /dev/null
+++ b/camel-core/src/main/java/org/apache/camel/language/tokenizer/springboot/TokenizeLanguageConfiguration.java
@@ -0,0 +1,157 @@
+/**
+ * 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.tokenizer.springboot;
+
+import org.springframework.boot.context.properties.ConfigurationProperties;
+
+/**
+ * For expressions and predicates using a body or header tokenizer.
+ *
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@ConfigurationProperties(prefix = "camel.language.tokenize")
+public class TokenizeLanguageConfiguration {
+
+ /**
+ * The (start) token to use as tokenizer for example \n for a new line
+ * token. You can use simple language as the token to support dynamic
+ * tokens.
+ */
+ private String token;
+ /**
+ * The end token to use as tokenizer if using start/end token pairs. You can
+ * use simple language as the token to support dynamic tokens.
+ */
+ private String endToken;
+ /**
+ * To inherit namespaces from a root/parent tag name when using XML You can
+ * use simple language as the tag name to support dynamic names.
+ */
+ private String inheritNamespaceTagName;
+ /**
+ * Name of header to tokenize instead of using the message body.
+ */
+ private String headerName;
+ /**
+ * If the token is a regular expression pattern. The default value is false
+ */
+ private Boolean regex = false;
+ /**
+ * Whether the input is XML messages. This option must be set to true if
+ * working with XML payloads.
+ */
+ private Boolean xml = false;
+ /**
+ * Whether to include the tokens in the parts when using pairs The default
+ * value is false
+ */
+ private Boolean includeTokens = false;
+ /**
+ * To group N parts together for example to split big files into chunks of
+ * 1000 lines.
+ */
+ private Integer group;
+ /**
+ * To skip the very first element
+ */
+ private Boolean skipFirst = false;
+ /**
+ * Whether to trim the value to remove leading and trailing whitespaces and
+ * line breaks
+ */
+ private Boolean trim = true;
+
+ public String getToken() {
+ return token;
+ }
+
+ public void setToken(String token) {
+ this.token = token;
+ }
+
+ public String getEndToken() {
+ return endToken;
+ }
+
+ public void setEndToken(String endToken) {
+ this.endToken = endToken;
+ }
+
+ public String getInheritNamespaceTagName() {
+ return inheritNamespaceTagName;
+ }
+
+ public void setInheritNamespaceTagName(String inheritNamespaceTagName) {
+ this.inheritNamespaceTagName = inheritNamespaceTagName;
+ }
+
+ public String getHeaderName() {
+ return headerName;
+ }
+
+ public void setHeaderName(String headerName) {
+ this.headerName = headerName;
+ }
+
+ public Boolean getRegex() {
+ return regex;
+ }
+
+ public void setRegex(Boolean regex) {
+ this.regex = regex;
+ }
+
+ public Boolean getXml() {
+ return xml;
+ }
+
+ public void setXml(Boolean xml) {
+ this.xml = xml;
+ }
+
+ public Boolean getIncludeTokens() {
+ return includeTokens;
+ }
+
+ public void setIncludeTokens(Boolean includeTokens) {
+ this.includeTokens = includeTokens;
+ }
+
+ public Integer getGroup() {
+ return group;
+ }
+
+ public void setGroup(Integer group) {
+ this.group = group;
+ }
+
+ public Boolean getSkipFirst() {
+ return skipFirst;
+ }
+
+ public void setSkipFirst(Boolean skipFirst) {
+ this.skipFirst = skipFirst;
+ }
+
+ public Boolean getTrim() {
+ return trim;
+ }
+
+ public void setTrim(Boolean trim) {
+ this.trim = trim;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/53eba311/camel-core/src/main/java/org/apache/camel/language/tokenizer/springboot/XMLTokenizeLanguageAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/language/tokenizer/springboot/XMLTokenizeLanguageAutoConfiguration.java b/camel-core/src/main/java/org/apache/camel/language/tokenizer/springboot/XMLTokenizeLanguageAutoConfiguration.java
new file mode 100644
index 0000000..9d8fd7b
--- /dev/null
+++ b/camel-core/src/main/java/org/apache/camel/language/tokenizer/springboot/XMLTokenizeLanguageAutoConfiguration.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.tokenizer.springboot;
+
+import java.util.HashMap;
+import java.util.Map;
+import org.apache.camel.CamelContext;
+import org.apache.camel.CamelContextAware;
+import org.apache.camel.language.tokenizer.XMLTokenizeLanguage;
+import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@Configuration
+@EnableConfigurationProperties(XMLTokenizeLanguageConfiguration.class)
+public class XMLTokenizeLanguageAutoConfiguration {
+
+ @Bean(name = "xtokenize-language")
+ @ConditionalOnClass(CamelContext.class)
+ @ConditionalOnMissingBean(XMLTokenizeLanguage.class)
+ public XMLTokenizeLanguage configureXMLTokenizeLanguage(
+ CamelContext camelContext,
+ XMLTokenizeLanguageConfiguration configuration) throws Exception {
+ XMLTokenizeLanguage language = new XMLTokenizeLanguage();
+ if (language instanceof CamelContextAware) {
+ ((CamelContextAware) language).setCamelContext(camelContext);
+ }
+ Map<String, Object> parameters = new HashMap<>();
+ IntrospectionSupport.getProperties(configuration, parameters, null,
+ false);
+ IntrospectionSupport.setProperties(camelContext,
+ camelContext.getTypeConverter(), language, parameters);
+ return language;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/53eba311/camel-core/src/main/java/org/apache/camel/language/tokenizer/springboot/XMLTokenizeLanguageConfiguration.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/language/tokenizer/springboot/XMLTokenizeLanguageConfiguration.java b/camel-core/src/main/java/org/apache/camel/language/tokenizer/springboot/XMLTokenizeLanguageConfiguration.java
new file mode 100644
index 0000000..00d591e
--- /dev/null
+++ b/camel-core/src/main/java/org/apache/camel/language/tokenizer/springboot/XMLTokenizeLanguageConfiguration.java
@@ -0,0 +1,82 @@
+/**
+ * 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.tokenizer.springboot;
+
+import org.springframework.boot.context.properties.ConfigurationProperties;
+
+/**
+ * For expressions and predicates using a body or header tokenizer.
+ *
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@ConfigurationProperties(prefix = "camel.language.xtokenize")
+public class XMLTokenizeLanguageConfiguration {
+
+ /**
+ * Name of header to tokenize instead of using the message body.
+ */
+ private String headerName;
+ /**
+ * The extraction mode. The available extraction modes are: i - injecting
+ * the contextual namespace bindings into the extracted token (default) w -
+ * wrapping the extracted token in its ancestor context u - unwrapping the
+ * extracted token to its child content t - extracting the text content of
+ * the specified element
+ */
+ private String mode;
+ /**
+ * To group N parts together
+ */
+ private Integer group;
+ /**
+ * Whether to trim the value to remove leading and trailing whitespaces and
+ * line breaks
+ */
+ private Boolean trim = true;
+
+ public String getHeaderName() {
+ return headerName;
+ }
+
+ public void setHeaderName(String headerName) {
+ this.headerName = headerName;
+ }
+
+ public String getMode() {
+ return mode;
+ }
+
+ public void setMode(String mode) {
+ this.mode = mode;
+ }
+
+ public Integer getGroup() {
+ return group;
+ }
+
+ public void setGroup(Integer group) {
+ this.group = group;
+ }
+
+ public Boolean getTrim() {
+ return trim;
+ }
+
+ public void setTrim(Boolean trim) {
+ this.trim = trim;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/53eba311/camel-core/src/main/java/org/apache/camel/language/xpath/springboot/XPathLanguageAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/language/xpath/springboot/XPathLanguageAutoConfiguration.java b/camel-core/src/main/java/org/apache/camel/language/xpath/springboot/XPathLanguageAutoConfiguration.java
new file mode 100644
index 0000000..2dfd6b8
--- /dev/null
+++ b/camel-core/src/main/java/org/apache/camel/language/xpath/springboot/XPathLanguageAutoConfiguration.java
@@ -0,0 +1,54 @@
+/**
+ * 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.xpath.springboot;
+
+import java.util.HashMap;
+import java.util.Map;
+import org.apache.camel.CamelContext;
+import org.apache.camel.CamelContextAware;
+import org.apache.camel.language.xpath.XPathLanguage;
+import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@Configuration
+@EnableConfigurationProperties(XPathLanguageConfiguration.class)
+public class XPathLanguageAutoConfiguration {
+
+ @Bean(name = "xpath-language")
+ @ConditionalOnClass(CamelContext.class)
+ @ConditionalOnMissingBean(XPathLanguage.class)
+ public XPathLanguage configureXPathLanguage(CamelContext camelContext,
+ XPathLanguageConfiguration configuration) throws Exception {
+ XPathLanguage language = new XPathLanguage();
+ if (language instanceof CamelContextAware) {
+ ((CamelContextAware) language).setCamelContext(camelContext);
+ }
+ Map<String, Object> parameters = new HashMap<>();
+ IntrospectionSupport.getProperties(configuration, parameters, null,
+ false);
+ IntrospectionSupport.setProperties(camelContext,
+ camelContext.getTypeConverter(), language, parameters);
+ return language;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/53eba311/camel-core/src/main/java/org/apache/camel/language/xpath/springboot/XPathLanguageConfiguration.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/language/xpath/springboot/XPathLanguageConfiguration.java b/camel-core/src/main/java/org/apache/camel/language/xpath/springboot/XPathLanguageConfiguration.java
new file mode 100644
index 0000000..ea54a32
--- /dev/null
+++ b/camel-core/src/main/java/org/apache/camel/language/xpath/springboot/XPathLanguageConfiguration.java
@@ -0,0 +1,114 @@
+/**
+ * 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.xpath.springboot;
+
+import org.springframework.boot.context.properties.ConfigurationProperties;
+
+/**
+ * For XPath expressions and predicates
+ *
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@ConfigurationProperties(prefix = "camel.language.xpath")
+public class XPathLanguageConfiguration {
+
+ /**
+ * Name of class for document type The default value is org.w3c.dom.Document
+ */
+ private String documentType;
+ /**
+ * Whether to use Saxon.
+ */
+ private Boolean saxon = false;
+ /**
+ * References to a custom XPathFactory to lookup in the registry
+ */
+ private String factoryRef;
+ /**
+ * The XPath object model to use
+ */
+ private String objectModel;
+ /**
+ * Whether to log namespaces which can assist during trouble shooting
+ */
+ private Boolean logNamespaces = false;
+ /**
+ * Name of header to use as input instead of the message body
+ */
+ private String headerName;
+ /**
+ * Whether to trim the value to remove leading and trailing whitespaces and
+ * line breaks
+ */
+ private Boolean trim = true;
+
+ public String getDocumentType() {
+ return documentType;
+ }
+
+ public void setDocumentType(String documentType) {
+ this.documentType = documentType;
+ }
+
+ public Boolean getSaxon() {
+ return saxon;
+ }
+
+ public void setSaxon(Boolean saxon) {
+ this.saxon = saxon;
+ }
+
+ public String getFactoryRef() {
+ return factoryRef;
+ }
+
+ public void setFactoryRef(String factoryRef) {
+ this.factoryRef = factoryRef;
+ }
+
+ public String getObjectModel() {
+ return objectModel;
+ }
+
+ public void setObjectModel(String objectModel) {
+ this.objectModel = objectModel;
+ }
+
+ public Boolean getLogNamespaces() {
+ return logNamespaces;
+ }
+
+ public void setLogNamespaces(Boolean logNamespaces) {
+ this.logNamespaces = logNamespaces;
+ }
+
+ public String getHeaderName() {
+ return headerName;
+ }
+
+ public void setHeaderName(String headerName) {
+ this.headerName = headerName;
+ }
+
+ public Boolean getTrim() {
+ return trim;
+ }
+
+ public void setTrim(Boolean trim) {
+ this.trim = trim;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/53eba311/camel-core/src/main/resources/META-INF/spring.factories
----------------------------------------------------------------------
diff --git a/camel-core/src/main/resources/META-INF/spring.factories b/camel-core/src/main/resources/META-INF/spring.factories
index c610d4b..61bec9e 100644
--- a/camel-core/src/main/resources/META-INF/spring.factories
+++ b/camel-core/src/main/resources/META-INF/spring.factories
@@ -28,7 +28,27 @@ org.apache.camel.component.xslt.springboot.XsltComponentAutoConfiguration,\
org.apache.camel.impl.springboot.GzipDataFormatAutoConfiguration,\
org.apache.camel.impl.springboot.SerializationDataFormatAutoConfiguration,\
org.apache.camel.impl.springboot.StringDataFormatAutoConfiguration,\
-org.apache.camel.impl.springboot.ZipDataFormatAutoConfiguration
+org.apache.camel.impl.springboot.ZipDataFormatAutoConfiguration,\
+org.apache.camel.language.constant.springboot.ConstantLanguageAutoConfiguration,\
+org.apache.camel.language.simple.springboot.SimpleLanguageAutoConfiguration,\
+org.apache.camel.language.ref.springboot.RefLanguageAutoConfiguration,\
+org.apache.camel.language.bean.springboot.BeanLanguageAutoConfiguration,\
+org.apache.camel.language.header.springboot.HeaderLanguageAutoConfiguration,\
+org.apache.camel.language.xpath.springboot.XPathLanguageAutoConfiguration,\
+org.apache.camel.language.simple.springboot.FileLanguageAutoConfiguration,\
+org.apache.camel.language.property.springboot.ExchangePropertyLanguageAutoConfiguration,\
+org.apache.camel.language.tokenizer.springboot.TokenizeLanguageAutoConfiguration,\
+org.apache.camel.language.tokenizer.springboot.XMLTokenizeLanguageAutoConfiguration
+
+
+
+
+
+
+
+
+
+
http://git-wip-us.apache.org/repos/asf/camel/blob/53eba311/components/camel-groovy/src/main/java/org/apache/camel/language/groovy/springboot/GroovyLanguageAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components/camel-groovy/src/main/java/org/apache/camel/language/groovy/springboot/GroovyLanguageAutoConfiguration.java b/components/camel-groovy/src/main/java/org/apache/camel/language/groovy/springboot/GroovyLanguageAutoConfiguration.java
new file mode 100644
index 0000000..b5efa61
--- /dev/null
+++ b/components/camel-groovy/src/main/java/org/apache/camel/language/groovy/springboot/GroovyLanguageAutoConfiguration.java
@@ -0,0 +1,54 @@
+/**
+ * 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.groovy.springboot;
+
+import java.util.HashMap;
+import java.util.Map;
+import org.apache.camel.CamelContext;
+import org.apache.camel.CamelContextAware;
+import org.apache.camel.language.groovy.GroovyLanguage;
+import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@Configuration
+@EnableConfigurationProperties(GroovyLanguageConfiguration.class)
+public class GroovyLanguageAutoConfiguration {
+
+ @Bean(name = "groovy-language")
+ @ConditionalOnClass(CamelContext.class)
+ @ConditionalOnMissingBean(GroovyLanguage.class)
+ public GroovyLanguage configureGroovyLanguage(CamelContext camelContext,
+ GroovyLanguageConfiguration configuration) throws Exception {
+ GroovyLanguage language = new GroovyLanguage();
+ if (language instanceof CamelContextAware) {
+ ((CamelContextAware) language).setCamelContext(camelContext);
+ }
+ Map<String, Object> parameters = new HashMap<>();
+ IntrospectionSupport.getProperties(configuration, parameters, null,
+ false);
+ IntrospectionSupport.setProperties(camelContext,
+ camelContext.getTypeConverter(), language, parameters);
+ return language;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/53eba311/components/camel-groovy/src/main/java/org/apache/camel/language/groovy/springboot/GroovyLanguageConfiguration.java
----------------------------------------------------------------------
diff --git a/components/camel-groovy/src/main/java/org/apache/camel/language/groovy/springboot/GroovyLanguageConfiguration.java b/components/camel-groovy/src/main/java/org/apache/camel/language/groovy/springboot/GroovyLanguageConfiguration.java
new file mode 100644
index 0000000..8b34501
--- /dev/null
+++ b/components/camel-groovy/src/main/java/org/apache/camel/language/groovy/springboot/GroovyLanguageConfiguration.java
@@ -0,0 +1,42 @@
+/**
+ * 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.groovy.springboot;
+
+import org.springframework.boot.context.properties.ConfigurationProperties;
+
+/**
+ * For Groovy expressions and predicates
+ *
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@ConfigurationProperties(prefix = "camel.language.groovy")
+public class GroovyLanguageConfiguration {
+
+ /**
+ * Whether to trim the value to remove leading and trailing whitespaces and
+ * line breaks
+ */
+ private Boolean trim = true;
+
+ public Boolean getTrim() {
+ return trim;
+ }
+
+ public void setTrim(Boolean trim) {
+ this.trim = trim;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/53eba311/components/camel-groovy/src/main/resources/META-INF/spring.factories
----------------------------------------------------------------------
diff --git a/components/camel-groovy/src/main/resources/META-INF/spring.factories b/components/camel-groovy/src/main/resources/META-INF/spring.factories
new file mode 100644
index 0000000..51aabcc
--- /dev/null
+++ b/components/camel-groovy/src/main/resources/META-INF/spring.factories
@@ -0,0 +1,19 @@
+#
+# 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.
+#
+
+org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
+org.apache.camel.language.groovy.springboot.GroovyLanguageAutoConfiguration
http://git-wip-us.apache.org/repos/asf/camel/blob/53eba311/components/camel-hl7/src/main/java/org/apache/camel/component/hl7/springboot/TerserLanguageAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components/camel-hl7/src/main/java/org/apache/camel/component/hl7/springboot/TerserLanguageAutoConfiguration.java b/components/camel-hl7/src/main/java/org/apache/camel/component/hl7/springboot/TerserLanguageAutoConfiguration.java
new file mode 100644
index 0000000..8a7994f
--- /dev/null
+++ b/components/camel-hl7/src/main/java/org/apache/camel/component/hl7/springboot/TerserLanguageAutoConfiguration.java
@@ -0,0 +1,54 @@
+/**
+ * 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.component.hl7.springboot;
+
+import java.util.HashMap;
+import java.util.Map;
+import org.apache.camel.CamelContext;
+import org.apache.camel.CamelContextAware;
+import org.apache.camel.component.hl7.TerserLanguage;
+import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@Configuration
+@EnableConfigurationProperties(TerserLanguageConfiguration.class)
+public class TerserLanguageAutoConfiguration {
+
+ @Bean(name = "terser-language")
+ @ConditionalOnClass(CamelContext.class)
+ @ConditionalOnMissingBean(TerserLanguage.class)
+ public TerserLanguage configureTerserLanguage(CamelContext camelContext,
+ TerserLanguageConfiguration configuration) throws Exception {
+ TerserLanguage language = new TerserLanguage();
+ if (language instanceof CamelContextAware) {
+ ((CamelContextAware) language).setCamelContext(camelContext);
+ }
+ Map<String, Object> parameters = new HashMap<>();
+ IntrospectionSupport.getProperties(configuration, parameters, null,
+ false);
+ IntrospectionSupport.setProperties(camelContext,
+ camelContext.getTypeConverter(), language, parameters);
+ return language;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/53eba311/components/camel-hl7/src/main/java/org/apache/camel/component/hl7/springboot/TerserLanguageConfiguration.java
----------------------------------------------------------------------
diff --git a/components/camel-hl7/src/main/java/org/apache/camel/component/hl7/springboot/TerserLanguageConfiguration.java b/components/camel-hl7/src/main/java/org/apache/camel/component/hl7/springboot/TerserLanguageConfiguration.java
new file mode 100644
index 0000000..8551aa9
--- /dev/null
+++ b/components/camel-hl7/src/main/java/org/apache/camel/component/hl7/springboot/TerserLanguageConfiguration.java
@@ -0,0 +1,42 @@
+/**
+ * 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.component.hl7.springboot;
+
+import org.springframework.boot.context.properties.ConfigurationProperties;
+
+/**
+ * For HL7 terser expressions and predicates
+ *
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@ConfigurationProperties(prefix = "camel.language.terser")
+public class TerserLanguageConfiguration {
+
+ /**
+ * Whether to trim the value to remove leading and trailing whitespaces and
+ * line breaks
+ */
+ private Boolean trim = true;
+
+ public Boolean getTrim() {
+ return trim;
+ }
+
+ public void setTrim(Boolean trim) {
+ this.trim = trim;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/53eba311/components/camel-hl7/src/main/resources/META-INF/spring.factories
----------------------------------------------------------------------
diff --git a/components/camel-hl7/src/main/resources/META-INF/spring.factories b/components/camel-hl7/src/main/resources/META-INF/spring.factories
index 581cf0e..4904bc2 100644
--- a/components/camel-hl7/src/main/resources/META-INF/spring.factories
+++ b/components/camel-hl7/src/main/resources/META-INF/spring.factories
@@ -16,4 +16,6 @@
#
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
-org.apache.camel.component.hl7.springboot.HL7DataFormatAutoConfiguration
+org.apache.camel.component.hl7.springboot.HL7DataFormatAutoConfiguration,\
+org.apache.camel.component.hl7.springboot.TerserLanguageAutoConfiguration
+
http://git-wip-us.apache.org/repos/asf/camel/blob/53eba311/components/camel-josql/src/main/java/org/apache/camel/language/sql/springboot/SqlLanguageAutoConfiguration.java
----------------------------------------------------------------------
diff --git a/components/camel-josql/src/main/java/org/apache/camel/language/sql/springboot/SqlLanguageAutoConfiguration.java b/components/camel-josql/src/main/java/org/apache/camel/language/sql/springboot/SqlLanguageAutoConfiguration.java
new file mode 100644
index 0000000..0a1a0e9
--- /dev/null
+++ b/components/camel-josql/src/main/java/org/apache/camel/language/sql/springboot/SqlLanguageAutoConfiguration.java
@@ -0,0 +1,54 @@
+/**
+ * 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.sql.springboot;
+
+import java.util.HashMap;
+import java.util.Map;
+import org.apache.camel.CamelContext;
+import org.apache.camel.CamelContextAware;
+import org.apache.camel.language.sql.SqlLanguage;
+import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@Configuration
+@EnableConfigurationProperties(SqlLanguageConfiguration.class)
+public class SqlLanguageAutoConfiguration {
+
+ @Bean(name = "sql-language")
+ @ConditionalOnClass(CamelContext.class)
+ @ConditionalOnMissingBean(SqlLanguage.class)
+ public SqlLanguage configureSqlLanguage(CamelContext camelContext,
+ SqlLanguageConfiguration configuration) throws Exception {
+ SqlLanguage language = new SqlLanguage();
+ if (language instanceof CamelContextAware) {
+ ((CamelContextAware) language).setCamelContext(camelContext);
+ }
+ Map<String, Object> parameters = new HashMap<>();
+ IntrospectionSupport.getProperties(configuration, parameters, null,
+ false);
+ IntrospectionSupport.setProperties(camelContext,
+ camelContext.getTypeConverter(), language, parameters);
+ return language;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/53eba311/components/camel-josql/src/main/java/org/apache/camel/language/sql/springboot/SqlLanguageConfiguration.java
----------------------------------------------------------------------
diff --git a/components/camel-josql/src/main/java/org/apache/camel/language/sql/springboot/SqlLanguageConfiguration.java b/components/camel-josql/src/main/java/org/apache/camel/language/sql/springboot/SqlLanguageConfiguration.java
new file mode 100644
index 0000000..1816393
--- /dev/null
+++ b/components/camel-josql/src/main/java/org/apache/camel/language/sql/springboot/SqlLanguageConfiguration.java
@@ -0,0 +1,42 @@
+/**
+ * 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.sql.springboot;
+
+import org.springframework.boot.context.properties.ConfigurationProperties;
+
+/**
+ * For SQL expressions and predicates
+ *
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@ConfigurationProperties(prefix = "camel.language.sql")
+public class SqlLanguageConfiguration {
+
+ /**
+ * Whether to trim the value to remove leading and trailing whitespaces and
+ * line breaks
+ */
+ private Boolean trim = true;
+
+ public Boolean getTrim() {
+ return trim;
+ }
+
+ public void setTrim(Boolean trim) {
+ this.trim = trim;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/53eba311/components/camel-josql/src/main/resources/META-INF/spring.factories
----------------------------------------------------------------------
diff --git a/components/camel-josql/src/main/resources/META-INF/spring.factories b/components/camel-josql/src/main/resources/META-INF/spring.factories
new file mode 100644
index 0000000..d23f300
--- /dev/null
+++ b/components/camel-josql/src/main/resources/META-INF/spring.factories
@@ -0,0 +1,19 @@
+#
+# 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.
+#
+
+org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
+org.apache.camel.language.sql.springboot.SqlLanguageAutoConfiguration
[4/4] camel git commit: CAMEL-10209: spring boot - Auto configuration
for languages
Posted by da...@apache.org.
CAMEL-10209: spring boot - Auto configuration for languages
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/a7dedd64
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/a7dedd64
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/a7dedd64
Branch: refs/heads/master
Commit: a7dedd648ed74550871c11e273123182ceb9237b
Parents: 077a15d
Author: Claus Ibsen <da...@apache.org>
Authored: Mon Aug 1 08:46:49 2016 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Mon Aug 1 10:16:12 2016 +0200
----------------------------------------------------------------------
.../SpringBootAutoConfigurationMojo.java | 391 ++++++++++++++++++-
.../maven/packaging/model/LanguageModel.java | 148 +++++++
.../packaging/model/LanguageOptionModel.java | 110 ++++++
3 files changed, 648 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/a7dedd64/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/SpringBootAutoConfigurationMojo.java
----------------------------------------------------------------------
diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/SpringBootAutoConfigurationMojo.java b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/SpringBootAutoConfigurationMojo.java
index bea7101..85cd583 100644
--- a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/SpringBootAutoConfigurationMojo.java
+++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/SpringBootAutoConfigurationMojo.java
@@ -35,6 +35,8 @@ import org.apache.camel.maven.packaging.model.ComponentOptionModel;
import org.apache.camel.maven.packaging.model.DataFormatModel;
import org.apache.camel.maven.packaging.model.DataFormatOptionModel;
import org.apache.camel.maven.packaging.model.EndpointOptionModel;
+import org.apache.camel.maven.packaging.model.LanguageModel;
+import org.apache.camel.maven.packaging.model.LanguageOptionModel;
import org.apache.commons.io.FileUtils;
import org.apache.maven.model.Resource;
import org.apache.maven.plugin.AbstractMojo;
@@ -109,6 +111,7 @@ public class SpringBootAutoConfigurationMojo extends AbstractMojo {
public void execute() throws MojoExecutionException, MojoFailureException {
executeComponent();
executeDataFormat();
+ executeLanguage();
}
private void executeComponent() throws MojoExecutionException, MojoFailureException {
@@ -168,7 +171,7 @@ public class SpringBootAutoConfigurationMojo extends AbstractMojo {
// we can reuse the component model filter
PackageHelper.findJsonFiles(buildDir, jsonFiles, new PackageHelper.CamelComponentsModelFilter());
- // create auto configuration for the components
+ // create auto configuration for the data formats
if (!dataFormatNames.isEmpty()) {
getLog().debug("Found " + dataFormatNames.size() + " dataformats");
@@ -210,6 +213,56 @@ public class SpringBootAutoConfigurationMojo extends AbstractMojo {
}
}
+ private void executeLanguage() throws MojoExecutionException, MojoFailureException {
+ // find the language names
+ List<String> languageNames = findLanguageNames();
+
+ final Set<File> jsonFiles = new TreeSet<File>();
+ // we can reuse the component model filter
+ PackageHelper.findJsonFiles(buildDir, jsonFiles, new PackageHelper.CamelComponentsModelFilter());
+
+ // create auto configuration for the languages
+ if (!languageNames.isEmpty()) {
+ getLog().debug("Found " + languageNames.size() + " languages");
+
+ List<LanguageModel> allModels = new LinkedList<>();
+ for (String languageName : languageNames) {
+ String json = loadLanguageJson(jsonFiles, languageName);
+ if (json != null) {
+ LanguageModel model = generateLanguageModel(languageName, json);
+ allModels.add(model);
+ }
+ }
+
+ // Group the models by implementing classes
+ Map<String, List<LanguageModel>> grModels = allModels.stream().collect(Collectors.groupingBy(m -> m.getJavaType()));
+ for (String languageClass : grModels.keySet()) {
+ List<LanguageModel> dfModels = grModels.get(languageClass);
+ LanguageModel model = dfModels.get(0); // They should be equivalent
+ List<String> aliases = dfModels.stream().map(m -> m.getName()).sorted().collect(Collectors.toList());
+
+ // only create source code if the language has options that can be used in auto configuration
+ if (!model.getLanguageOptions().isEmpty()) {
+
+ // use springboot as sub package name so the code is not in normal
+ // package so the Spring Boot JARs can be optional at runtime
+ int pos = model.getJavaType().lastIndexOf(".");
+ String pkg = model.getJavaType().substring(0, pos) + ".springboot";
+
+ String overrideLanguageName = null;
+ if (aliases.size() > 1) {
+ // determine component name when there are multiple ones
+ overrideLanguageName = model.getArtifactId().replace("camel-", "");
+ }
+
+ createLanguageConfigurationSource(pkg, model, overrideLanguageName);
+ createLanguageAutoConfigurationSource(pkg, model, aliases);
+ createLanguageSpringFactorySource(pkg, model);
+ }
+ }
+ }
+ }
+
private void createComponentConfigurationSource(String packageName, ComponentModel model, String overrideComponentName) throws MojoFailureException {
final JavaClassSource javaClass = Roaster.create(JavaClassSource.class);
@@ -396,6 +449,101 @@ public class SpringBootAutoConfigurationMojo extends AbstractMojo {
}
}
+ private void createLanguageConfigurationSource(String packageName, LanguageModel model, String overrideLanguageName) throws MojoFailureException {
+ final JavaClassSource javaClass = Roaster.create(JavaClassSource.class);
+
+ int pos = model.getJavaType().lastIndexOf(".");
+ String name = model.getJavaType().substring(pos + 1);
+ name = name.replace("Language", "LanguageConfiguration");
+ javaClass.setPackage(packageName).setName(name);
+
+ String doc = "Generated by camel-package-maven-plugin - do not edit this file!";
+ if (!Strings.isBlank(model.getDescription())) {
+ doc = model.getDescription() + "\n\n" + doc;
+ }
+ javaClass.getJavaDoc().setFullText(doc);
+
+ String prefix = "camel.language." + (overrideLanguageName != null ? overrideLanguageName : model.getName());
+ // make sure prefix is in lower case
+ prefix = prefix.toLowerCase(Locale.US);
+ javaClass.addAnnotation("org.springframework.boot.context.properties.ConfigurationProperties").setStringValue("prefix", prefix);
+
+ for (LanguageOptionModel option : model.getLanguageOptions()) {
+ // skip option with name id, expression, or resultType in language as we do not need that
+ if ("id".equals(option.getName()) || "expression".equals(option.getName()) || "resultType".equals(option.getName())) {
+ continue;
+ }
+ // remove <?> as generic type as Roaster (Eclipse JDT) cannot use that
+ String type = option.getJavaType();
+ type = type.replaceAll("\\<\\?\\>", "");
+ // use wrapper types for primitive types so a null mean that the option has not been configured
+ if ("boolean".equals(type)) {
+ type = "java.lang.Boolean";
+ } else if ("int".equals(type) || "integer".equals(type)) {
+ type = "java.lang.Integer";
+ } else if ("byte".equals(type)) {
+ type = "java.lang.Byte";
+ } else if ("short".equals(type)) {
+ type = "java.lang.Short";
+ } else if ("double".equals(type)) {
+ type = "java.lang.Double";
+ } else if ("float".equals(type)) {
+ type = "java.lang.Float";
+ }
+
+ PropertySource<JavaClassSource> prop = javaClass.addProperty(type, option.getName());
+ if ("true".equals(option.getDeprecated())) {
+ prop.getField().addAnnotation(Deprecated.class);
+ prop.getAccessor().addAnnotation(Deprecated.class);
+ prop.getMutator().addAnnotation(Deprecated.class);
+ // DeprecatedConfigurationProperty must be on getter when deprecated
+ prop.getAccessor().addAnnotation(DeprecatedConfigurationProperty.class);
+ }
+ if (!Strings.isBlank(option.getDescription())) {
+ prop.getField().getJavaDoc().setFullText(option.getDescription());
+ }
+ if (!Strings.isBlank(option.getDefaultValue())) {
+ if ("java.lang.String".equals(option.getType())) {
+ prop.getField().setStringInitializer(option.getDefaultValue());
+ } else if ("integer".equals(option.getType()) || "boolean".equals(option.getType())) {
+ prop.getField().setLiteralInitializer(option.getDefaultValue());
+ } else if (!Strings.isBlank(option.getEnumValues())) {
+ String enumShortName = type.substring(type.lastIndexOf(".") + 1);
+ prop.getField().setLiteralInitializer(enumShortName + "." + option.getDefaultValue());
+ javaClass.addImport(model.getJavaType());
+ }
+ }
+ }
+
+ sortImports(javaClass);
+
+ String fileName = packageName.replaceAll("\\.", "\\/") + "/" + name + ".java";
+ File target = new File(srcDir, fileName);
+
+ try {
+ InputStream is = getClass().getClassLoader().getResourceAsStream("license-header-java.txt");
+ String header = loadText(is);
+ String code = sourceToString(javaClass);
+ code = header + code;
+ getLog().debug("Source code generated:\n" + code);
+
+ if (target.exists()) {
+ String existing = FileUtils.readFileToString(target);
+ if (!code.equals(existing)) {
+ FileUtils.write(target, code, false);
+ getLog().info("Updated existing file: " + target);
+ } else {
+ getLog().debug("No changes to existing file: " + target);
+ }
+ } else {
+ FileUtils.write(target, code);
+ getLog().info("Created file: " + target);
+ }
+ } catch (Exception e) {
+ throw new MojoFailureException("IOError with file " + target, e);
+ }
+ }
+
private void createComponentAutoConfigurationSource(String packageName, ComponentModel model, List<String> componentAliases) throws MojoFailureException {
final JavaClassSource javaClass = Roaster.create(JavaClassSource.class);
@@ -515,7 +663,83 @@ public class SpringBootAutoConfigurationMojo extends AbstractMojo {
String[] springBeanAliases = dataFormatAliases.stream().map(alias -> alias + "-dataformat").toArray(size -> new String[size]);
method.addAnnotation(Bean.class).setStringArrayValue("name", springBeanAliases);
+ method.addAnnotation(ConditionalOnClass.class).setLiteralValue("value", "CamelContext.class");
+ method.addAnnotation(ConditionalOnMissingBean.class).setLiteralValue("value", model.getShortJavaType() + ".class");
+
+ sortImports(javaClass);
+
+ String fileName = packageName.replaceAll("\\.", "\\/") + "/" + name + ".java";
+ File target = new File(srcDir, fileName);
+
+ try {
+ InputStream is = getClass().getClassLoader().getResourceAsStream("license-header-java.txt");
+ String header = loadText(is);
+ String code = sourceToString(javaClass);
+ code = header + code;
+ getLog().debug("Source code generated:\n" + code);
+
+ if (target.exists()) {
+ String existing = FileUtils.readFileToString(target);
+ if (!code.equals(existing)) {
+ FileUtils.write(target, code, false);
+ getLog().info("Updated existing file: " + target);
+ } else {
+ getLog().debug("No changes to existing file: " + target);
+ }
+ } else {
+ FileUtils.write(target, code);
+ getLog().info("Created file: " + target);
+ }
+ } catch (Exception e) {
+ throw new MojoFailureException("IOError with file " + target, e);
+ }
+ }
+
+ private void createLanguageAutoConfigurationSource(String packageName, LanguageModel model, List<String> languageAliases) throws MojoFailureException {
+ final JavaClassSource javaClass = Roaster.create(JavaClassSource.class);
+
+ int pos = model.getJavaType().lastIndexOf(".");
+ String name = model.getJavaType().substring(pos + 1);
+ name = name.replace("Language", "LanguageAutoConfiguration");
+ javaClass.setPackage(packageName).setName(name);
+
+ String doc = "Generated by camel-package-maven-plugin - do not edit this file!";
+ javaClass.getJavaDoc().setFullText(doc);
+
+ javaClass.addAnnotation(Configuration.class);
+
+ String configurationName = name.replace("LanguageAutoConfiguration", "LanguageConfiguration");
+ AnnotationSource<JavaClassSource> ann = javaClass.addAnnotation(EnableConfigurationProperties.class);
+ ann.setLiteralValue("value", configurationName + ".class");
+
+ // add method for auto configure
+ javaClass.addImport("java.util.HashMap");
+ javaClass.addImport("java.util.Map");
+ javaClass.addImport(model.getJavaType());
+ javaClass.addImport("org.apache.camel.CamelContext");
+ javaClass.addImport("org.apache.camel.CamelContextAware");
+ javaClass.addImport("org.apache.camel.util.IntrospectionSupport");
+
+ String body = createLanguageBody(model.getShortJavaType());
+ String methodName = "configure" + model.getShortJavaType();
+
+ MethodSource<JavaClassSource> method = javaClass.addMethod()
+ .setName(methodName)
+ .setPublic()
+ .setBody(body)
+ .setReturnType(model.getShortJavaType())
+ .addThrows(Exception.class);
+
+ method.addParameter("CamelContext", "camelContext");
+ method.addParameter(configurationName, "configuration");
+
+
+ // Determine all the aliases
+ // adding the '-language' suffix to prevent collision with component names
+ String[] springBeanAliases = languageAliases.stream().map(alias -> alias + "-language").toArray(size -> new String[size]);
+
+ method.addAnnotation(Bean.class).setStringArrayValue("name", springBeanAliases);
method.addAnnotation(ConditionalOnClass.class).setLiteralValue("value", "CamelContext.class");
method.addAnnotation(ConditionalOnMissingBean.class).setLiteralValue("value", model.getShortJavaType() + ".class");
@@ -692,6 +916,78 @@ public class SpringBootAutoConfigurationMojo extends AbstractMojo {
}
}
+ private void createLanguageSpringFactorySource(String packageName, LanguageModel model) throws MojoFailureException {
+ StringBuilder sb = new StringBuilder();
+ sb.append("org.springframework.boot.autoconfigure.EnableAutoConfiguration=\\\n");
+
+ int pos = model.getJavaType().lastIndexOf(".");
+ String name = model.getJavaType().substring(pos + 1);
+ name = name.replace("Language", "LanguageAutoConfiguration");
+ String lineToAdd = packageName + "." + name + "\n";
+ sb.append(lineToAdd);
+
+ String fileName = "META-INF/spring.factories";
+ File target = new File(resourcesDir, fileName);
+
+ if (target.exists()) {
+ try {
+ // is the auto configuration already in the file
+ boolean found = false;
+ List<String> lines = FileUtils.readLines(target);
+ for (String line : lines) {
+ if (line.contains(name)) {
+ found = true;
+ break;
+ }
+ }
+
+ if (found) {
+ getLog().debug("No changes to existing file: " + target);
+ } else {
+ // find last non empty line, so we can add our new line after that
+ int lastLine = 0;
+ for (int i = lines.size() - 1; i >= 0; i--) {
+ String line = lines.get(i);
+ if (!line.trim().isEmpty()) {
+ // adjust existing line so its being continued
+ line = line + ",\\";
+ lines.set(i, line);
+ lastLine = i;
+ break;
+ }
+ }
+ lines.add(lastLine + 1, lineToAdd);
+
+ StringBuilder code = new StringBuilder();
+ for (String line : lines) {
+ code.append(line).append("\n");
+ }
+
+ // update
+ FileUtils.write(target, code.toString(), false);
+ getLog().info("Updated existing file: " + target);
+ }
+ } catch (Exception e) {
+ throw new MojoFailureException("IOError with file " + target, e);
+ }
+ } else {
+ // create new file
+ try {
+ InputStream is = getClass().getClassLoader().getResourceAsStream("license-header.txt");
+ String header = loadText(is);
+ String code = sb.toString();
+ // add empty new line after header
+ code = header + "\n" + code;
+ getLog().debug("Source code generated:\n" + code);
+
+ FileUtils.write(target, code);
+ getLog().info("Created file: " + target);
+ } catch (Exception e) {
+ throw new MojoFailureException("IOError with file " + target, e);
+ }
+ }
+ }
+
private static String createComponentBody(String shortJavaType) {
StringBuilder sb = new StringBuilder();
sb.append(shortJavaType).append(" component = new ").append(shortJavaType).append("();").append("\n");
@@ -722,6 +1018,22 @@ public class SpringBootAutoConfigurationMojo extends AbstractMojo {
return sb.toString();
}
+ private static String createLanguageBody(String shortJavaType) {
+ StringBuilder sb = new StringBuilder();
+ sb.append(shortJavaType).append(" language = new ").append(shortJavaType).append("();").append("\n");
+ sb.append("if (language instanceof CamelContextAware) {\n");
+ sb.append(" ((CamelContextAware) language).setCamelContext(camelContext);\n");
+ sb.append("}\n");
+ sb.append("\n");
+ sb.append("Map<String, Object> parameters = new HashMap<>();\n");
+ sb.append("IntrospectionSupport.getProperties(configuration, parameters, null, false);\n");
+ sb.append("\n");
+ sb.append("IntrospectionSupport.setProperties(camelContext, camelContext.getTypeConverter(), language, parameters);\n");
+ sb.append("\n");
+ sb.append("return language;");
+ return sb.toString();
+ }
+
private static void sortImports(JavaClassSource javaClass) {
// sort imports
List<Import> imports = javaClass.getImports();
@@ -808,6 +1120,23 @@ public class SpringBootAutoConfigurationMojo extends AbstractMojo {
return null;
}
+ private static String loadLanguageJson(Set<File> jsonFiles, String languageName) {
+ try {
+ for (File file : jsonFiles) {
+ if (file.getName().equals(languageName + ".json")) {
+ String json = loadText(new FileInputStream(file));
+ boolean isLanguage = json.contains("\"kind\": \"language\"");
+ if (isLanguage) {
+ return json;
+ }
+ }
+ }
+ } catch (IOException e) {
+ // ignore
+ }
+ return null;
+ }
+
private static ComponentModel generateComponentModel(String componentName, String json) {
List<Map<String, String>> rows = JSonSchemaHelper.parseJsonSchema("component", json, false);
@@ -894,6 +1223,38 @@ public class SpringBootAutoConfigurationMojo extends AbstractMojo {
return dataFormat;
}
+ private static LanguageModel generateLanguageModel(String languageName, String json) {
+ List<Map<String, String>> rows = JSonSchemaHelper.parseJsonSchema("language", json, false);
+
+ LanguageModel dataFormat = new LanguageModel();
+ dataFormat.setTitle(getSafeValue("title", rows));
+ dataFormat.setName(getSafeValue("name", rows));
+ dataFormat.setModelName(getSafeValue("modelName", rows));
+ dataFormat.setDescription(getSafeValue("description", rows));
+ dataFormat.setLabel(getSafeValue("label", rows));
+ dataFormat.setDeprecated(getSafeValue("deprecated", rows));
+ dataFormat.setJavaType(getSafeValue("javaType", rows));
+ dataFormat.setGroupId(getSafeValue("groupId", rows));
+ dataFormat.setArtifactId(getSafeValue("artifactId", rows));
+ dataFormat.setVersion(getSafeValue("version", rows));
+
+ rows = JSonSchemaHelper.parseJsonSchema("properties", json, true);
+ for (Map<String, String> row : rows) {
+ LanguageOptionModel option = new LanguageOptionModel();
+ option.setName(getSafeValue("name", row));
+ option.setKind(getSafeValue("kind", row));
+ option.setType(getSafeValue("type", row));
+ option.setJavaType(getSafeValue("javaType", row));
+ option.setDeprecated(getSafeValue("deprecated", row));
+ option.setDescription(getSafeValue("description", row));
+ option.setDefaultValue(getSafeValue("defaultValue", row));
+ option.setEnumValues(getSafeValue("enum", row));
+ dataFormat.addLanguageOption(option);
+ }
+
+ return dataFormat;
+ }
+
private List<String> findComponentNames() {
List<String> componentNames = new ArrayList<String>();
for (Resource r : project.getBuild().getResources()) {
@@ -950,4 +1311,32 @@ public class SpringBootAutoConfigurationMojo extends AbstractMojo {
return dataFormatNames;
}
+ private List<String> findLanguageNames() {
+ List<String> languageNames = new ArrayList<String>();
+ for (Resource r : project.getBuild().getResources()) {
+ File f = new File(r.getDirectory());
+ if (!f.exists()) {
+ f = new File(project.getBasedir(), r.getDirectory());
+ }
+ f = new File(f, "META-INF/services/org/apache/camel/language");
+
+ if (f.exists() && f.isDirectory()) {
+ File[] files = f.listFiles();
+ if (files != null) {
+ for (File file : files) {
+ // skip directories as there may be a sub .resolver directory
+ if (file.isDirectory()) {
+ continue;
+ }
+ String name = file.getName();
+ if (name.charAt(0) != '.') {
+ languageNames.add(name);
+ }
+ }
+ }
+ }
+ }
+ return languageNames;
+ }
+
}
http://git-wip-us.apache.org/repos/asf/camel/blob/a7dedd64/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/model/LanguageModel.java
----------------------------------------------------------------------
diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/model/LanguageModel.java b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/model/LanguageModel.java
new file mode 100644
index 0000000..851e5f4
--- /dev/null
+++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/model/LanguageModel.java
@@ -0,0 +1,148 @@
+/**
+ * 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.maven.packaging.model;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class LanguageModel {
+
+ private String kind;
+ private String name;
+ private String modelName;
+ private String title;
+ private String description;
+ private String label;
+ private String deprecated;
+ private String javaType;
+ private String groupId;
+ private String artifactId;
+ private String version;
+ private final List<LanguageOptionModel> languageOptions = new ArrayList<LanguageOptionModel>();
+
+ public String getKind() {
+ return kind;
+ }
+
+ public void setKind(String kind) {
+ this.kind = kind;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getModelName() {
+ return modelName;
+ }
+
+ public void setModelName(String modelName) {
+ this.modelName = modelName;
+ }
+
+ public String getTitle() {
+ return title;
+ }
+
+ public void setTitle(String title) {
+ this.title = title;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public String getLabel() {
+ return label;
+ }
+
+ public void setLabel(String label) {
+ this.label = label;
+ }
+
+ public String getDeprecated() {
+ return deprecated;
+ }
+
+ public void setDeprecated(String deprecated) {
+ this.deprecated = deprecated;
+ }
+
+ public String getJavaType() {
+ return javaType;
+ }
+
+ public void setJavaType(String javaType) {
+ this.javaType = javaType;
+ }
+
+ public String getGroupId() {
+ return groupId;
+ }
+
+ public void setGroupId(String groupId) {
+ this.groupId = groupId;
+ }
+
+ public String getArtifactId() {
+ return artifactId;
+ }
+
+ public void setArtifactId(String artifactId) {
+ this.artifactId = artifactId;
+ }
+
+ public String getVersion() {
+ return version;
+ }
+
+ public void setVersion(String version) {
+ this.version = version;
+ }
+
+ public List<LanguageOptionModel> getLanguageOptions() {
+ return languageOptions;
+ }
+
+ public void addLanguageOption(LanguageOptionModel option) {
+ languageOptions.add(option);
+ }
+
+ public String getShortJavaType() {
+ if (javaType.startsWith("java.util.Map")) {
+ return "Map";
+ } else if (javaType.startsWith("java.util.Set")) {
+ return "Set";
+ } else if (javaType.startsWith("java.util.List")) {
+ return "List";
+ }
+ int pos = javaType.lastIndexOf(".");
+ if (pos != -1) {
+ return javaType.substring(pos + 1);
+ } else {
+ return javaType;
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/camel/blob/a7dedd64/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/model/LanguageOptionModel.java
----------------------------------------------------------------------
diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/model/LanguageOptionModel.java b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/model/LanguageOptionModel.java
new file mode 100644
index 0000000..90e1a81
--- /dev/null
+++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/model/LanguageOptionModel.java
@@ -0,0 +1,110 @@
+/**
+ * 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.maven.packaging.model;
+
+public class LanguageOptionModel {
+
+ private String name;
+ private String kind;
+ private String type;
+ private String javaType;
+ private String deprecated;
+ private String description;
+ private String defaultValue;
+ private String enumValues;
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getKind() {
+ return kind;
+ }
+
+ public void setKind(String kind) {
+ this.kind = kind;
+ }
+
+ public String getType() {
+ return type;
+ }
+
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ public String getJavaType() {
+ return javaType;
+ }
+
+ public void setJavaType(String javaType) {
+ this.javaType = javaType;
+ }
+
+ public String getDeprecated() {
+ return deprecated;
+ }
+
+ public void setDeprecated(String deprecated) {
+ this.deprecated = deprecated;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public String getDefaultValue() {
+ return defaultValue;
+ }
+
+ public void setDefaultValue(String defaultValue) {
+ this.defaultValue = defaultValue;
+ }
+
+ public String getEnumValues() {
+ return enumValues;
+ }
+
+ public void setEnumValues(String enumValues) {
+ this.enumValues = enumValues;
+ }
+
+ public String getShortJavaType() {
+ if (javaType.startsWith("java.util.Map")) {
+ return "Map";
+ } else if (javaType.startsWith("java.util.Set")) {
+ return "Set";
+ } else if (javaType.startsWith("java.util.List")) {
+ return "List";
+ }
+ int pos = javaType.lastIndexOf(".");
+ if (pos != -1) {
+ return javaType.substring(pos + 1);
+ } else {
+ return javaType;
+ }
+ }
+
+}