org.apache.tapestry.services
Interface ExpressionEvaluator

All Known Implementing Classes:
ExpressionEvaluatorImpl

public interface ExpressionEvaluator

Wrapper around the OGNL library.

Since:
4.0
Author:
Howard M. Lewis Ship

Method Summary
 boolean isConstant(String expression)
          Returns true if the expression evaluates to a constant or other literal value.
 Object read(Object target, String expression)
          Reads a property of the target, defined by the expression.
 Object readCompiled(Object target, Object expression)
          Reads a property of the target, defined by the (previously compiled) expression.
 void write(Object target, String expression, Object value)
          Updates a property of the target, defined by the expression.
 void writeCompiled(Object target, Object expression, Object value)
          Updates a property of the target, defined by the (previously compiled) expression.
 

Method Detail

read

Object read(Object target,
            String expression)
Reads a property of the target, defined by the expression.

Throws:
ApplicationRuntimeException - if the expression can not be parsed, or if some other error occurs during evaluation of the expression.

readCompiled

Object readCompiled(Object target,
                    Object expression)
Reads a property of the target, defined by the (previously compiled) expression.

Throws:
ApplicationRuntimeException - if some other error occurs during evaluation of the expression.

write

void write(Object target,
           String expression,
           Object value)
Updates a property of the target, defined by the expression.

Throws:
ApplicationRuntimeException - if the expression can not be parsed, or if some other error occurs during evaluation of the expression.

writeCompiled

void writeCompiled(Object target,
                   Object expression,
                   Object value)
Updates a property of the target, defined by the (previously compiled) expression.

Throws:
ApplicationRuntimeException - if some other error occurs during evaluation of the expression.

isConstant

boolean isConstant(String expression)
Returns true if the expression evaluates to a constant or other literal value.

Throws:
ApplicationRuntimeException - if the expression is not valid


Copyright © 2006 Apache Software Foundation. All Rights Reserved.