/*
PureMVC - Copyright(c) 2006-08 Futurescale, Inc., Some rights reserved.
Your reuse is governed by the Creative Commons Attribution 3.0 United States License
*/
package org.puremvc.as3.interfaces
{
/**
* 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, IProxy
s 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.
*
*/
public interface IProxy
{
/**
* Get the Proxy name
*
* @return the Proxy instance name
*/
function getProxyName():String;
/**
* Set the data object
*
* @param data the data object
*/
function setData( data:Object ):void;
/**
* Get the data object
*
* @return the data as type Object
*/
function getData():Object;
/**
* Called by the Model when the Proxy is registered
*/
function onRegister( ):void;
/**
* Called by the Model when the Proxy is removed
*/
function onRemove( ):void;
}
}