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

public 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

public 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

public 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

public 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

public 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