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(java.lang.String expression)
          Returns true if the expression evaluates to a constant or other literal value.
 java.lang.Object read(java.lang.Object target, java.lang.String expression)
          Reads a property of the target, defined by the expression.
 java.lang.Object readCompiled(java.lang.Object target, java.lang.Object expression)
          Reads a property of the target, defined by the (previously compiled) expression.
 void write(java.lang.Object target, java.lang.String expression, java.lang.Object value)
          Updates a property of the target, defined by the expression.
 void writeCompiled(java.lang.Object target, java.lang.Object expression, java.lang.Object value)
          Updates a property of the target, defined by the (previously compiled) expression.
 

Method Detail

read

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

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

readCompiled

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

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

write

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

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

writeCompiled

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

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

isConstant

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

Throws:
org.apache.hivemind.ApplicationRuntimeException - if the expression is not valid