atg.process.expression
Interface Expression

All Known Subinterfaces:
MutableExpression

public interface Expression

A non-mutable expression.


Field Summary
static java.lang.String CLASS_VERSION
          Class version string
 
Method Summary
 boolean canGetValue(ProcessExecutionContext pContext)
          Returns true if the expression can be resolved in the given process execution context, false otherwise.
 java.lang.Object getValue(ProcessExecutionContext pContext)
          Resolves the expression in the given process execution context, and returns the resulting value.
 

Field Detail

CLASS_VERSION

static final java.lang.String CLASS_VERSION
Class version string

See Also:
Constant Field Values
Method Detail

canGetValue

boolean canGetValue(ProcessExecutionContext pContext)
Returns true if the expression can be resolved in the given process execution context, false otherwise. Thus, false is returned if the context does not yet contain all of the information necessary to evaluate the expression - for example, if the expression refers to properties of the subject, and the context is missing the particular subject that the process is being executed on.

It's legal to call this method with a null argument; true will be returned if the context is not required at all to evaluate the expression.


getValue

java.lang.Object getValue(ProcessExecutionContext pContext)
                          throws ProcessException
Resolves the expression in the given process execution context, and returns the resulting value. For example, if the expression represents a subject property, it is resolved using the subject pointed to by the context. The context argument can be null if the value of the expression does not depend on the context.

This method should be called only if the process execution context is known to contain all the information necessary to resolve the expression (in other words, if Expression.canGetValue returns true).

Throws:
ProcessException - if the expression could not be resolved