/*
 * Created on 2004-1-23
 *
 * To change the template for this generated file go to
 * Window - Preferences - Java - Code Generation - Code and Comments
 */
package workflow.wfmc.pm;

import java.util.Iterator;

import workflow.wfmc.xpdl.XPDLElement;




/**
 * @author reic
 *
 * To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Generation - Code and Comments
 */
public interface Group extends XPDLElement
{
  // ------------------------------------------------------------- Properties
	/**
	 * Set the department of this group.
	 *
	 * @param department The Department
	 */
	public void setDepartment(Department department);
	
	/**
	 * Return the Department of this group.
	 */
	public Department getDepartment();


	public boolean isInDepartment(Department departement);

	/**
	 * Set the leader of this group.
	 *
	 * @param president The leader
	 */
	public void setPresident(Participant president);
	

	/**
	 * Return the leader of this group.
	 */
	public Participant getPresident();

	
  /**
   * Return the set of {@link Participant}s that are members of this group.
   */
  public Iterator getParticipants();
	
  // --------------------------------------------------------- Public Method
  /**
   * Add a new {@link Participant} to this group.
   *
   * @param user The new user
   */
  public void addPaticipant(Participant user);
  
  /**
   * Remove a {@link Participant} from this group.
   *
   * @param user The old user
   */
  public void removeParticipant(Participant user);


  /**
   * Remove all {@link Participant}s from this group.
   */
  public void removeParticipants();
  
  /**
   * get group's parent, if not exist,return null.
   */
  public Group getParentGroup();
}
