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

Class IModel

source code

object --+
         |
        IModel
Known Subclasses:

The interface definition for a PureMVC Model.

In PureMVC, IModel implementors provide access to IProxy objects by named lookup.

An IModel assumes these responsibilities:

Maintain a cache of IProxy instances and Provide methods for registering, retrieving, and removing IProxy instances

Instance Methods [hide private]
 
registerProxy(self, proxy)
Register an IProxy instance with the Model.
source code
 
retrieveProxy(self, proxyName)
Retrieve an IProxy instance from the Model.
source code
 
removeProxy(self, proxyName)
Remove an IProxy instance from the Model.
source code
 
hasProxy(self, proxyName)
Check if a Proxy is registered.
source code

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]

registerProxy(self, proxy)

source code 

Register an IProxy instance with the Model.

Raises NotImplemented if subclass does not implement this method.

Parameters:
  • proxy - an object reference to be held by the Model.

retrieveProxy(self, proxyName)

source code 

Retrieve an IProxy instance from the Model.

Raises NotImplemented if subclass does not implement this method.

Parameters:
  • proxyName - the name to associate with this IProxy instance.
Returns:
the IProxy instance previously registered with the given proxyName.

removeProxy(self, proxyName)

source code 

Remove an IProxy instance from the Model.

Raises NotImplemented if subclass does not implement this method.

Parameters:
  • proxyName - name of the IProxy instance to be removed.
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 - name of the IProxy instance
Returns:
whether a Proxy is currently registered with the given proxyName.