Packagecom.bourre.model
Classpublic final class ModelLocator
InheritanceModelLocator Inheritance AbstractLocator

Player version: Flash Player 9.0
Language version: ActionScript 3.0

The ModelLocator class is a locator for AbstractModel object.

A locator is unique for a Plugin instance.

See also

AbstractModel


Protected Properties
 PropertyDefined by
 Inherited_m : HashMap
Map storing String keys associated with Object values.
AbstractLocator
Public Methods
 MethodDefined by
 Inherited
add(d:Dictionary):void
Adds all ressources contained in the passed-in dictionnary into this locator instance.
AbstractLocator
 Inherited
addEventListener(type:String, listener:Object, ... rest):Boolean
Adds an event listener for the specified event type.
AbstractLocator
 Inherited
callMethodOnAllValues(methodName:String, ... args):void
Takes all values of a Locator and call on each value the method name passed as 1st argument.
AbstractLocator
  
[static] Returns the unique ModelLocator instance for passed-in Plugin.
ModelLocator
 Inherited
getKeys():Array
Returns an Array view of the keys contained in this locator.
AbstractLocator
 Inherited
Returns the exclusive logger object owned by this locator.
AbstractLocator
  
getModel(key:String):AbstractModel
Returns AbstractModel registered with passed-in key identifier.
ModelLocator
  
Returns the plugin owner of this locator.
ModelLocator
 Inherited
getType():Class
Return the class type of elements in this container.
AbstractLocator
 Inherited
getValues():Array
Returns an Array view of the values contained in this locator.
AbstractLocator
 Inherited
isRegistered(name:String):Boolean
Returns true is there is a ressource associated with the passed-in key.
AbstractLocator
 Inherited
isTyped():Boolean
Returns true if this container perform a verification of the type of elements.
AbstractLocator
 Inherited
locate(name:String):Object
Returns the ressource associated with the passed-in key.
AbstractLocator
 Inherited
matchType(o:*):Boolean
Verify that the passed-in object type match the current container element's type.
AbstractLocator
 Inherited
processOnAllValues(f:Function, ... args):void
Takes all values of a Locator and pass them one by one as arguments to a method of an object.
AbstractLocator
 Inherited
register(name:String, o:Object):Boolean
Registers passed-in object with identifier name to this locator.
AbstractLocator
  
release():void
Clears all association between keys and objects registered for this locator.
ModelLocator
 Inherited
removeEventListener(type:String, listener:Object):Boolean
Removes the passed-in listener for listening the specified event.
AbstractLocator
  
toString():String
Returns the string representation of this instance.
ModelLocator
 Inherited
unregister(name:String):Boolean
Unregisters object registered with identifier name.
AbstractLocator
Protected Methods
 MethodDefined by
 Inherited
broadcastEvent(e:Event):void
Broadcast the passed-in event object to listeners according to the event's type.
AbstractLocator
 Inherited
Returns event Broadcaster owned by this locator.
AbstractLocator
 Inherited
onRegister(name:String = null, o:Object = null):void
Call this method to do something when an object is registered in locator.
AbstractLocator
 Inherited
onUnregister(name:String = null):void
Call this method to do something when an object is unregistered from locator.
AbstractLocator
Method detail
getInstance()method
public static function getInstance(owner:Plugin = null):ModelLocator

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Returns the unique ModelLocator instance for passed-in Plugin.

Parameters
owner:Plugin (default = null)

Returns
ModelLocator — The unique ModelLocator instance.
getModel()method 
public function getModel(key:String):AbstractModel

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Returns AbstractModel registered with passed-in key identifier.

Parameters
key:String — Model registration ID

Returns
AbstractModel

Throws
NoSuchElementException — There is no model associated with the passed-in key
getOwner()method 
public function getOwner():Plugin

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Returns the plugin owner of this locator.

Returns
Plugin — The plugin owner of this locator.
release()method 
public override function release():void

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Clears all association between keys and objects registered for this locator.

toString()method 
public override function toString():String

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Returns the string representation of this instance.

Returns
String — the string representation of this instance