camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [camel] branch master updated: camel3 - modularize a bit
Date Thu, 02 May 2019 10:54:46 GMT
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/master by this push:
     new 200364e  camel3 - modularize a bit
200364e is described below

commit 200364e6c0ec5c44c7d86838c74a2cd08a211b24
Author: Claus Ibsen <claus.ibsen@gmail.com>
AuthorDate: Thu May 2 12:47:57 2019 +0200

    camel3 - modularize a bit
---
 .../org/apache/camel/builder/TokenXMLExpressionIterator.java   | 10 +++++-----
 .../org/apache/camel/language/constant/ConstantLanguage.java   |  2 +-
 .../java/org/apache/camel/language/header/HeaderLanguage.java  |  2 +-
 .../camel/language/property/ExchangePropertyLanguage.java      |  2 +-
 .../main/java/org/apache/camel/language/ref/RefLanguage.java   |  2 +-
 .../apache/camel/language/simple/SimpleExpressionBuilder.java  |  2 +-
 .../apache/camel/language/simple/SimpleExpressionParser.java   |  2 +-
 .../apache/camel/language/simple/SimplePredicateParser.java    |  2 +-
 .../org/apache/camel/language/simple/ast/BinaryExpression.java |  4 ++--
 .../camel/language/simple/ast/SimpleFunctionExpression.java    |  2 +-
 10 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/core/camel-core/src/main/java/org/apache/camel/builder/TokenXMLExpressionIterator.java
b/core/camel-core/src/main/java/org/apache/camel/builder/TokenXMLExpressionIterator.java
index 27d904c..60471c7 100644
--- a/core/camel-core/src/main/java/org/apache/camel/builder/TokenXMLExpressionIterator.java
+++ b/core/camel-core/src/main/java/org/apache/camel/builder/TokenXMLExpressionIterator.java
@@ -32,9 +32,9 @@ import java.util.regex.Pattern;
 
 import org.apache.camel.Exchange;
 import org.apache.camel.InvalidPayloadException;
-import org.apache.camel.language.simple.SimpleLanguage;
 import org.apache.camel.support.ExchangeHelper;
 import org.apache.camel.support.ExpressionAdapter;
+import org.apache.camel.support.LanguageSupport;
 import org.apache.camel.util.IOHelper;
 import org.apache.camel.util.ObjectHelper;
 import org.apache.camel.util.StringHelper;
