svn commit: r697587 - in /activemq/camel/trunk/camel-core/src/main: java/org/apache/camel/builder/ExpressionClause.java java/org/apache/camel/model/language/BeanShellExpression.java resources/org/apache/camel/model/language/jaxb.index

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r697587 - in /activemq/camel/trunk/camel-core/src/main: java/org/apache/camel/builder/ExpressionClause.java java/org/apache/camel/model/language/BeanShellExpression.java resources/org/apache/camel/model/language/jaxb.index

davsclaus-2
Author: davsclaus
Date: Sun Sep 21 12:09:10 2008
New Revision: 697587

URL: http://svn.apache.org/viewvc?rev=697587&view=rev
Log:
CAMEL-926: Added beanShell as expression so we can use it just as all the other languages.

Added:
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/language/BeanShellExpression.java   (contents, props changed)
      - copied, changed from r697183, activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/language/PythonExpression.java
Modified:
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ExpressionClause.java
    activemq/camel/trunk/camel-core/src/main/resources/org/apache/camel/model/language/jaxb.index

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ExpressionClause.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ExpressionClause.java?rev=697587&r1=697586&r2=697587&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ExpressionClause.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/ExpressionClause.java Sun Sep 21 12:09:10 2008
@@ -189,6 +189,16 @@
     }
 
     /**
+     * Evaluates a <a href="http://activemq.apache.org/camel/beanshell.html">BeanShell expression</a>
+     *
+     * @param text the expression to be evaluated
+     * @return the builder to continue processing the DSL
+     */
+    public T beanShell(String text) {
+        return language("beanshell", text);
+    }
+
+    /**
      * Evaluates the  <a href="http://activemq.apache.org/camel/el.html">EL Language from JSP and JSF</a>
      * using the <a href="http://activemq.apache.org/camel/juel.html">JUEL library</a>
      *

Copied: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/language/BeanShellExpression.java (from r697183, activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/language/PythonExpression.java)
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/language/BeanShellExpression.java?p2=activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/language/BeanShellExpression.java&p1=activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/language/PythonExpression.java&r1=697183&r2=697587&rev=697587&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/language/PythonExpression.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/language/BeanShellExpression.java Sun Sep 21 12:09:10 2008
@@ -19,20 +19,20 @@
 import javax.xml.bind.annotation.XmlRootElement;
 
 /**
- * For Python expressions and predicates
+ * For BeanShell expressions and predicates
  *
  * @version $Revision$
  */
-@XmlRootElement(name = "python")
-public class PythonExpression extends ExpressionType {
-    public PythonExpression() {
+@XmlRootElement(name = "beanshell")
+public class BeanShellExpression extends ExpressionType {
+    public BeanShellExpression() {
     }
 
-    public PythonExpression(String expression) {
+    public BeanShellExpression(String expression) {
         super(expression);
     }
 
     public String getLanguage() {
-        return "python";
+        return "beanshell";
     }
-}
+}
\ No newline at end of file

Propchange: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/language/BeanShellExpression.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/language/BeanShellExpression.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/language/BeanShellExpression.java
------------------------------------------------------------------------------
    svn:mergeinfo =

Modified: activemq/camel/trunk/camel-core/src/main/resources/org/apache/camel/model/language/jaxb.index
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/resources/org/apache/camel/model/language/jaxb.index?rev=697587&r1=697586&r2=697587&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/resources/org/apache/camel/model/language/jaxb.index (original)
+++ activemq/camel/trunk/camel-core/src/main/resources/org/apache/camel/model/language/jaxb.index Sun Sep 21 12:09:10 2008
@@ -14,6 +14,7 @@
 ## See the License for the specific language governing permissions and
 ## limitations under the License.
 ## ------------------------------------------------------------------------
+BeanShellExpression
 ConstantExpression
 ELExpression
 ExpressionType