Package | com.soma.core.mediator |
Class | public class SomaMediators |
Inheritance | SomaMediators ![]() |
Author: Romuald Quantin - www.soundstep.com
Resources: http://www.soundstep.com/downloads/somacore
Actionscript version: 3.0
Copyright: Mozilla Public License 1.1 (MPL 1.1) http://www.opensource.org/licenses/mozilla1.1.php
The SomaMediators class handles the mediators of the application. See the Mediator class documentation for implementation.See also
Method | Defined By | ||
---|---|---|---|
SomaMediators(instance:ISoma)
Create an instance of the SomaWires class. | SomaMediators | ||
dispose():void
Destroys all the mediators and properties. | SomaMediators | ||
getMediatorByView(view:Object):IMediator
Retrieves a mediator instance using its view. | SomaMediators | ||
hasMediator(view:Object):Boolean
Indicates wether a mediator has been created by the framework for a specific view. | SomaMediators | ||
isMapped(viewClass:Class):Boolean
Indicates wether a view Class has a mapping rule. | SomaMediators | ||
mapView(viewClass:Class, mediatorClass:Class):void
Map a mediator Class to a view Class. | SomaMediators | ||
removeMapping(viewClass:Class):void
Remove a mapping rule for a specific Class. | SomaMediators |
SomaMediators | () | Constructor |
public function SomaMediators(instance:ISoma)
Create an instance of the SomaWires class. Should not be directly instantiated, the framework will instantiate the class.
Parametersinstance:ISoma — Framework instance.
|
dispose | () | method |
public function dispose():void
Destroys all the mediators and properties. The class will call the dispose method of each mediator instance.
getMediatorByView | () | method |
public function getMediatorByView(view:Object):IMediator
Retrieves a mediator instance using its view.
Parameters
view:Object — View that the mediator represents.
|
IMediator — A mediator instance.
|
var mediator:MyViewMediator = mediators.getMediatorByView(myView) as MyViewMediator;
hasMediator | () | method |
public function hasMediator(view:Object):Boolean
Indicates wether a mediator has been created by the framework for a specific view.
Parameters
view:Object — View that the mediator represents.
|
Boolean — A Boolean.
|
mediators.hasMediator(myView);
isMapped | () | method |
public function isMapped(viewClass:Class):Boolean
Indicates wether a view Class has a mapping rule.
Parameters
viewClass:Class — A Class.
|
Boolean — A Boolean.
|
mediators.isMapped(MyView);
mapView | () | method |
public function mapView(viewClass:Class, mediatorClass:Class):void
Map a mediator Class to a view Class.
Parameters
viewClass:Class — A Class.
| |
mediatorClass:Class — A Class.
|
mediators.mapView(MyView, MyViewMediator);
removeMapping | () | method |
public function removeMapping(viewClass:Class):void
Remove a mapping rule for a specific Class.
Parameters
viewClass:Class — A Class.
|
mediators.removeMapping(MyView);