|
The Gravey 2.0 Framework | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Object
|
+--GrvObject
|
+--EDO
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:
| 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 |
<static> Object kMsgSep
| Constructor Detail |
EDO()
| Method Detail |
String action()
void addMe()
String buildUpdateItemPost()
"UPDATES={class}~{key}~{action}~{content}~END_UPDATE"
where the fields are defined as follows...
{class} = the entity's type
{key} = the entity's unique key number
{action} = the entity's action code
(encode as strings 'C','D', and 'U' for values create, delete, and update.)
{content}= the EDO's specific content in EDO-specific-format
String canCreate(<boolean> appendFlag)
appendFlag - if true then append else insert
String canDelete()
String canEdit()
boolean canToggleExpand( <boolean> doAllFlag )
doAllFlag - if true, all EDOs are to be set
boolean canUncreate(<boolean> appendFlag)
appendFlag - if true then append else insert
EDO clone()
ABSTRACT: sub classes of EDO should override this.
void collapse()
void deleteMe()
String dump()
void editMe()
String edoToolTip( <EDOIndex> xi )
xi - edo index
void expand()
String getEditRule( <String> optPropID )
optPropID - optional property ID
String getValidity(<String> ID)
ID - repayment attribute name
boolean inEdit()
boolean inLimbo()
boolean isActive()
boolean isDeleted()
boolean isExpanded()
boolean isNew()
boolean isValid()
boolean isViewable()
void konstructor( <Function> CLAZZ, <EDOHolderModel> parentHolder, <array> propValues, <String> editDate, <String> editUser, <int> theKey, <int> optEditStatus, <String> optName )
CLAZZ - this EDO's "class"
parentHolder - holder model containing this
propValues - array of property initial values
editDate - date of last edit
editUser - ID of last user to edit
theKey - Oracle primary key of this record
optEditStatus - optional edit status where the status codes are: 0=no-change; 1=delete; 2=create; 3=hidden; 4=update
optName - optional name of this instance
void makeReadOnly()
Array propValues()
Array pushEncodedValues( pArray )
void pushPosts( <Array> posts )
posts - string array containing POST params
void pushUpdateFields( <Array> uFields )
"{property1}~{property2}~...~{propertyN}~"
where the fields are defined as follows...
{propertyI} = the i-th editable property of this EDO
uFields - string array containing Update Msg fields
Array pushValues( pArray )
void setValidity(<String> ID,<String> v)
ID - repayment attribute name
v - validity "code" (actually an error message or null)
String state()
void toggleExpand( <boolean> optValue )
optValue - if specified, set flag to it, else toggle
String toolTip( <EDOIndex> xi )
xi - edo index
String toString()
void undeleteMe()
void uneditMe()
|
The Gravey 2.0 Framework | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||