/*
 * @(#)ICommandMediator.java	1.0 11-Apr-07
 *
 * IIT Bombay, 
 * Licensed under a Creative Commons Attribution-Noncommercial-Share Alike 2.5 License.
 */
package interfaces;

import types.Command;

/**
 * Interface for command mediator object to collect the 
 * commands from the colleague objects
 *
 * @author  Prathab
 * @version 1.0, 25-Mar-07
 * @see interfaces.CommandColleague
 */
public interface ICommandMediator {
	
	/**
	 * Sends the command to the mediator object
	 * @param command the <tt>Command</tt> object that to be sent
	 * @param toPermanent whether the command object need to be maintained permanently
	 */
	public void sendCommand(Command command, boolean toPermanent);
	
	/**
	 * Sends the command to the mediator object
	 * @param command the <tt>Command</tt> object that to be sent
	 */
	public void sendCommand(Command command);
	
	/**
	 * Add the specified object to the mediator object directly 
	 * without encapsulating it as a command object
	 * @param obj the <tt>Object</tt> that to be added
	 */
	public void addObject(Object obj);
	
	/**
	 * Removes the added object in the mediator object
	 * @param obj the <tt>Object</tt> that to be removed
	 * @return <tt>true</tt> if object is removed
	 */
	public boolean removeObject(Object obj);

}
