com.philemonworks.selfdiagnose
Class ExecutionContext

java.lang.Object
  extended by com.philemonworks.selfdiagnose.ExecutionContext

public class ExecutionContext
extends Object


Constructor Summary
ExecutionContext()
           
 
Method Summary
 Object getValue(String expression)
          Return the stored value for a variable.
 String resolveString(String valueOrExpression)
          Checks and makes sure the return value is a String
 Object resolveValue(String valueOrExpression)
          The argument is either a value or an expression.
 void setValue(String variableName, Object newValue)
          Store the value for a variable unless no variable was specified (== null)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExecutionContext

public ExecutionContext()
Method Detail

setValue

public void setValue(String variableName,
                     Object newValue)
              throws DiagnoseException
Store the value for a variable unless no variable was specified (== null)

Parameters:
variableName - : String || null
newValue - : Object
Throws:
DiagnoseException

getValue

public Object getValue(String expression)
                throws DiagnoseException
Return the stored value for a variable. Null is allowed for the value. Throws an exception if this value is not available

Parameters:
expression - : String
Returns:
Object
Throws:
DiagnoseException

resolveValue

public Object resolveValue(String valueOrExpression)
                    throws DiagnoseException
The argument is either a value or an expression. Expressions are specified using the syntax ${myexpression} Return the stored value for a variable.

Parameters:
valueOrExpression -
Returns:
Object
Throws:
DiagnoseException

resolveString

public String resolveString(String valueOrExpression)
                     throws DiagnoseException
Checks and makes sure the return value is a String

Parameters:
valueOrExpression - : String
Returns:
String
Throws:
DiagnoseException


Copyright © 2012. All Rights Reserved.