org.apache.tapestry.services.impl
Class ExpressionEvaluatorImpl

java.lang.Object
  extended by org.apache.tapestry.services.impl.ExpressionEvaluatorImpl
All Implemented Interfaces:
EventListener, org.apache.hivemind.events.RegistryShutdownListener, ExpressionEvaluator

public class ExpressionEvaluatorImpl
extends Object
implements ExpressionEvaluator, org.apache.hivemind.events.RegistryShutdownListener

Since:
4.0

Constructor Summary
ExpressionEvaluatorImpl()
           
 
Method Summary
 OgnlContext createContext(Object target)
          Creates a default OGNL context object that can be used against the specified object for expression evaluation.
 void initializeService()
           
 boolean isConstant(Object target, String expression)
          Returns true if the expression evaluates to a constant or other literal value.
 boolean isConstant(String expression)
          Returns true if the expression evaluates to a constant or other literal value.
 Object read(Object target, ognl.enhance.ExpressionAccessor expression)
          Reads a property of the target, defined by the (previously compiled) expression.
 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 registryDidShutdown()
           
 void setApplicationSpecification(IApplicationSpecification applicationSpecification)
           
 void setClassFactory(org.apache.hivemind.service.ClassFactory classFactory)
           
 void setContributions(List contributions)
           
 void setExpressionCache(ExpressionCache expressionCache)
           
 void setNullHandlerContributions(List nullHandlerContributions)
           
 void write(Object target, ognl.enhance.ExpressionAccessor expression, Object value)
          Updates 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExpressionEvaluatorImpl

public ExpressionEvaluatorImpl()
Method Detail

setApplicationSpecification

public void setApplicationSpecification(IApplicationSpecification applicationSpecification)

initializeService

public void initializeService()

read

public Object read(Object target,
                   String expression)
Description copied from interface: ExpressionEvaluator
Reads a property of the target, defined by the expression.

Specified by:
read in interface ExpressionEvaluator

readCompiled

public Object readCompiled(Object target,
                           Object expression)
Description copied from interface: ExpressionEvaluator
Reads a property of the target, defined by the (previously compiled) expression.

Specified by:
readCompiled in interface ExpressionEvaluator

read

public Object read(Object target,
                   ognl.enhance.ExpressionAccessor expression)
Description copied from interface: ExpressionEvaluator
Reads a property of the target, defined by the (previously compiled) expression.

Specified by:
read in interface ExpressionEvaluator
Parameters:
target - The object to resolve the expression against.
expression - The compiled expression.
Returns:
The result of reading on the expression.

createContext

public OgnlContext createContext(Object target)
Description copied from interface: ExpressionEvaluator
Creates a default OGNL context object that can be used against the specified object for expression evaluation.

Specified by:
createContext in interface ExpressionEvaluator
Parameters:
target - The object to get a context for.
Returns:
An ognl context map.

write

public void write(Object target,
                  String expression,
                  Object value)
Description copied from interface: ExpressionEvaluator
Updates a property of the target, defined by the expression.

Specified by:
write in interface ExpressionEvaluator

write

public void write(Object target,
                  ognl.enhance.ExpressionAccessor expression,
                  Object value)
Description copied from interface: ExpressionEvaluator
Updates a property of the target, defined by the (previously compiled) expression.

Specified by:
write in interface ExpressionEvaluator
Parameters:
target - The target object to set a value on.
expression - The pre-compiled expression.
value - The value to set.

writeCompiled

public void writeCompiled(Object target,
                          Object expression,
                          Object value)
Description copied from interface: ExpressionEvaluator
Updates a property of the target, defined by the (previously compiled) expression.

Specified by:
writeCompiled in interface ExpressionEvaluator

isConstant

public boolean isConstant(Object target,
                          String expression)
Description copied from interface: ExpressionEvaluator
Returns true if the expression evaluates to a constant or other literal value.

Specified by:
isConstant in interface ExpressionEvaluator

isConstant

public boolean isConstant(String expression)
Description copied from interface: ExpressionEvaluator
Returns true if the expression evaluates to a constant or other literal value.

Specified by:
isConstant in interface ExpressionEvaluator

registryDidShutdown

public void registryDidShutdown()
Specified by:
registryDidShutdown in interface org.apache.hivemind.events.RegistryShutdownListener

setExpressionCache

public void setExpressionCache(ExpressionCache expressionCache)

setContributions

public void setContributions(List contributions)

setNullHandlerContributions

public void setNullHandlerContributions(List nullHandlerContributions)

setClassFactory

public void setClassFactory(org.apache.hivemind.service.ClassFactory classFactory)


Copyright © 2006-2008 Apache Software Foundation. All Rights Reserved.