//----------------------------BEGIN LICENSE----------------------------
/* 
 * Willow : the Open Source WorkFlow Project
 * Distributable under GNU LGPL license by gun.org
 *
 * Copyright (C) 2004-2010 huihoo.org 
 * Copyright (C) 2004-2010  ZosaTapo <dertyang@hotmail.com> 
 * 
 * ====================================================================
 * Project Homepage : http://www.huihoo.org/willow
 * Source Forge     : http://sourceforge.net/projects/huihoo
 * Mailing list     : willow@lists.sourceforge.net 
 */
//----------------------------END  LICENSE----------------------------

package org.huihoo.willow.realm;

import java.util.Iterator;

import org.huihoo.workflow.usermodel.WorkflowDepartment;
import org.huihoo.workflow.usermodel.WorkflowGroup;
import org.huihoo.workflow.usermodel.WorkflowParticipant;
import org.huihoo.workflow.usermodel.WorkflowRank;
import org.huihoo.workflow.usermodel.WorkflowRole;

public class RealmParticipant extends  WorkflowParticipant
{
	/**
	 * The full name of this user.
	 */
	protected String fullName = null;

	/**
	 * The logon password of this user.
	 */
	protected transient String password = null;

	/**
	 * Package-private constructor used by the factory method in
	 * {@link WorkflowUserDatabase}.
	 *
	 * @param database The {@link WorkflowUserDatabase} that owns this user
	 * @param userid   Logon userid of the new user
	 * @param username Logon username of the new user
	 * @param password Logon password of the new user
	 * @param fullName Full name of the new user
	 */
	public RealmParticipant(String userid, String username, String password, String fullName)
	{
		this(userid, username, password, fullName, null);
	}
	
	public RealmParticipant(String userid, String username, String password, String fullName, String description)
	{
		super(userid, username);
		
		setFullName(fullName);
		setPassword(password);
		setDescription(description);
	}

	// ------------------------------------------------------------- Properties

	/**
	 * Return the full name of this user.
	 */
	public String getFullName()
	{
		return (this.fullName);
	}

	/**
	 * jSet the full name of this user.
	 *
	 * @param fullName The new full name
	 */
	public void setFullName(String fullName)
	{

		this.fullName = fullName;

	}

	/**
	 * Return the logon password of this user, optionally prefixed with the
	 * identifier of an encoding scheme surrounded by curly braces, such as
	 * <code>{md5}xxxxx</code>.
	 */
	public String getPassword()
	{

		return (this.password);

	}

	/**
	 * jSet the logon password of this user, optionally prefixed with the
	 * identifier of an encoding scheme surrounded by curly braces, such as
	 * <code>{md5}xxxxx</code>.
	 *
	 * @param password The new logon password
	 */
	public void setPassword(String password)
	{

		this.password = password;

	}

	/**
	 * Return the set of {@link Group}s to which this user belongs.
	 */
	public Iterator getGroups()
	{
		throw new java.lang.IllegalArgumentException();
	}
	// --------------------------------------------------------- Public Methods

	/**
	 * Add a new {@link Group} to those this user belongs to.
	 *
	 * @param group The new group
	 */
	public void addGroup(WorkflowGroup group)
	{
		throw new java.lang.IllegalArgumentException();
	}

	/**
	 * Is this user in the specified group?
	 *
	 * @param group The group to check
	 */
	public boolean isInGroup(WorkflowGroup group)
	{
		throw new java.lang.IllegalArgumentException();
	}

	/**
	 * Remove a {@link Group} from those this user belongs to.
	 *
	 * @param group The old group
	 */
	public void removeGroup(WorkflowGroup group)
	{
		throw new java.lang.IllegalArgumentException();
	}

	/**
	 * Remove all {@link Group}s from those this user belongs to.
	 */
	public void removeGroups()
	{
		throw new java.lang.IllegalArgumentException();
	}

	public WorkflowRank getRank()
	{
		throw new java.lang.IllegalArgumentException();
	}

	public void setRank(WorkflowRank userRank)
	{
		throw new java.lang.IllegalArgumentException();
	}

	public void setSuperAdministrator(boolean superAdministrator)
	{
		throw new java.lang.IllegalArgumentException();
	}

	public boolean isAdministrator(String packageID)
	{
		throw new java.lang.IllegalArgumentException();
	}

	public void addPackage(String packageID)
	{
		throw new java.lang.IllegalArgumentException();
	}

	/**
	 * Add a new {@link Department} to those this user belongs to.
	 *
	 * @param department The new department
	 */
	public void addDepartment(WorkflowDepartment department)
	{
		throw new java.lang.IllegalArgumentException();
	}

	/**
	 * Is this user in the specified department?
	 *
	 * @param department The department to check
	 */
	public boolean isInDepartment(WorkflowDepartment department)
	{
		throw new java.lang.IllegalArgumentException();
	}

	/**
	 * Remove a {@link Department} from those this user belongs to.
	 *
	 * @param department The old department
	 */
	public void removeDepartment(WorkflowDepartment department)
	{
		throw new java.lang.IllegalArgumentException();
	}

	/**
	 * Remove all {@link Department}s from those this user belongs to.
	 */
	public void removeDepartments()
	{
		throw new java.lang.IllegalArgumentException();
	}

	/**
	 * Add a new {@link WorkflowRole} to those this user belongs to.
	 *
	 * @param role The new role
	 */
	public void addRole(WorkflowRole role)
	{
		throw new java.lang.IllegalArgumentException();
	}

	/**
	 * Is this user in the specified role?
	 *
	 * @param role The role to check
	 */
	public boolean isInRole(WorkflowRole role)
	{
		throw new java.lang.IllegalArgumentException();
	}

	/**
	 * Remove a {@link WorkflowRole} from those this user belongs to.
	 *
	 * @param role The old role
	 */
	public void removeRole(WorkflowRole role)
	{
		throw new java.lang.IllegalArgumentException();
	}

	/**
	 * Remove all {@link WorkflowRole}s from those this user belongs to.
	 */
	public void removeRoles()
	{
		throw new java.lang.IllegalArgumentException();
	}

	/**
	 * Return the set of {@link Department}s to which this user belongs.
	 */
	public Iterator getDepartments()
	{
		throw new java.lang.IllegalArgumentException();
	}

	/**
	 * Return the set of {@link WorkflowRole}s to which this user belongs.
	 */
	public Iterator getRoles()
	{
		throw new java.lang.IllegalArgumentException();
	}
}
