< IFacade > Protocol Reference

#import <IFacade.h>

Inherited by Facade.

List of all members.

Public Member Functions

(BOOL) - hasCommand:
(BOOL) - hasMediator:
(BOOL) - hasProxy:
(void) - notifyObservers:
(void) - registerCommand:commandClassRef:
(void) - registerMediator:
(void) - registerProxy:
(void) - removeCommand:
(id< IMediator >) - removeMediator:
(id< IProxy >) - removeProxy:
(id< IMediator >) - retrieveMediator:
(id< IProxy >) - retrieveProxy:
(void) - sendNotification:body:type:


Detailed Description

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

Member Function Documentation

- (BOOL) hasCommand: (NSString *)  notificationName  

Check if a Command is registered for a given Notification

Parameters:
notificationName 
Returns:
whether a Command is currently registered for the given notificationName.

Reimplemented in Facade.

- (BOOL) hasMediator: (NSString *)  mediatorName  

Check if a Mediator is registered or not

Parameters:
mediatorName 
Returns:
whether a Mediator is registered with the given mediatorName.

Reimplemented in Facade.

- (BOOL) hasProxy: (NSString *)  proxyName  

Check if a Proxy is registered

Parameters:
proxyName 
Returns:
whether a Proxy is currently registered with the given proxyName.

Reimplemented in Facade.

- (void) notifyObservers: (id< INotification >)  notification  

Notify the IObservers for a particular INotification.

All previously attached IObservers for this INotification's list are notified and are passed a reference to the INotification in the order in which they were registered.

NOTE: Use this method only if you are sending custom Notifications. Otherwise use the sendNotification method which does not require you to create the Notification instance.

Parameters:
notification the INotification to notify IObservers of.

Reimplemented in Facade.

- (void) registerCommand: (NSString *)  notificationName
commandClassRef: (Class)  commandClassRef 

Register an ICommand with the Controller.

Parameters:
notificationName the name of the INotification to associate the ICommand with.
commandClassRef a reference to the Class of the ICommand.

Reimplemented in Facade.

- (void) registerMediator: (id< IMediator >)  mediator  

Register an IMediator instance with the View.

Parameters:
mediator a reference to the IMediator instance

Reimplemented in Facade.

- (void) registerProxy: (id< IProxy >)  proxy  

Register an IProxy instance with the Model.

Parameters:
proxy the IProxy to be registered with the Model.

Reimplemented in Facade.

- (void) removeCommand: (NSString *)  notificationName  

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

Parameters:
notificationName the name of the INotification to remove the ICommand mapping for

Reimplemented in Facade.

- (id<IMediator>) removeMediator: (NSString *)  mediatorName  

Remove a IMediator instance from the View.

Parameters:
mediatorName name of the IMediator instance to be removed.
Returns:
the IMediator instance previously registered with the given mediatorName.

Reimplemented in Facade.

- (id<IProxy>) removeProxy: (NSString *)  proxyName  

Remove an IProxy instance from the Model by name.

Parameters:
proxyName the IProxy to remove from the Model.
Returns:
the IProxy that was removed from the Model

Reimplemented in Facade.

- (id<IMediator>) retrieveMediator: (NSString *)  mediatorName  

Retrieve an IMediator instance from the View.

Parameters:
mediatorName the name of the IMediator instance to retrievve
Returns:
the IMediator previously registered with the given mediatorName.

Reimplemented in Facade.

- (id<IProxy>) retrieveProxy: (NSString *)  proxyName  

Retrieve a IProxy from the Model by name.

Parameters:
proxyName the name of the IProxy instance to be retrieved.
Returns:
the IProxy previously regisetered by proxyName with the Model.

Reimplemented in Facade.

- (void) sendNotification: (NSString *)  notificationName
body: (id)  body
type: (NSString *)  type 

Create and send an INotification.

Parameters:
notificationName the name of the notiification to send
body the body of the notification
type the type of the notification

Reimplemented in Facade.


Generated on Wed Dec 24 14:19:08 2008 for PureMVC Objective-C by  doxygen 1.5.7.1