| Package | andromeda.model |
| Class | public class AbstractModelObject |
| Inheritance | AbstractModelObject AbstractModel CoreEventDispatcher CoreObject |
| Implements | IModelObject |
| Subclasses | CollectionModel, MapModel, PageableArrayModel, QueueModel, SimpleModelObject, StackModel |
IModelObject interface, to minimize the effort required to implement this interface.
| Property | Defined by | ||
|---|---|---|---|
![]() | channel : String
Indicates the channel of this dispatcher if this instance is global.
| CoreEventDispatcher | |
![]() | id : *
Returns the
id of this IModelObject. | AbstractModel | |
![]() | isGlobal : Boolean
(read-only) Returns the value of the isGlobal flag of this model.
| CoreEventDispatcher | |
| security : Boolean = true
This property defined if the setCurrentVO method can accept the same vo in argument as the current one.
| AbstractModelObject | ||
| Method | Defined by | ||
|---|---|---|---|
|
AbstractModelObject(id:* = null, bGlobal:Boolean = false, sChannel:String = null)
Creates a new AbstractModelObject instance.
| AbstractModelObject | ||
![]() |
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0.0, useWeakReference:Boolean = false):void
Allows the registration of event listeners on the event target.
| CoreEventDispatcher | |
|
clear():void
Clear the model.
| AbstractModelObject | ||
|
Returns and creates a new empty ModelObjectEvent.
| AbstractModelObject | ||
![]() |
dispatchEvent(event:Event):Boolean
Dispatches an event into the event flow.
| CoreEventDispatcher | |
|
Returns the current
IValueObject selected in this model. | AbstractModelObject | ||
![]() |
Returns the internal
EventDispatcher reference. | CoreEventDispatcher | |
|
getEventTypeBEFORE_CHANGE():String
Returns the event name use in the
setCurrentVO method before is changed. | AbstractModelObject | ||
|
getEventTypeCHANGE():String
Returns the event name use in the
setVO method. | AbstractModelObject | ||
|
getEventTypeCLEAR():String
Returns the event name use in the
clear method. | AbstractModelObject | ||
![]() |
getIsGlobal():Boolean
Returns the value of the isGlobal flag of this model.
| CoreEventDispatcher | |
![]() |
Returns the internal
ILogger reference of this ILogable object. | CoreObject | |
![]() |
hasEventListener(type:String):Boolean
Checks whether the EventDispatcher object has any listeners registered for a specific type of event.
| CoreEventDispatcher | |
![]() |
hashCode():uint
Returns a hashcode value for the object.
| CoreObject | |
![]() |
Creates and returns the internal
EventDispatcher reference (this method is invoked in the constructor). | CoreEventDispatcher | |
|
initEventType():void
This method is invoked in the constructor of the class to initialize all events.
| AbstractModelObject | ||
![]() |
isLocked():Boolean
Returns
true if the object is locked. | CoreEventDispatcher | |
![]() |
lock():void
Locks the object.
| CoreEventDispatcher | |
|
notifyBeforeChange(vo:IValueObject):void
Notify a
ModelObjectEvent before the current IValueObject selected in the model is changed. | AbstractModelObject | ||
|
notifyChange(vo:IValueObject):void
Notify a
ModelObjectEvent when a IValueObject change in the model. | AbstractModelObject | ||
|
notifyClear():void
Notify a
ModelObjectEvent when the model is cleared. | AbstractModelObject | ||
![]() |
registerEventListener(type:String, listener:Boolean, useCapture:int = false, priority:Boolean = 0, useWeakReference:* = false):void
Allows the registration of event listeners on the event target (Function or EventListener).
| CoreEventDispatcher | |
![]() |
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
Removes a listener from the EventDispatcher object.
| CoreEventDispatcher | |
![]() |
run(... arguments):void
Run the first process with this model.
| AbstractModel | |
|
setCurrentVO(vo:IValueObject):void
Sets the current
IValueObject selected in this model. | AbstractModelObject | ||
![]() |
setEventDispatcher(e:EventDispatcher):void
Sets the internal
EventDispatcher reference. | CoreEventDispatcher | |
|
setEventTypeBEFORE_CHANGE(type:String):void
Returns the event name use in the
setCurrentVO method before is changed. | AbstractModelObject | ||
|
setEventTypeCHANGE(type:String):void
Returns the event name use in the
setVO method. | AbstractModelObject | ||
|
setEventTypeCLEAR(type:String):void
Returns the event name use in the
clear method. | AbstractModelObject | ||
![]() |
setGlobal(flag:Boolean = false, channel:String = null):void
Sets if the instance use a global
EventDispatcher to dispatch this events, if the flag value is false the instance use a local EventDispatcher. | CoreEventDispatcher | |
![]() |
Sets the internal
ILogger reference of this ILogable object. | CoreObject | |
|
supports(value:*):Boolean
Returns
true if the IValidator object validate the value. | AbstractModelObject | ||
![]() |
toSource(indent:int = 0):String
Returns the string representation the source code of the object.
| CoreEventDispatcher | |
![]() |
toString():String
Returns the string representation of this instance.
| CoreObject | |
![]() |
unlock():void
Unlocks the display.
| CoreEventDispatcher | |
![]() |
unregisterEventListener(type:String, listener:Boolean, useCapture:* = false):void
Removes a listener (Function or EventListener object) from the EventDispatcher object.
| CoreEventDispatcher | |
|
validate(value:*):void
Evaluates the condition it checks and updates the IsValid property.
| AbstractModelObject | ||
![]() |
willTrigger(type:String):Boolean
Checks whether an event listener is registered with this EventDispatcher object or any of its ancestors for the specified event type.
| CoreEventDispatcher | |
| security | property |
public var security:Boolean = trueThis property defined if the setCurrentVO method can accept the same vo in argument as the current one.
| AbstractModelObject | () | constructor |
public function AbstractModelObject(id:* = null, bGlobal:Boolean = false, sChannel:String = null)Creates a new AbstractModelObject instance.
Parametersid:* (default = null) — the id of this model.
|
|
bGlobal:Boolean (default = false) — the flag to use a global event flow or a local event flow.
|
|
sChannel:String (default = null) — the name of the global event flow if the bGlobal argument is true.
|
| clear | () | method |
public function clear():voidClear the model.
| createNewModelObjectEvent | () | method |
public function createNewModelObjectEvent(type:String, vo:IValueObject = null):ModelObjectEventReturns and creates a new empty ModelObjectEvent. You can override this method.
Parameterstype:String — the type of the event.
|
|
vo:IValueObject (default = null) |
ModelObjectEvent —
a new empty ModelObjectEvent with the type specified in argument.
|
| getCurrentVO | () | method |
public function getCurrentVO():IValueObject
Returns the current IValueObject selected in this model.
IValueObject —
the current IValueObject selected in this model.
|
| getEventTypeBEFORE_CHANGE | () | method |
public function getEventTypeBEFORE_CHANGE():String
Returns the event name use in the setCurrentVO method before is changed.
String — the event name use in the setCurrentVO method before is changed.
|
| getEventTypeCHANGE | () | method |
public function getEventTypeCHANGE():String
Returns the event name use in the setVO method.
String — the event name use in the setVO method.
|
| getEventTypeCLEAR | () | method |
public function getEventTypeCLEAR():String
Returns the event name use in the clear method.
String — the event name use in the clear method.
|
| initEventType | () | method |
public function initEventType():voidThis method is invoked in the constructor of the class to initialize all events. Overrides this method.
| notifyBeforeChange | () | method |
public function notifyBeforeChange(vo:IValueObject):void
Notify a ModelObjectEvent before the current IValueObject selected in the model is changed.
vo:IValueObject |
| notifyChange | () | method |
public function notifyChange(vo:IValueObject):void
Notify a ModelObjectEvent when a IValueObject change in the model.
vo:IValueObject |
| notifyClear | () | method |
public function notifyClear():void
Notify a ModelObjectEvent when the model is cleared.
| setCurrentVO | () | method |
public function setCurrentVO(vo:IValueObject):void
Sets the current IValueObject selected in this model.
vo:IValueObject |
| setEventTypeBEFORE_CHANGE | () | method |
public function setEventTypeBEFORE_CHANGE(type:String):void
Returns the event name use in the setCurrentVO method before is changed.
type:String |
| setEventTypeCHANGE | () | method |
public function setEventTypeCHANGE(type:String):void
Returns the event name use in the setVO method.
type:String |
| setEventTypeCLEAR | () | method |
public function setEventTypeCLEAR(type:String):void
Returns the event name use in the clear method.
type:String |
| supports | () | method |
public function supports(value:*):Boolean
Returns true if the IValidator object validate the value. Overrides this method in your concrete IModelObject class.
value:* — the object to test.
|
Boolean — true is this specific value is valid.
|
| validate | () | method |
public function validate(value:*):voidEvaluates the condition it checks and updates the IsValid property.
Parametersvalue:* |