//----------------------------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.xpdl;

import java.util.List;

import org.huihoo.workflow.*;
import org.huihoo.workflow.event.CaseEventListener;



public abstract class WorkflowProcess extends WorkflowComplexComponent implements WorkflowXPDLComponent
{
	/** 
	 * Construct a new WorkflowComponenet.
	 */
	protected WorkflowProcess()
	{
		this(null,null);
	}
	
	/** 
	 * Construct a new WorkflowComponenet.
	 *
	 * @param uuid_ The element ID
	 * @param name The element name
	 */
	protected WorkflowProcess(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 WorkflowProcess(String uuid_, String name, String description)
	{
		super(uuid_, name, description);
	}
	
  //------------------------------------------------------------------
  public abstract WorkflowPackage             getWorkflowPackage();
  public abstract void                        setWorkflowPackage(WorkflowPackage workflowPackage);
  
  public abstract List                        getActivities();
  public abstract List                        getTransitions();
  
  public abstract WorkflowProcessHeader       getProcessHeader();
  public abstract void                        setProcessHeader(WorkflowProcessHeader processHeader);
  
  public abstract boolean                     isExpired();
  public abstract void                        setExpired(boolean expired);
  
  public abstract WorkflowActivity            findActivity(String activityId);
	public abstract WorkflowActivity            findActivity(String activityNameOrID,boolean findByUUID);  
	  
	public abstract WorkflowActivity            removeActivity(WorkflowActivity activity);  
	public abstract void                        addActivity(WorkflowActivity activity); 
		
  public abstract WorkflowTransition          findTransition(String transitionId);
	public abstract WorkflowTransition          findTransition(String transitionNameOrID,boolean findByUUID);  
	  
	public abstract WorkflowTransition          removeTransition(WorkflowTransition transition);  
	public abstract void                        addTransition(WorkflowTransition transition);     
  public abstract WorkflowTransition          findTransition(WorkflowActivity fromActivity,WorkflowActivity toActivity); 
	  
  public abstract void                        addCaseListener(CaseEventListener listener);
  public abstract void                        removeCaseListener(CaseEventListener listener);
  public abstract CaseEventListener[]      getCaseListeners(); 
  
	public abstract String  getListenerClassName();
	public abstract void    setListenerClassName(String className);
}
