The Gravy Framework

Class Command

Object
   |
   +--OObject
         |
         +--Command
Direct Known Subclasses:
SaveAllAccountChangesCmd, SelectFirstUnreconciledCmd, SelectAccountCmd, CancelAllAccountChangesCmd, CloseWindowIfDataSavedCmd, RatsCmd, LoadAccountDataCmd, ScalarEditCmd

class Command
extends OObject


This class acts as the abstract base class for each Command (ala Command design pattern).

 Subclasses of Command should define/override:
  (1) the constructor to load the do/undo/redo context data
      which should set the "valid" attribute to a negative
      number if the command cant properly be initiated. 
  (2) the doit() method which executes the command
  (3) the undo() method which "rolls back" the command
  (4) the redo() method which "un-rolls-back" the command
  (5) canUndo property if this cmd is only meant for mutex

 FYI, REDO would be different than DO, for example, in the case
 that DO had to do a database search to get a value, but REDO
 could simply use that saved value without re-searching for it.

See:Author: Bruce Wallace (PolyGlotInc.com)
Defined in mvc.js

Version: 1.0


Constructor Summary
Command ()
           
 
Method Summary
 String details()
           return details of this command for user viewing
 void DOIT()
           "DO" this command if in the proper state.
 void doit()
           "Do command" logic
 boolean isInvalid()
           return true iff this command should not even be started
 void konstructor( <String> optName )
          
 void redo()
           "command REDO" logic.
 void REDO()
           "REDO" this command if in the proper state.
 void syncDoIt()
           synchronized this.DOIT()
 void syncReDo()
           synchronized this.REDO()
 void syncUnDo()
           synchronized this.UNDO()
 String toString()
           return THIS formatted as string
 void undo()
           "command UNDO" logic
 void UNDO()
           "UNDO" this command if in the proper state.

Constructor Detail

Command

Command()

Method Detail

details

String details()

DOIT

void DOIT()

doit

void doit()

isInvalid

boolean isInvalid()

konstructor

void konstructor( <String> optName )

redo

void redo()

REDO

void REDO()

syncDoIt

void syncDoIt()

syncReDo

void syncReDo()

syncUnDo

void syncUnDo()

toString

String toString()

undo

void undo()

UNDO

void UNDO()

The Gravy Framework

Documentation generated by JSDoc on Fri Mar 17 06:40:21 2006