package com.ericfeminella.control
{
/**
*
* Provides a mechanism which facilitates view notification
* for CairngormEvent sub-classes which must dispatch result
* and fault events from which views of interest can register
* listeners and respond accordingly
*
* <p>
* clients are to Implement this interface when a command needs
* to notify a view or multiple views once Event processing and
* service result / fault handlers have been invoked.
* </p>
*
* <p>
* IViewNotifierEvent provides an interface to the conceptual
* view notification mechanism which can be found at:
* http://tech.groups.yahoo.com/group/cairngorm-documentation/message/221
* </p>
*
* @example An example implementation is as follows:
*
* <listing version="3.0" >
*
* package
* {
* import com.adobe.cairngorm.control.CairngormEvent;
*
* public class SampleEvent extends CairngormEvent implements IViewNotifierEvent
* {
* public static const SAMPLE_EVENT:String = "sample-event";
* public static const SAMPLE_EVENT_RESULT:String = "sample-result";
* public static const SAMPLE_EVENT_FAULT:String = "sample-fault";
*
* public function SampleEvent(type:String = null)
* {
* super( type );
* }
*
* public function dispatchResult() : void
* {
* new SampleEvent( SAMPLE_EVENT_RESULT ).dispatch();
* }
*
* public function dispatchFault() : void
* {
* new SampleEvent( SAMPLE_EVENT_FAULT ).dispatch();
* }
* }
* }
* </listing>
*
*/
public interface IViewNotifierEvent
{
/**
*
* Handles a CairngormEvent result by re-dispatching the event
* type back into the event flow
*
*/
function dispatchResult() : void
/**
*
* Handles a CairngormEvent fault by re-dispatching the event
* type back into the event flow
*
*/
function dispatchFault() : void
}
}