View Javadoc

1   /*
2    * $Id: GroovyExpressionEvaluator.java 11433 2008-03-20 03:43:57Z dirk.olmes $
3    * --------------------------------------------------------------------------------------
4    * Copyright (c) MuleSource, Inc.  All rights reserved.  http://www.mulesource.com
5    *
6    * The software in this package is published under the terms of the CPAL v1.0
7    * license, a copy of which has been included with this distribution in the
8    * LICENSE.txt file.
9    */
10  package org.mule.module.scripting.expression;
11  
12  import org.mule.api.MuleMessage;
13  
14  /**
15   * An {@link org.mule.util.expression.ExpressionEvaluator} that allows the user to define Groovy expressions to extract
16   * data from the current message.
17   *
18   * If a POJO is passed in it is accessible from the 'payload' namespace.  If a {@link MuleMessage} instance is used then
19   * it is accessible from the message' namespace and the 'payload' namespace is also available.
20   */
21  public class GroovyExpressionEvaluator extends AbstractScriptExpressionEvaluator
22  {
23      public static final String NAME = "groovy";
24  
25      /**
26       * Gets the name of the object
27       *
28       * @return the name of the object
29       */
30      public String getName()
31      {
32          return NAME;
33      }
34  }