/*
 * Created on 2004-7-17
 *
 * 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.store.spi.SpiUserDatabase;
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 Department extends XPDLElement
{
	// ------------------------------------------------------------- Properties
	
	/**
	 * Return the Category of this department.
	 */
	public Category getCategory();


	/**
	 * Set the Category of this department.
	 *
	 * @param departCategory The new Category
	 */
	public void setCategory(Category departCategory);
	
	/**
	 * Return the {@link SpiUserDatabase} within which this Group is defined.
	 */
	public SpiUserDatabase getUserDatabase();


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

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

	
	/**
	 * Return the set of {@link Participant}s that are members of this department.
	 */
	public Iterator getParticipants();
	
	/**
	 * Return the set of {@link Group}s that are members of this department.
	 */
	public Iterator getGroups();
	
	// --------------------------------------------------------- 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();
  
	/**
	 * Add a new {@link Group} to this department.
	 *
	 * @param group The new group
	 */
	public void addGroup(Group group);
  
	/**
	 * Remove a {@link Group} from this department.
	 *
	 * @param group The old group
	 */
	public void removeGroup(Group group);


	/**
	 * Remove all {@link Group}s from this department.
	 */
	public void removeGroups();
	 
	/**
	 * get group's Department, if not exist,return null.
	 */
	public Department getParentDepartment();
}
