org.apache.cocoon.forms.expression
Class DefaultExpressionManager

java.lang.Object
  extended byorg.apache.cocoon.forms.expression.DefaultExpressionManager
All Implemented Interfaces:
ExpressionManager

public class DefaultExpressionManager
extends Object
implements ExpressionManager

Implementation of the ExpressionManager role. Custom functions can be added using configuration elements:

   <function name="MyFunction" class="net.foo.MyFunction"/>
 

Version:
$Id: DefaultExpressionManager.html 1304280 2012-03-23 11:18:01Z ilgrosso $

Field Summary
 
Fields inherited from interface org.apache.cocoon.forms.expression.ExpressionManager
ROLE
 
Constructor Summary
DefaultExpressionManager()
           
 
Method Summary
 org.outerj.expression.Expression parse(String expressionString)
          Parse the given expression.
 List parseVariables(String expressionString)
          Parse the given expression to extract variables.
 void setFunctions(Map functions)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultExpressionManager

public DefaultExpressionManager()
Method Detail

parse

public org.outerj.expression.Expression parse(String expressionString)
                                       throws org.outerj.expression.ParseException,
                                              org.outerj.expression.ExpressionException
Description copied from interface: ExpressionManager
Parse the given expression.

Specified by:
parse in interface ExpressionManager
Parameters:
expressionString - The string containing the expression to parse.
Returns:
The Expression object resulting from parse.
Throws:
org.outerj.expression.ExpressionException - If the expression has been parsed successfully but is invalid.
org.outerj.expression.ParseException - If something goes wrong while parsing.

parseVariables

public List parseVariables(String expressionString)
                    throws org.outerj.expression.ParseException,
                           org.outerj.expression.ExpressionException
Description copied from interface: ExpressionManager
Parse the given expression to extract variables.

Specified by:
parseVariables in interface ExpressionManager
Parameters:
expressionString - The string containing the expression to parse.
Returns:
A List of VariableFunction, one for each variable used in the expression.
Throws:
org.outerj.expression.ParseException - If something goes wrong while parsing.
org.outerj.expression.ExpressionException - If the expression has been parsed successfully but is invalid.
See Also:
VariableFunction.getVariableName()

setFunctions

public void setFunctions(Map functions)


Copyright 1999-2008 The Apache Software Foundation. All Rights Reserved.