All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class logic.Action

java.lang.Object
   |
   +----logic.Action

public class Action
extends Object

Variable Index

 o attribute
This is an attribute that is passed in and set with the "typical" constructor, following the default framework behavior.
 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 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 Action(Updateable, Hashtable)
This constructor handles all the more complicated scenarios in which more is required from an action then setting a single attribute.
 o 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.

Method Index

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

Variables

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

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

 o attribute
 protected 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 MAIN_KEY
 public static final 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.

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 Updateable getUd()
 o getUpdateVals
 public 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