| org.apache.beehive.netui.script.ExpressionEvaluator
All known Subclasses: org.apache.beehive.netui.script.el.ExpressionEvaluatorImpl,
ExpressionEvaluator | public interface ExpressionEvaluator (Code) | | Interface for implementing a runtime for evaluating expressions. An ExpressionEvaluator is
used to execute read and update expressions. It also provides a set of methods
for performing utility type operations on expressions.
|
changeContext | public String changeContext(String expression, String oldContext, String newContext, int lookupIndex) throws ExpressionEvaluationException(Code) | | Change the evaluation context of an expression. This is used to rewrite some expressions
that need to be qualified into a different context for evaluation. The context
of an expression is its first identifier, up to the first delimiter.
Parameters: expression - the expression whose context to change Parameters: oldContext - the old context to replace, if present Parameters: newContext - the new context to replace if the expression starts with the oldContext Parameters: lookupIndex - an index used to qualify an expression into an array look-up. |
containsExpression | public boolean containsExpression(String expression)(Code) | | Checks to see if a particular expression contains an expression. This method will return
true if there is an expression surrounded by whitespace, other expressions,
or literal text.
Parameters: expression - the expression to check true if the expression contains an expression; false otherwise. |
evaluateStrict | public Object evaluateStrict(String expression, VariableResolver variableResolver) throws ExpressionEvaluationException(Code) | | Evaluate an expression and return the result.
Parameters: expression - the expression to evaluate Parameters: variableResolver - the set of contexts that may be used in expression evaluation. This setis not necessarily complete as some objects that can be used as top-level expression contextsmay be contained within an object available in this JavaBean. throws: ExpressionEvaluationException - when an error occurs |
isExpression | public boolean isExpression(String expression)(Code) | | Checks to see if a particular String is exactly an expression.
Parameters: expression - the expression to check true if the expression is exactly an expression; false otherwise. throws: IllegalExpressionException - if the given expression expression is not legal. |
parseExpression | public Expression parseExpression(String expression)(Code) | | Parse an expression into its object representation as a
Expression .
Parameters: expression - the String expression to parse the parsed expression |
qualify | public String qualify(String implicitObjectName, String expression) throws ExpressionEvaluationException(Code) | | Qualify the expression into the given context. This will take the expression
and simply qualify it into the new context implicitObjectName .
Parameters: implicitObjectName - the new context Parameters: expression - the expression to qualify the new expression created by adding the implicit object name implicitObjectName to the expression string expression throws: ExpressionEvaluationException - if an exception occurs qualifying the expression with the implict object name |
update | public void update(String expression, Object value, VariableResolver variableResolver, boolean requestParameter) throws ExpressionUpdateException(Code) | | Update an expression with the given value. This will apply the parameter value
to the object referenced by the expression expression . The requestParameter
flag is used by a caller to restrict the set of contexts into which an update can occur on
the request.
Parameters: expression - the expression whose value to update Parameters: value - the new value for the update Parameters: variableResolver - the set of contexts that may be used in expression evaluation. This setis not necessarily complete as some objects that can be used as top-level expression contextsmay be contained within an object available in this JavaBean. Parameters: requestParameter - a boolean that marks this update as occurring from data in the request, iftrue or simply as a regular update. throws: ExpressionUpdateException - when an exception occurs updating a value |
|
|