|
The Gravey 2.0 Framework and AIM RIA | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Object
|
+--GrvObject
|
+--MVCCommand
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.
| 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 |
<static> Object NextID
| Constructor Detail |
MVCCommand()
| Method Detail |
String details()
void doit()
void DOIT()
boolean isInvalid()
void konstructor( optName, <String> optErrMsg )
optErrMsg - if not null then cancel this cmd
cmdDesc - general description of this command
void redo()
void REDO()
void syncDo( methodName )
void syncDoIt()
void syncReDo()
void syncUnDo()
String toString()
void undo()
void UNDO()
|
The Gravey 2.0 Framework and AIM RIA | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||