org.jicengine.operation
Class VariableValueOperation

java.lang.Object
  extended byorg.jicengine.operation.VariableValueOperation
All Implemented Interfaces:
Operation

public class VariableValueOperation
extends java.lang.Object
implements Operation

Author:
.timo

Constructor Summary
VariableValueOperation(java.lang.String objectName)
           
 
Method Summary
 java.lang.Object execute(Context context)
           executes the operation in a given context. objects in the context might be used in evaluation, or operation could produce more objects into the context.
 java.lang.String getName()
           
static java.lang.Object lookup(java.lang.String name, Context context)
           
 boolean needsParameter(java.lang.String name)
           So clients may query if this operation needs a particular parameter. a return value 'true' means that in order to execute this parameter, a parameter with the given name must exist in the context.
 boolean needsParameters()
          So clients may query whether this operation needs any parameters at all.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

VariableValueOperation

public VariableValueOperation(java.lang.String objectName)
Method Detail

getName

public java.lang.String getName()

needsParameters

public boolean needsParameters()
Description copied from interface: Operation
So clients may query whether this operation needs any parameters at all.

Specified by:
needsParameters in interface Operation

needsParameter

public boolean needsParameter(java.lang.String name)
Description copied from interface: Operation

So clients may query if this operation needs a particular parameter. a return value 'true' means that in order to execute this parameter, a parameter with the given name must exist in the context.

if the parmeter in question is an optional parameter, a true must be returned.

Specified by:
needsParameter in interface Operation

lookup

public static java.lang.Object lookup(java.lang.String name,
                                      Context context)
                               throws OperationException
Throws:
OperationException

execute

public java.lang.Object execute(Context context)
                         throws OperationException
Description copied from interface: Operation

executes the operation in a given context. objects in the context might be used in evaluation, or operation could produce more objects into the context.

NOTE: operations must be re-executable.

Specified by:
execute in interface Operation
Throws:
OperationException

toString

public java.lang.String toString()