/*
 * 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.store;

import java.util.Iterator;

import workflow.wfmc.pm.Department;
import workflow.wfmc.pm.Group;
import workflow.wfmc.pm.Participant;
import workflow.wfmc.pm.Role;


/**
 * @author reic
 *
 * To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Generation - Code and Comments
 */
public interface UserDatabase extends Database
{ 
  // ------------------------------------------------------------- Properties
  /**
   * Return the set of {@link Group}s defined in this user database.
   */
  public Iterator getGroups();

	/**
	 * Return the set of {@link Department}s defined in this user database.
	 */
	public Iterator getDepartments();

	/**
	 * Return the set of {@link Role}s defined in this user database.
	 */
	public Iterator getRoles();
		
  /**
   * Return the set of {@link Participant}s defined in this user database.
   */
  public Iterator getParticipants();


  /**
   * Return the {@link Group} with the specified group id, if any;
   * otherwise return <code>null</code>.
   *
   * @param groupid id of the group to return
   */
  public Group findGroup(String groupid);


	/**
	 * Return the {@link Department} with the specified Department id, if any;
	 * otherwise return <code>null</code>.
	 *
	 * @param departementid id of the Department to return
	 */
	public Department findDepartment(String departementid);
	
	/**
	 * Return the {@link Role} with the specified role id, if any;
	 * otherwise return <code>null</code>.
	 *
	 * @param roleid id of the Role to return
	 */
	public Role findRole(String roleid);
	
  /**
   * Return the {@link Participant} with the specified user name, if any;
   * otherwise return <code>null</code>.
   *
   * @param userid userid of the user to return
   */
  public Participant findParticipant(String userid);
 
}
