Package puremvc :: Module interfaces :: Class IFacade
[hide private]
[frames] | no frames]

Class IFacade

source code

object --+    
         |    
 INotifier --+
             |
            IFacade
Known Subclasses:

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
Instance Methods [hide private]
 
notifyObservers(self, note)
Notify the IObservers for a particular INotification.
source code
 
registerProxy(self, proxy)
Register an IProxy with the Model by name.
source code
 
retreieveProxy(self, proxyName)
Retrieve a IProxy from the Model by name.
 
removeProxy(self, proxyName)
Remove an IProxy instance from the Model by name.
source code
 
hasProxy(self, proxyName)
Check if a Proxy is registered.
source code
 
registerCommand(self, noteName, commandClassRef)
Register an ICommand with the Controller.
source code
 
removeCommand(self, notificationName)
Remove a previously registered ICommand to INotification mapping from the Controller.
source code
 
hasCommand(self, notificationName)
Check if a Command is registered for a given Notification.
source code
 
registerMediator(self, mediator)
Register an IMediator instance with the View.
source code
 
retreieveMediator(self, mediatorName)
Retrieve an IMediator instance from the View.
 
removeMediator(self, mediatorName)
Remove a IMediator instance from the View.
source code
 
hasMediator(self, mediatorName)
Check if a Mediator is registered or not.
source code
 
retrieveMediator(self, mediatorName)
Retrieve an IMediator instance from the View.
source code
 
retrieveProxy(self, proxyName)
Retrieve a IProxy from the Model by name.
source code

Inherited from INotifier: initializeNotifier, sendNotification

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

notifyObservers(self, note)

source code 

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:
  • note - the INotification to notify IObservers of.

registerProxy(self, proxy)

source code 

Register an IProxy with the Model by name.

Raises NotImplemented if subclass does not implement this method.

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

retreieveProxy(self, 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.

removeProxy(self, proxyName)

source code 

Remove an IProxy instance from the Model by name.

Raises NotImplemented if subclass does not implement this method.

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

hasProxy(self, proxyName)

source code 

Check if a Proxy is registered.

Raises NotImplemented if subclass does not implement this method.

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

registerCommand(self, noteName, commandClassRef)

source code 

Register an ICommand with the Controller.

Raises NotImplemented if subclass does not implement this method.

Parameters:
  • noteName - the name of the INotification to associate the ICommand with.
  • commandClassRef - a reference to the Class of the ICommand.

removeCommand(self, notificationName)

source code 

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

Raises NotImplemented if subclass does not implement this method.

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

hasCommand(self, notificationName)

source code 

Check if a Command is registered for a given Notification.

Raises NotImplemented if subclass does not implement this method.

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

registerMediator(self, mediator)

source code 

Register an IMediator instance with the View.

Raises NotImplemented if subclass does not implement this method.

Parameters:
  • mediator - a reference to the IMediator instance

retreieveMediator(self, 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.

removeMediator(self, mediatorName)

source code 

Remove a IMediator instance from the View.

Raises NotImplemented if subclass does not implement this method.

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

hasMediator(self, mediatorName)

source code 

Check if a Mediator is registered or not.

Raises NotImplemented if subclass does not implement this method.

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

retrieveMediator(self, mediatorName)

source code 

Retrieve an IMediator instance from the View.

Raises NotImplemented if subclass does not implement this method.

Parameters:
  • mediatorName - the name of the IMediator instance to retrieve
Returns:
the IMediator previously registered with the given mediatorName.

retrieveProxy(self, proxyName)

source code 

Retrieve a IProxy from the Model by name.

Raises NotImplemented if subclass does not implement this method.

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