PureMVC AS3 Framework - [Standard Version] | All Packages | All Classes | Index | Frames No Frames |
Interface IFacade

Package | org.puremvc.as3.interfaces
Interface | public interface IFacade extends INotifier
Implementors | Facade

The interface definition for a PureMVC Facade.

The Facade Pattern suggests providing a single class to act as a central point of communication for a subsystem.

In PureMVC, the Facade acts as an interface between the core MVC actors (Model, View, Controller) and the rest of your application.

See also

IModel
IView
IController
ICommand
INotification

Public Methods
Hide Inherited Public Methods
Show Inherited Public Methods

| Method | Defined by
--- | --- | ---
|  | hasCommand(notificationName:String):Boolean Check if a Command is registered for a given Notification | IFacade
|  | hasMediator(mediatorName:String):Boolean Check if a Mediator is registered or not | IFacade
|  | hasProxy(proxyName:String):Boolean Check if a Proxy is registered | IFacade
|  | registerCommand(noteName:String, commandClassRef:Class):void Register an `ICommand` with the `Controller`. | IFacade
|  | registerMediator(mediator:IMediator):void Register an `IMediator` instance with the `View`. | IFacade
|  | registerProxy(proxy:IProxy):void Register an `IProxy` with the `Model` by name. | IFacade
|  | removeCommand(notificationName:String):void Remove a previously registered `ICommand` to `INotification` mapping from the Controller. | IFacade
|  | removeMediator(mediatorName:String):IMediator Remove a `IMediator` instance from the `View`. | IFacade
|  | removeProxy(proxyName:String):IProxy Remove an `IProxy` instance from the `Model` by name. | IFacade
|  | retrieveMediator(mediatorName:String):IMediator Retrieve an `IMediator` instance from the `View`. | IFacade
|  | retrieveProxy(proxyName:String):IProxy Retrieve a `IProxy` from the `Model` by name. | IFacade
|  | sendNotification(notificationName:String, body:Object = null, type:String = null):void Send a `INotification`. | INotifier

Method detail

hasCommand | () | method

`public function hasCommand(notificationName:String):Boolean`

Check if a Command is registered for a given Notification

Parameters

| `notificationName:String`

Returns

| `Boolean` — whether a Command is currently registered for the given `notificationName`.

hasMediator | () | method |

`public function hasMediator(mediatorName:String):Boolean`

Check if a Mediator is registered or not

Parameters

| `mediatorName:String`

Returns

| `Boolean` — whether a Mediator is registered with the given `mediatorName`.

hasProxy | () | method |

`public function hasProxy(proxyName:String):Boolean`

Check if a Proxy is registered

Parameters

| `proxyName:String`

Returns

| `Boolean` — whether a Proxy is currently registered with the given `proxyName`.

registerCommand | () | method |

`public function registerCommand(noteName:String, commandClassRef:Class):void`

Register an `ICommand` with the `Controller`.

Parameters

| `noteName:String` — the name of the `INotification` to associate the `ICommand` with.
| `commandClassRef:Class` — a reference to the `Class` of the `ICommand`.

registerMediator | () | method |

`public function registerMediator(mediator:IMediator):void`

Register an `IMediator` instance with the `View`.

Parameters

| `mediator:IMediator` — a reference to the `IMediator` instance

registerProxy | () | method |

`public function registerProxy(proxy:IProxy):void`

Register an `IProxy` with the `Model` by name.

Parameters

| `proxy:IProxy` — the `IProxy` to be registered with the `Model`.

removeCommand | () | method |

`public function removeCommand(notificationName:String):void`

Remove a previously registered `ICommand` to `INotification` mapping from the Controller.

Parameters

| `notificationName:String` — the name of the `INotification` to remove the `ICommand` mapping for

removeMediator | () | method |

`public function removeMediator(mediatorName:String):IMediator`

Remove a `IMediator` instance from the `View`.

Parameters

| `mediatorName:String` — name of the `IMediator` instance to be removed.

Returns

| `IMediator` — the `IMediator` instance previously registered with the given `mediatorName`.

removeProxy | () | method |

`public function removeProxy(proxyName:String):IProxy`

Remove an `IProxy` instance from the `Model` by name.

Parameters

| `proxyName:String` — the `IProxy` to remove from the `Model`.

Returns

| `IProxy` — the `IProxy` that was removed from the `Model`

retrieveMediator | () | method |

`public function retrieveMediator(mediatorName:String):IMediator`

Retrieve an `IMediator` instance from the `View`.

Parameters

| `mediatorName:String` — the name of the `IMediator` instance to retrievve

Returns

| `IMediator` — the `IMediator` previously registered with the given `mediatorName`.

retrieveProxy | () | method |

`public function retrieveProxy(proxyName:String):IProxy`

Retrieve a `IProxy` from the `Model` by name.

Parameters

| `proxyName:String` — the name of the `IProxy` instance to be retrieved.

Returns

| `IProxy` — the `IProxy` previously regisetered by `proxyName` with the `Model`.