Packagevegas.models
Classpublic class CoreModelObject
InheritanceCoreModelObject Inheritance CoreModel Inheritance CoreEventDispatcher Inheritance Object
Implements ModelObject
Subclasses CollectionModelObject, MapModelObject, MediaExpert, PageableArrayModelObject, QueueModelObject, StackModelObject

This class provides a skeletal implementation of the IModelObject interface, to minimize the effort required to implement this interface.



Public Properties
 PropertyDefined By
 Inheritedchannel : String
[read-only] Indicates the channel of this dispatcher if this instance is global.
CoreEventDispatcher
 Inheritedid : *
Returns the id of this IModelObject.
CoreModel
  security : Boolean = true
This property defined if the setCurrentVO method can accept the same vo in argument as the current one.
CoreModelObject
Public Methods
 MethodDefined By
  
CoreModelObject(global:Boolean = true, channel:String = null, id:* = null)
Creates a new CoreModelObject instance.
CoreModelObject
 Inherited
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.
CoreModelObject
  
Returns and creates a new empty ModelObjectEvent.
CoreModelObject
 Inherited
dispatchEvent(event:Event):Boolean
Dispatches an event into the event flow.
CoreEventDispatcher
  
Returns the current ValueObject selected in this model.
CoreModelObject
 Inherited
Returns the internal system.events.EventDispatcher reference.
CoreEventDispatcher
  
Returns the event name use in the setCurrentVO method before is changed.
CoreModelObject
  
Returns the event name use in the setVO method.
CoreModelObject
  
Returns the event name use in the clear method.
CoreModelObject
 Inherited
hasEventListener(type:String):Boolean
Checks whether the EventDispatcher object has any listeners registered for a specific type of event.
CoreEventDispatcher
  
This method is invoked in the constructor of the class to initialize all events.
CoreModelObject
 Inherited
isGlobal():Boolean
Indicates if the dispatcher use a global event flow.
CoreEventDispatcher
 Inherited
isLocked():Boolean
Returns true if the object is locked.
CoreEventDispatcher
 Inherited
lock():void
Locks the object.
CoreEventDispatcher
  
Notify a ModelObjectEvent before the current ValueObject selected in the model is changed.
CoreModelObject
  
Notify a ModelObjectEvent when a ValueObject change in the model.
CoreModelObject
  
Notify a ModelObjectEvent when the model is cleared.
CoreModelObject
 Inherited
registerEventListener(type:String, listener:*, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Allows the registration of event listeners on the event target (Function or EventListener).
CoreEventDispatcher
 Inherited
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
Removes a listener from the EventDispatcher object.
CoreEventDispatcher
 Inherited
run(... arguments):void
Run the first process with this model.
CoreModel
  
Sets the current ValueObject selected in this model.
CoreModelObject
 Inherited
Sets the internal EventDispatcher reference.
CoreEventDispatcher
  
setEventTypeBEFORE_CHANGE(type:String):void
Returns the event name use in the setCurrentVO method before is changed.
CoreModelObject
  
setEventTypeCHANGE(type:String):void
Returns the event name use in the setVO method.
CoreModelObject
  
setEventTypeCLEAR(type:String):void
Returns the event name use in the clear method.
CoreModelObject
 Inherited
setGlobal(flag:Boolean = false, channel:String = null):void
Sets if the instance use a global system.events.EventDispatcher to dispatch this events, if the flag value is false the instance use a local EventDispatcher.
CoreEventDispatcher
  
supports(value:*):Boolean
Returns true if the IValidator object validate the value.
CoreModelObject
 Inherited
unlock():void
Unlocks the display.
CoreEventDispatcher
 Inherited
unregisterEventListener(type:String, listener:*, useCapture:Boolean = false):void
Removes a listener (Function or EventListener object) from the EventDispatcher object.
CoreEventDispatcher
  
validate(value:*):void
Evaluates the specified value and throw a TypeError object if the value is not valid.
CoreModelObject
 Inherited
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
Protected Methods
 MethodDefined By
 Inherited
Creates and returns the internal EventDispatcher reference (this method is invoked in the constructor).
CoreEventDispatcher
Property Detail
securityproperty
public var security:Boolean = true

This property defined if the setCurrentVO method can accept the same vo in argument as the current one.

Constructor Detail
CoreModelObject()Constructor
public function CoreModelObject(global:Boolean = true, channel:String = null, id:* = null)

Creates a new CoreModelObject instance.

Parameters
global:Boolean (default = true) — the flag to use a global event flow or a local event flow (default true).
 
channel:String (default = null) — the name of the global event flow if the global argument is true.
 
id:* (default = null) — the id of this model.
Method Detail
clear()method
public function clear():void

Clear the model.

createNewModelObjectEvent()method 
public function createNewModelObjectEvent(type:String, vo:ValueObject = null):ModelObjectEvent

Returns and creates a new empty ModelObjectEvent. You can override this method.

Parameters

type:String — the type of the event.
 
vo:ValueObject (default = null)

Returns
ModelObjectEvent — a new empty ModelObjectEvent with the type specified in argument.
getCurrentVO()method 
public function getCurrentVO():ValueObject

Returns the current ValueObject selected in this model.

Returns
ValueObject — the current ValueObject selected in this model.
getEventTypeBEFORE_CHANGE()method 
public function getEventTypeBEFORE_CHANGE():String

Returns the event name use in the setCurrentVO method before is changed.

Returns
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.

Returns
String — the event name use in the setVO method.
getEventTypeCLEAR()method 
public function getEventTypeCLEAR():String

Returns the event name use in the clear method.

Returns
String — the event name use in the clear method.
initEventType()method 
public function initEventType():void

This method is invoked in the constructor of the class to initialize all events. Overrides this method.

notifyBeforeChange()method 
public function notifyBeforeChange(vo:ValueObject):void

Notify a ModelObjectEvent before the current ValueObject selected in the model is changed.

Parameters

vo:ValueObject

notifyChange()method 
public function notifyChange(vo:ValueObject):void

Notify a ModelObjectEvent when a ValueObject change in the model.

Parameters

vo:ValueObject

notifyClear()method 
public function notifyClear():void

Notify a ModelObjectEvent when the model is cleared.

setCurrentVO()method 
public function setCurrentVO(vo:ValueObject):void

Sets the current ValueObject selected in this model.

Parameters

vo:ValueObject

setEventTypeBEFORE_CHANGE()method 
public function setEventTypeBEFORE_CHANGE(type:String):void

Returns the event name use in the setCurrentVO method before is changed.

Parameters

type:String

setEventTypeCHANGE()method 
public function setEventTypeCHANGE(type:String):void

Returns the event name use in the setVO method.

Parameters

type:String

setEventTypeCLEAR()method 
public function setEventTypeCLEAR(type:String):void

Returns the event name use in the clear method.

Parameters

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.

Parameters

value:* — the object to test.

Returns
Booleantrue is this specific value is valid.
validate()method 
public function validate(value:*):void

Evaluates the specified value and throw a TypeError object if the value is not valid.

Parameters

value:*


Throws
TypeError — if the value is not valid.