The Gravey 2.0 Framework

Class EDO

Object
   |
   +--GrvObject
         |
         +--EDO

class EDO
extends GrvObject


This class defines a framework for Editable Domain Objects.

Note that subclasses MUST override the clone() method.
Version: 2.0

Author: Bruce Wallace (PolyGlotInc.com)
See:

Defined in grvEDO.js


Field Summary
<static>  Object kMsgSep
          
 
Constructor Summary
EDO ()
           
 
Method Summary
 String action()
           return our edit state translated to a broadcast message code
 void addMe()
           mark this entity as being newly added
 String buildUpdateItemPost()
           return an UpdateItem Message (as a POST argument) for (just) this particular EDO formatted as:
 "UPDATES={class}~{key}~{action}~{content}~END_UPDATE"
 where the fields are defined as follows...
      
 String canCreate(<boolean> appendFlag)
           Is it legal to create a new one of "this/these"?
 String canDelete()
           Is it legal to delete "this"?
 String canEdit()
           Is it legal to edit "this"?
 boolean canToggleExpand( <boolean> doAllFlag )
           can this EDO toggle the "expanded" flag?
 boolean canUncreate(<boolean> appendFlag)
           If created, can we undo creation?
 EDO clone()
           return a clone of "this" object.
 void collapse()
           force this EDO to be collapsed
 void deleteMe()
           mark this EDO as deleted
 String dump()
           return the debug details of "this"
 void editMe()
           mark this entity as having been edited
 String edoToolTip( <EDOIndex> xi )
           return the DEFAULT tooltip for "this"
 void expand()
           force this EDO to be expanded
 String getEditRule( <String> optPropID )
           return the edit/validation rule for the specified property.
 String getValidity(<String> ID)
           return the validity "code" of the specified attribute
 boolean inEdit()
           return whether this entity has been changed since last save
 boolean inLimbo()
           Is this EDO undead?
 boolean isActive()
           Is this EDO active and editable?
 boolean isDeleted()
           is this entity newly added?
 boolean isExpanded()
           return whether this EDO is collapsed or open
 boolean isNew()
           is this entity newly added?
 boolean isValid()
           return whether this EDO has validated data
 boolean isViewable()
           return whether this EDO can be viewed if desired
 void konstructor( <Function> CLAZZ, <EDOHolderModel> parentHolder, <array> propValues, <String> editDate, <String> editUser, <int> theKey, <int> optEditStatus, <String> optName )
          
 void makeReadOnly()
           convert all property edit rules into "read-only"
 Array propValues()
           generate array of editable property values
 Array pushEncodedValues( pArray )
           push into given array the editable property values URI encoded
 void pushPosts( <Array> posts )
           push into given array all AJAX SAVE Post params for this model
 void pushUpdateFields( <Array> uFields )
           push into given array all EDO-specific fields of the UpdateItem message.
 Array pushValues( pArray )
           push into given array the editable property values
 void setValidity(<String> ID,<String> v)
           set the validity code of the specified attribute
 String state()
           return the formatted version of our edit state
 void toggleExpand( <boolean> optValue )
           toggle (or set) the "expanded" flag of this EDO.
 String toolTip( <EDOIndex> xi )
           return the tooltip for "this"
 String toString()
           return "this" as human-readable string
 void undeleteMe()
           restore this EDO to its pre-deleted state
 void uneditMe()
           restore this EDO to its pre-edited state
 
Methods inherited from class GrvObject
souper, souper_, isInstanceOf
 

Field Detail

kMsgSep

<static> Object kMsgSep

Constructor Detail

EDO

EDO()

Method Detail

action

String action()

addMe

void addMe()

buildUpdateItemPost

String buildUpdateItemPost()

canCreate

String canCreate(<boolean> appendFlag)

canDelete

String canDelete()

canEdit

String canEdit()

canToggleExpand

boolean canToggleExpand( <boolean> doAllFlag )

canUncreate

boolean canUncreate(<boolean> appendFlag)

clone

EDO clone()

collapse

void collapse()

deleteMe

void deleteMe()

dump

String dump()

editMe

void editMe()

edoToolTip

String edoToolTip( <EDOIndex> xi )

expand

void expand()

getEditRule

String getEditRule( <String> optPropID )

getValidity

String getValidity(<String> ID)

inEdit

boolean inEdit()

inLimbo

boolean inLimbo()

isActive

boolean isActive()

isDeleted

boolean isDeleted()

isExpanded

boolean isExpanded()

isNew

boolean isNew()

isValid

boolean isValid()

isViewable

boolean isViewable()

konstructor

void konstructor( <Function> CLAZZ, <EDOHolderModel> parentHolder, <array> propValues, <String> editDate, <String> editUser, <int> theKey, <int> optEditStatus, <String> optName )

makeReadOnly

void makeReadOnly()

propValues

Array propValues()

pushEncodedValues

Array pushEncodedValues( pArray )

pushPosts

void pushPosts( <Array> posts )

pushUpdateFields

void pushUpdateFields( <Array> uFields )

pushValues

Array pushValues( pArray )

setValidity

void setValidity(<String> ID,<String> v)

state

String state()

toggleExpand

void toggleExpand( <boolean> optValue )

toolTip

String toolTip( <EDOIndex> xi )

toString

String toString()

undeleteMe

void undeleteMe()

uneditMe

void uneditMe()

The Gravey 2.0 Framework

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