Class logic.Action
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class logic.Action

Object
   |
   +----logic.Action

public class Action
extends Object

Variable Index

 o MAIN_KEY
This String is used as a key in the default behavior of this class -- when the first constructor is used, attribute is set as value in a hashtable, using MAIN_KEY as key.
 o attribute
This is an attribute that is passed in and set with the "typical" constructor, following the default framework behavior.
 o ud
object on which some action must be performed
 o updateVals
When rules are executed, this a table of update values for the Updateable object is obtained and set here

Constructor Index

 o logic.Action(Updateable, Object)
This is the "default" constructor -- it handles the simple case in which the required action simply sets a value in the Updateable object.
 o logic.Action(Updateable, Hashtable)
This constructor handles all the more complicated scenarios in which more is required from an action then setting a single attribute.

Method Index

 o execute()
What is provided here is default behavior.
 o getUd()
 o getUpdateVals()
 o setAttribute(Object)
 o setAttributesFromTable(Hashtable)

Variables

 o MAIN_KEY
public static final java.lang.String MAIN_KEY
This String is used as a key in the default behavior of this class -- when the first constructor is used, attribute is set as value in a hashtable, using MAIN_KEY as key. The hashtable is passed to the Updateable instance and is unpacked using MAIN_KEY again.

 o attribute
protected java.lang.Object attribute
This is an attribute that is passed in and set with the "typical" constructor, following the default framework behavior. When this constructor is used the default behavior involves setting this attribute in the Updateable object

 o ud
protected logic.Updateable ud
object on which some action must be performed

 o updateVals
protected java.util.Hashtable updateVals
When rules are executed, this a table of update values for the Updateable object is obtained and set here

Constructors

 o Action
public Action(Updateable ud,
              Object attribute)
This is the "default" constructor -- it handles the simple case in which the required action simply sets a value in the Updateable object.

 o Action
public Action(Updateable ud,
              Hashtable attributes)
This constructor handles all the more complicated scenarios in which more is required from an action then setting a single attribute. When this constructor is used, it's necessary to override the execute() method

Methods

 o execute
public void execute()
What is provided here is default behavior. If the Action(Updateable, Object) constructor was used, then the action to be performed is simply to set a single attribute in the Updateable object. The default behavior for execute() given below does this, using MAIN_KEY as key and the already set ivar attribute as the value. If you need a more complicated action, this method needs to be overridden.

 o getUd
public logic.Updateable getUd()
 o getUpdateVals
public java.util.Hashtable getUpdateVals()
 o setAttribute
public void setAttribute(Object ob)
 o setAttributesFromTable
public void setAttributesFromTable(Hashtable ht)

All Packages  Class Hierarchy  This Package  Previous  Next  Index