The Gravey 2.0 Framework

Class EDOHolderModel

Object
   |
   +--GrvObject
         |
         +--MVCObserver
               |
               +--MVCModel
                     |
                     +--EDOHolderModel

class EDOHolderModel
extends MVCModel


This abstract class encapsulates the functionality of a data model managing a set of editable domain objects (EDOs).

Second, this model implements the MVCBoolModel.isTrue() interface where the value reflects whether this model is "dirty".
Version: 2.0

Author: Bruce Wallace (PolyGlotInc.com)
See:

Defined in grvEDO.js


Constructor Summary
EDOHolderModel ()
           
 
Method Summary
 EDO _newEDO(<EDOIndex> xi)
           return a new blank EDO of the type implied by EDOIndex
 void _reset()
           clear EDOs and update timestamp but dont publish
 void _resetEDOs()
           clear EDOs

ABSTRACT: sub classes of EDOHolderModel should override this

 EDOIndex appendEDO(<EDOIndex> xi)
           create new EDO which is appended at end of EDO list
 String canCreateEDO(<EDOIndex> xi,<boolean> appendFlag)
           Is it legal to create a new EDO?
 String canDeleteEDO(<EDOIndex> xi)
           Is it legal to delete selected EDO?
 String canEditEDO(<EDOIndex> xi)
           Is it legal to edit selected EDO?
 boolean canToggleExpand( <boolean> doAllFlag, <EDOIndex> xi )
           can we toggle the "expanded" flag of the specified EDO?
 boolean canUncreateEDO(<EDOIndex> xi,<boolean> appendFlag)
           If created, can we undo creation?
 EDOIndex createEDO(<EDOIndex> xi)
           create new EDO which is inserted after selected EDO
 EDOHolderSelectionItem

ABSTRACT: sub classes of EDOHolderModel should override this

createSelectionItem()
           create a new item for the selection list from current EDO
 void deleteEDO(<EDOIndex> xi)
           delete the specified EDO
 void editEDO(<EDOIndex> xi)
           enable editing on the specified EDO
 String getCRUDtype()
           return the type of CRUD event that caused EDOHolder reload.
 void getEDO(<EDOIndex> xi)
           return reference to the specified editable domain object
 Object

ABSTRACT: sub classes of EDOHolderModel should override this

getUpdatedProperty()
           return the updated properties from the current EDO needed for select list update
 boolean

ABSTRACT: sub classes of EDOHolderModel should override this

hasEDO()
           return whether there is currently an EDO
 boolean

ABSTRACT: sub classes of EDOHolderModel should override this

isDirty()
           return whether any EDOs are changed for this model
 boolean isExpandedEDO(<EDOIndex> xi)
           return whether the specified EDO is collapsed or open
 boolean isTrue()
           MVCBoolModel API: return "I am modified" flag
 boolean

ABSTRACT: sub classes of EDOHolderModel should override this

isValid()
           return whether all EDOs are valid for this model
 void justCreated()
           handle CRUD event: "just created EDOHolder"
 void justDeleted()
           handle CRUD event: "just deleted EDOHolder"
 void justRead()
           handle CRUD event: "just loaded EDOHolder"
 void justUpdated()
           handle CRUD event: "just updated EDOHolder"
 boolean keysMatch(<EDOHolderSelectionItem> item)
           return whether current EDO matches selection item "key"
 void konstructor( <MVCSelectionModel> holderSelectionModel, <Object> loadXslDOM, <String> entityName )
          
 EDO newEDO(<EDOIndex> xi)
           return a new blank EDO of the type implied by EDOIndex
 EDO openEDO(<EDOIndex> xi)
           return the specified EDO with the intent to change its attributes
 boolean propMatch(<EDOHolderSelectionItem> item)
           return whether current EDO matches selection item "properties"
 void pushPosts( <Array> posts )
           push into given array all AJAX SAVE Post params for this model
 void reloaded()
           handle "EDOHolder reloaded" event.
 void requestLoad( <Object> edoHolderSelected )
           Make a Load-Data request to the AJAX server.
 void requestSave( <Object> edoHolderSelected, <String> updates )
           Make a Save-Data request to the AJAX server.
 void reset()
           clear list and publish
 void save()
           save all of the edits into the database via service layer
 void toggleExpand( <boolean> doAllFlag, <EDOIndex> xi )
           toggle the "expanded" flag of the specified EDO.
 void undeleteEDO(<EDOIndex> xi)
           undelete the specified EDO
 void uneditEDO(<EDOIndex> xi)
           rollback edit on the specified EDO
 void update()
           handle update events from the EDOHolder Selection Model
