/* 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 Controller. * *
* In PureMVC, an IController
implementor
* follows the 'Command and Controller' strategy, and
* assumes these responsibilities:
*
ICommand
s
* are intended to handle which INotifications
.IObserver
with
* the View
for each INotification
* that it has an ICommand
mapping for.ICommand
* to handle a given INotification
when notified by the View
.ICommand
's execute
* method, passing in the INotification
.ICommand
class as the handler
* for a particular INotification
.
*
* @param notificationName the name of the INotification
* @param commandClassRef the Class of the ICommand
*/
function registerCommand( notificationName : String, commandClassRef : Class ) : void;
/**
* Execute the ICommand
previously registered as the
* handler for INotification
s with the given notification name.
*
* @param notification the INotification
to execute the associated ICommand
for
*/
function executeCommand( notification : INotification ) : void;
/**
* Remove a previously registered ICommand
to INotification
mapping.
*
* @param notificationName the name of the INotification
to remove the ICommand
mapping for
*/
function removeCommand( notificationName : String ):void;
/**
* Check if a Command is registered for a given Notification
*
* @param notificationName
* @return whether a Command is currently registered for the given notificationName
.
*/
function hasCommand( notificationName:String ) : Boolean;
}
}