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

Class IProxy

source code

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

The interface definition for a PureMVC Proxy.

In PureMVC, IProxy implementors assume these responsibilities:

Implement a common method which returns the name of the Proxy.

Provide methods for setting and getting the data object.

Additionally, IProxys typically:

Maintain references to one or more pieces of model data. Provide methods for manipulating that data. Generate INotifications when their model data changes. Expose their name as a public static const called NAME, if they are not instantiated multiple times. Encapsulate interaction with local or remote services used to fetch and persist model data.

Instance Methods [hide private]
 
getProxyName(self)
Get the Proxy name.
source code
 
setData(self, data)
Set the data object.
source code
 
getData(self)
Get the data object.
source code
 
onRegister(self)
Called by the Model when the Proxy is registered.
source code
 
onRemove(self)
Called by the Model when the Proxy is removed.
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]

getProxyName(self)

source code 

Get the Proxy name.

Raises NotImplemented if subclass does not implement this method.

Returns:
the Proxy instance name

setData(self, data)

source code 

Set the data object.

Raises NotImplemented if subclass does not implement this method.

Parameters:
  • data - the data object

getData(self)

source code 

Get the data object.

Raises NotImplemented if subclass does not implement this method.

Returns:
the data as type Object

onRegister(self)

source code 

Called by the Model when the Proxy is registered.

Raises NotImplemented if subclass does not implement this method.

onRemove(self)

source code 

Called by the Model when the Proxy is removed.

Raises NotImplemented if subclass does not implement this method.