//----------------------------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.workflow.server;

import org.huihoo.workflow.WorkflowComplexComponent;
import org.huihoo.workflow.WorkflowException;
import org.huihoo.workflow.usermodel.WorkflowParticipant;
import org.huihoo.workflow.xpdl.WorkflowActivity;



public abstract class WorkflowWork extends WorkflowComplexComponent
{
//------------------------------------------------------------
	public final static int DEFAULT_PRIORITY = 0;
//------------------------------------------------------------	
	/** 
	 * Construct a new WorkflowComponenet.
	 */
	protected WorkflowWork()
	{
		this(null, null);
	}
	
	/** 
	 * Construct a new WorkflowComponenet.
	 *
	 * @param uuid_ The element ID
	 * @param name The element name
	 */
	protected WorkflowWork(String uuid, String name)
	{
		this(uuid, name, null);
	}
	
	/** 
	 * Construct a new WorkflowComponenet.
	 *
	 * @param uuid_       The element ID
	 * @param name        The element name
	 * @param description The element description
	 */
	protected WorkflowWork(String uuid_, String name, String description)
	{
		super(uuid_, name, description);
	}
	
//-----------------------------------------------------------
  public abstract void       execute()  throws WorkflowException;
//-----------------------------------------------------------
  
  public abstract WorkflowCase         getCase();
  public abstract void                 setCase(WorkflowCase workflowCase);
  
  public abstract WorkflowActivity     getActivity();
  public abstract void                 setActivity(WorkflowActivity activity);
  
  public abstract WorkflowParticipant  getPerformer();
  public abstract void                 setPerformer(WorkflowParticipant performer);
  
  public abstract java.util.Date       getArriveTime();
  public abstract void                 setArriveTime(java.util.Date arriveTime);
  
  public abstract java.util.Date       getAcceptTime();
  public abstract void                 setAcceptTime(java.util.Date acceptTime);
  
  public abstract java.util.Date       getDispatchTime();
  public abstract void                 setDispatchTime(java.util.Date submitTime);
  
	public abstract int                  getPriority();
	public abstract void                 setPriority(int priority);

	public abstract int                  getEventType();
	public abstract void                 setEventType(int eventType);
		
  public abstract String               getUserObject();
  public abstract void                 setUserObject(String userObject);

//-----------------------------------------------------------
	public abstract WorkflowWork getParentWork();
	public abstract void         setParentWork(WorkflowWork parentWork);
	
}