<static> Object AjaxRequest( <String> theType, <String> theKey, <Function> replyHandler, <String> optPostData, <boolean> optWaitFlag )
           Make a REST-style AJAX request to the server.
 
Methods inherited from class MVCModel
dumpSubscribers, toString, dirty, clean, publish, GET, _SET, SET, updateStamp, BeginTransaction, EndTransaction, addObserver, delObserver, notifyObservers
   
Methods inherited from class MVCObserver
subscribe
   
Methods inherited from class GrvObject
souper, souper_, isInstanceOf
 

Constructor Detail

EDOHolderModel

EDOHolderModel()

Method Detail

_newEDO

EDO _newEDO(<EDOIndex> xi)

_reset

void _reset()

_resetEDOs

void _resetEDOs()

appendEDO

EDOIndex appendEDO(<EDOIndex> xi)

canCreateEDO

String canCreateEDO(<EDOIndex> xi,<boolean> appendFlag)

canDeleteEDO

String canDeleteEDO(<EDOIndex> xi)

canEditEDO

String canEditEDO(<EDOIndex> xi)

canToggleExpand

boolean canToggleExpand( <boolean> doAllFlag, <EDOIndex> xi )

canUncreateEDO

boolean canUncreateEDO(<EDOIndex> xi,<boolean> appendFlag)

createEDO

EDOIndex createEDO(<EDOIndex> xi)

createSelectionItem

EDOHolderSelectionItem  

ABSTRACT: sub classes of EDOHolderModel should override this

createSelectionItem()

deleteEDO

void deleteEDO(<EDOIndex> xi)

editEDO

void editEDO(<EDOIndex> xi)

getCRUDtype

String getCRUDtype()

getEDO

void getEDO(<EDOIndex> xi)

getUpdatedProperty

Object  

ABSTRACT: sub classes of EDOHolderModel should override this

getUpdatedProperty()

hasEDO

boolean  

ABSTRACT: sub classes of EDOHolderModel should override this

hasEDO()

isDirty

boolean  

ABSTRACT: sub classes of EDOHolderModel should override this

isDirty()

isExpandedEDO

boolean isExpandedEDO(<EDOIndex> xi)

isTrue

boolean isTrue()

isValid

boolean  

ABSTRACT: sub classes of EDOHolderModel should override this

isValid()

justCreated

void justCreated()

justDeleted

void justDeleted()

justRead

void justRead()

justUpdated

void justUpdated()

keysMatch

boolean keysMatch(<EDOHolderSelectionItem> item)

konstructor

void konstructor( <MVCSelectionModel> holderSelectionModel, <Object> loadXslDOM, <String> entityName )

newEDO

EDO newEDO(<EDOIndex> xi)

openEDO

EDO openEDO(<EDOIndex> xi)

propMatch

boolean propMatch(<EDOHolderSelectionItem> item)

pushPosts

void pushPosts( <Array> posts )

reloaded

void reloaded()

requestLoad

void requestLoad( <Object> edoHolderSelected )

requestSave

void requestSave( <Object> edoHolderSelected, <String> updates )

reset

void reset()

save

void save()

toggleExpand

void toggleExpand( <boolean> doAllFlag, <EDOIndex> xi )

undeleteEDO

void undeleteEDO(<EDOIndex> xi)

uneditEDO

void uneditEDO(<EDOIndex> xi)

update

void update()

AjaxRequest

<static> Object AjaxRequest( <String> theType, <String> theKey, <Function> replyHandler, <String> optPostData, <boolean> optWaitFlag )

The Gravey 2.0 Framework

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