Packageorg.servebox.foundry.model
Classpublic class ModelLocator

ModelLocator implements Singleton, this class is designed to store references to the models of an application



Protected Properties
 PropertyDefined by
  logger : ILogger
[static] The class logger.
ModelLocator
Public Methods
 MethodDefined by
  
Creates a new ModelLocator object.
ModelLocator
  
[static] Returns the isntace of the instace of the ModelLocator.
ModelLocator
  
getModel(id:String):AbstractModel
Gets a reference to a model with an id
ModelLocator
  
registerModel(id:String, model:AbstractModel):void
Registers a reference to the model with an id
ModelLocator
Property detail
loggerproperty
protected static var logger:ILogger

The class logger.

Constructor detail
ModelLocator()constructor
public function ModelLocator()

Creates a new ModelLocator object.

Method detail
getInstance()method
public static function getInstance():ModelLocator

Returns the isntace of the instace of the ModelLocator.

Returns
ModelLocator
getModel()method 
public function getModel(id:String):AbstractModel

Gets a reference to a model with an id

Parameters
id:String — give the id of the required model

Returns
AbstractModel
registerModel()method 
public function registerModel(id:String, model:AbstractModel):void

Registers a reference to the model with an id

Parameters
id:String — give an id to the model
 
model:AbstractModel — instance of the model