/* 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: *

* * @see org.puremvc.as3.interfaces INotification * @see org.puremvc.as3.interfaces ICommand */ public interface IController { /** * Register a particular 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 INotifications 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; } }