@@ -70,12 +70,12 @@ public class TokenXMLExpressionIterator extends ExpressionAdapter {
 
     protected Iterator<?> createIterator(Exchange exchange, InputStream in, String
charset) {
         String tag = tagToken;
-        if (SimpleLanguage.hasSimpleFunction(tag)) {
-            tag = SimpleLanguage.expression(tag).evaluate(exchange, String.class);
+        if (LanguageSupport.hasSimpleFunction(tag)) {
+            tag = exchange.getContext().resolveLanguage("simple").createExpression(tag).evaluate(exchange,
String.class);
         }
         String inherit = inheritNamespaceToken;
-        if (inherit != null && SimpleLanguage.hasSimpleFunction(inherit)) {
-            inherit = SimpleLanguage.expression(inherit).evaluate(exchange, String.class);
+        if (inherit != null && LanguageSupport.hasSimpleFunction(tag)) {
+            inherit = exchange.getContext().resolveLanguage("simple").createExpression(inherit).evaluate(exchange,
String.class);
         }
 
         // must be XML tokens
diff --git a/core/camel-core/src/main/java/org/apache/camel/language/constant/ConstantLanguage.java
b/core/camel-core/src/main/java/org/apache/camel/language/constant/ConstantLanguage.java
index 60fda16..465d9ce 100644
--- a/core/camel-core/src/main/java/org/apache/camel/language/constant/ConstantLanguage.java
+++ b/core/camel-core/src/main/java/org/apache/camel/language/constant/ConstantLanguage.java
@@ -19,9 +19,9 @@ package org.apache.camel.language.constant;
 import org.apache.camel.Expression;
 import org.apache.camel.IsSingleton;
 import org.apache.camel.Predicate;
-import org.apache.camel.builder.ExpressionBuilder;
 import org.apache.camel.spi.Language;
 import org.apache.camel.support.ExpressionToPredicateAdapter;
+import org.apache.camel.support.builder.ExpressionBuilder;
 
 /**
  * A language for constant expressions.
diff --git a/core/camel-core/src/main/java/org/apache/camel/language/header/HeaderLanguage.java
b/core/camel-core/src/main/java/org/apache/camel/language/header/HeaderLanguage.java
index 99ed748..cc8d430 100644
--- a/core/camel-core/src/main/java/org/apache/camel/language/header/HeaderLanguage.java
+++ b/core/camel-core/src/main/java/org/apache/camel/language/header/HeaderLanguage.java
@@ -19,9 +19,9 @@ package org.apache.camel.language.header;
 import org.apache.camel.Expression;
 import org.apache.camel.IsSingleton;
 import org.apache.camel.Predicate;
-import org.apache.camel.builder.ExpressionBuilder;
 import org.apache.camel.spi.Language;
 import org.apache.camel.support.ExpressionToPredicateAdapter;
+import org.apache.camel.support.builder.ExpressionBuilder;
 
 /**
  * A language for header expressions.
diff --git a/core/camel-core/src/main/java/org/apache/camel/language/property/ExchangePropertyLanguage.java
b/core/camel-core/src/main/java/org/apache/camel/language/property/ExchangePropertyLanguage.java
index d6f8992..ed12b57 100644
--- a/core/camel-core/src/main/java/org/apache/camel/language/property/ExchangePropertyLanguage.java
+++ b/core/camel-core/src/main/java/org/apache/camel/language/property/ExchangePropertyLanguage.java
@@ -19,9 +19,9 @@ package org.apache.camel.language.property;
 import org.apache.camel.Expression;
 import org.apache.camel.IsSingleton;
 import org.apache.camel.Predicate;
-import org.apache.camel.builder.ExpressionBuilder;
 import org.apache.camel.spi.Language;
 import org.apache.camel.support.ExpressionToPredicateAdapter;
+import org.apache.camel.support.builder.ExpressionBuilder;
 
 /**
  * A language for exchange property expressions.
diff --git a/core/camel-core/src/main/java/org/apache/camel/language/ref/RefLanguage.java
b/core/camel-core/src/main/java/org/apache/camel/language/ref/RefLanguage.java
index bd1d8cd..78b3c8b 100644
--- a/core/camel-core/src/main/java/org/apache/camel/language/ref/RefLanguage.java
+++ b/core/camel-core/src/main/java/org/apache/camel/language/ref/RefLanguage.java
@@ -20,11 +20,11 @@ import org.apache.camel.Exchange;
 import org.apache.camel.Expression;
 import org.apache.camel.IsSingleton;
 import org.apache.camel.Predicate;
-import org.apache.camel.builder.ExpressionBuilder;
 import org.apache.camel.spi.Language;
 import org.apache.camel.support.ExpressionAdapter;
 import org.apache.camel.support.ExpressionToPredicateAdapter;
 import org.apache.camel.support.PredicateToExpressionAdapter;
+import org.apache.camel.support.builder.ExpressionBuilder;
 
 /**
  * A language for referred expressions or predicates.
diff --git a/core/camel-core/src/main/java/org/apache/camel/language/simple/SimpleExpressionBuilder.java
b/core/camel-core/src/main/java/org/apache/camel/language/simple/SimpleExpressionBuilder.java
index ca80e5e..5be7afd 100644
--- a/core/camel-core/src/main/java/org/apache/camel/language/simple/SimpleExpressionBuilder.java
+++ b/core/camel-core/src/main/java/org/apache/camel/language/simple/SimpleExpressionBuilder.java
@@ -35,12 +35,12 @@ import org.apache.camel.Expression;
 import org.apache.camel.InvalidPayloadException;
 import org.apache.camel.NoTypeConversionAvailableException;
 import org.apache.camel.RuntimeCamelException;
-import org.apache.camel.builder.ExpressionBuilder;
 import org.apache.camel.model.language.MethodCallExpression;
 import org.apache.camel.spi.ExchangeFormatter;
 import org.apache.camel.support.CamelContextHelper;
 import org.apache.camel.support.ExpressionAdapter;
 import org.apache.camel.support.MessageHelper;
+import org.apache.camel.support.builder.ExpressionBuilder;
 import org.apache.camel.support.processor.DefaultExchangeFormatter;
 import org.apache.camel.util.FileUtil;
 import org.apache.camel.util.ObjectHelper;
diff --git a/core/camel-core/src/main/java/org/apache/camel/language/simple/SimpleExpressionParser.java
b/core/camel-core/src/main/java/org/apache/camel/language/simple/SimpleExpressionParser.java
index 12c1170..7b50084 100644
--- a/core/camel-core/src/main/java/org/apache/camel/language/simple/SimpleExpressionParser.java
+++ b/core/camel-core/src/main/java/org/apache/camel/language/simple/SimpleExpressionParser.java
@@ -22,7 +22,6 @@ import java.util.Map;
 import java.util.concurrent.atomic.AtomicInteger;
 
 import org.apache.camel.Expression;
-import org.apache.camel.builder.ExpressionBuilder;
 import org.apache.camel.language.simple.ast.LiteralExpression;
 import org.apache.camel.language.simple.ast.LiteralNode;
 import org.apache.camel.language.simple.ast.SimpleFunctionEnd;
@@ -33,6 +32,7 @@ import org.apache.camel.language.simple.types.SimpleIllegalSyntaxException;
 import org.apache.camel.language.simple.types.SimpleParserException;
 import org.apache.camel.language.simple.types.SimpleToken;
 import org.apache.camel.language.simple.types.TokenType;
+import org.apache.camel.support.builder.ExpressionBuilder;
 
 /**
  * A parser to parse simple language as a Camel {@link Expression}
diff --git a/core/camel-core/src/main/java/org/apache/camel/language/simple/SimplePredicateParser.java
b/core/camel-core/src/main/java/org/apache/camel/language/simple/SimplePredicateParser.java
index 24780d2..ee4400b 100644
--- a/core/camel-core/src/main/java/org/apache/camel/language/simple/SimplePredicateParser.java
+++ b/core/camel-core/src/main/java/org/apache/camel/language/simple/SimplePredicateParser.java
@@ -27,7 +27,6 @@ import java.util.concurrent.atomic.AtomicBoolean;
 
 import org.apache.camel.Expression;
 import org.apache.camel.Predicate;
-import org.apache.camel.builder.PredicateBuilder;
 import org.apache.camel.language.simple.ast.BinaryExpression;
 import org.apache.camel.language.simple.ast.DoubleQuoteEnd;
 import org.apache.camel.language.simple.ast.DoubleQuoteStart;
@@ -48,6 +47,7 @@ import org.apache.camel.language.simple.types.SimpleParserException;
 import org.apache.camel.language.simple.types.SimpleToken;
 import org.apache.camel.language.simple.types.TokenType;
 import org.apache.camel.support.ExpressionToPredicateAdapter;
+import org.apache.camel.support.builder.PredicateBuilder;
 
 /**
  * A parser to parse simple language as a Camel {@link Predicate}
diff --git a/core/camel-core/src/main/java/org/apache/camel/language/simple/ast/BinaryExpression.java
b/core/camel-core/src/main/java/org/apache/camel/language/simple/ast/BinaryExpression.java
index 87753c7..22ac34b 100644
--- a/core/camel-core/src/main/java/org/apache/camel/language/simple/ast/BinaryExpression.java
+++ b/core/camel-core/src/main/java/org/apache/camel/language/simple/ast/BinaryExpression.java
@@ -25,14 +25,14 @@ import java.util.regex.Pattern;
 import org.apache.camel.Exchange;
 import org.apache.camel.Expression;
 import org.apache.camel.Predicate;
-import org.apache.camel.builder.ExpressionBuilder;
-import org.apache.camel.builder.PredicateBuilder;
 import org.apache.camel.builder.ValueBuilder;
 import org.apache.camel.language.simple.types.BinaryOperatorType;
 import org.apache.camel.language.simple.types.SimpleIllegalSyntaxException;
 import org.apache.camel.language.simple.types.SimpleParserException;
 import org.apache.camel.language.simple.types.SimpleToken;
 import org.apache.camel.support.ObjectHelper;
+import org.apache.camel.support.builder.ExpressionBuilder;
+import org.apache.camel.support.builder.PredicateBuilder;
 
 /**
  * Represents a binary expression in the AST.
diff --git a/core/camel-core/src/main/java/org/apache/camel/language/simple/ast/SimpleFunctionExpression.java
b/core/camel-core/src/main/java/org/apache/camel/language/simple/ast/SimpleFunctionExpression.java
index 4337273..96c6bbc 100644
--- a/core/camel-core/src/main/java/org/apache/camel/language/simple/ast/SimpleFunctionExpression.java
+++ b/core/camel-core/src/main/java/org/apache/camel/language/simple/ast/SimpleFunctionExpression.java
@@ -19,10 +19,10 @@ package org.apache.camel.language.simple.ast;
 import java.util.Map;
 
 import org.apache.camel.Expression;
-import org.apache.camel.builder.ExpressionBuilder;
 import org.apache.camel.language.simple.SimpleExpressionBuilder;
 import org.apache.camel.language.simple.types.SimpleParserException;
 import org.apache.camel.language.simple.types.SimpleToken;
+import org.apache.camel.support.builder.ExpressionBuilder;
 import org.apache.camel.util.ObjectHelper;
 import org.apache.camel.util.OgnlHelper;
 import org.apache.camel.util.StringHelper;


Mime
View raw message