camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r926975 - /camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ExpressionBuilder.java
Date Wed, 24 Mar 2010 08:27:09 GMT
Author: davsclaus
Date: Wed Mar 24 08:27:08 2010
New Revision: 926975

URL: http://svn.apache.org/viewvc?rev=926975&view=rev
Log:
CAMEL-2570: Added exchangeId to simple language

Modified:
    camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ExpressionBuilder.java

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ExpressionBuilder.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ExpressionBuilder.java?rev=926975&r1=926974&r2=926975&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ExpressionBuilder.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ExpressionBuilder.java Wed
Mar 24 08:27:08 2010
@@ -992,6 +992,22 @@ public final class ExpressionBuilder {
         };
     }
 
+    /**
+     * Returns an Expression for the exchange id
+     */
+    public static Expression exchangeIdExpression() {
+        return new ExpressionAdapter() {
+            public Object evaluate(Exchange exchange) {
+                return exchange.getExchangeId();
+            }
+
+            @Override
+            public String toString() {
+                return "exchangeId";
+            }
+        };
+    }
+
     public static Expression dateExpression(final String command, final String pattern) {
         return new ExpressionAdapter() {
             public Object evaluate(Exchange exchange) {



Mime
View raw message