de.smartics.exceptions.ognl
Class OgnlExpression

Package class diagram package OgnlExpression
java.lang.Object
  extended by de.smartics.exceptions.ognl.OgnlExpression

public final class OgnlExpression
     
     
extends Object

Wrapper for an OGNL expression.


Constructor Summary
OgnlExpression(String expressionString)
          Default constructor.
 
Method Summary
 Object getExpression()
          Returns the reference to the parsed expression instance.
 Object getValue(ognl.OgnlContext context, Object rootObject)
          Returns the value for the given context on the given root object.
 void setValue(ognl.OgnlContext context, Object rootObject, Object value)
          Sets the value dependent on the OGNL expression.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OgnlExpression

public OgnlExpression(String expressionString)
               throws ognl.OgnlException
Default constructor.

Parameters:
expressionString - the OGNL expression to parse.
Throws:
ognl.OgnlException - on any parsing problem.
Method Detail

getExpression

public Object getExpression()
Returns the reference to the parsed expression instance.

Returns:
the reference to the parsed expression instance.

getValue

public Object getValue(ognl.OgnlContext context,
                       Object rootObject)
                throws ognl.OgnlException
Returns the value for the given context on the given root object.

Parameters:
context - the context of the evaluation.
rootObject - the root object to run the evaluation of the OGNL expression.
Returns:
the value of the root object referenced by the OGNL expression.
Throws:
ognl.OgnlException - on any problem encountered fetching the value.

setValue

public void setValue(ognl.OgnlContext context,
                     Object rootObject,
                     Object value)
              throws ognl.OgnlException
Sets the value dependent on the OGNL expression.

Parameters:
context - the context of the evaluation.
rootObject - the root object to run the evaluation of the OGNL expression.
value - the value to set.
Throws:
ognl.OgnlException - on any problem encountered setting the value.


Copyright © 2007-2013 Kronseder & Reiner GmbH - smartics. All Rights Reserved.