The Gravey 2.0 Framework and AIM RIA

Class MVCCommand

Object
   |
   +--GrvObject
         |
         +--MVCCommand
Direct Known Subclasses:
MVCAJAXReplyCmd, EDOHolderCloseWindowIfSavedCmd, EDOHolderSelectCmd, EDOHolderCancelAllChangesCmd, EDOCmd, MVCScalarEditCmd, EDOHolderSaveAllChangesCmd, EDOHolderSelectInitialCmd

class MVCCommand
extends GrvObject


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

 Subclasses of MVCCommand 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.

Version: 2.0

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


Field Summary
<static>  Object NextID
          
 
Constructor Summary
MVCCommand ()
           
 
Method Summary
 String details()
           return details of this command for user viewing
 void doit()
           "Do command" logic
 void DOIT()
           "DO" this command if in the proper state.
 boolean isInvalid()
           return true iff this command should not even be started
 void konstructor( optName, <String> optErrMsg )
          
 void redo()
           "command REDO" logic.
 void REDO()
           "REDO" this command if in the proper state.
 void syncDo( methodName )
           synchronized call with global view blocking
 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.
 
Methods inherited from class GrvObject
souper
 

Field Detail

NextID

<static> Object NextID

Constructor Detail

MVCCommand

MVCCommand()

Method Detail

details

String details()

doit

void doit()

DOIT

void DOIT()

isInvalid

boolean isInvalid()

konstructor

void konstructor( optName, <String> optErrMsg )

redo

void redo()

REDO

void REDO()

syncDo

void syncDo( methodName )

syncDoIt

void syncDoIt()

syncReDo

void syncReDo()

syncUnDo

void syncUnDo()

toString

String toString()

undo

void undo()

UNDO

void UNDO()

The Gravey 2.0 Framework and AIM RIA

Documentation generated by JSDoc on Sat Dec 8 21:51:03 2007