//----------------------------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.WorkflowComplexComponent;
import org.huihoo.workflow.WorkflowXPDLComponent;
import org.huihoo.workflow.event.WorkEventListener;
import org.huihoo.workflow.xpdl.activity.ActivityType;
import org.huihoo.workflow.xpdl.activity.Implementation;
import org.huihoo.workflow.xpdl.activity.JoinType;
import org.huihoo.workflow.xpdl.activity.PerformerMode;
import org.huihoo.workflow.xpdl.activity.PerformerType;
import org.huihoo.workflow.xpdl.activity.SplitType;
import org.huihoo.workflow.xpdl.util.Duration;

public  abstract  class WorkflowActivity extends WorkflowComplexComponent implements WorkflowXPDLComponent
{  
	/** 
	 * Construct a new WorkflowComponenet.
	 */
	protected WorkflowActivity()
	{
		this(null, null);
	}
	
	/** 
	 * Construct a new WorkflowComponenet.
	 *
	 * @param uuid_ The element ID
	 * @param name The element name
	 */
	protected WorkflowActivity(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 WorkflowActivity(String uuid_, String name, String description)
	{
		super(uuid_, name, description);
	}
	
	
//------------------------------------------------------------------------------------------------
  public  abstract  Duration    getDuration();
  public  abstract  void        setDuration(Duration duration);
  public  abstract  void        setDuration(String duration);
  
  public  abstract  WorkflowProcess   getWorkflowProcess(); 
  public  abstract  void              setWorkflowProcess(WorkflowProcess workflowProcess);  
  
//------------------------------------------------------------------------------------------------
  public  abstract  List     getIncomingTransitions();
  public  abstract  void     addIncomingTransition(WorkflowTransition transition);
	public  abstract  WorkflowTransition     removeIncomingTransition(WorkflowTransition transition);

  public  abstract  List     getValidIncomingTransitions();
  	
  public  abstract  List     getOutgoingTransitions();
	public  abstract  void     addOutgoingTransition(WorkflowTransition transition);
	public  abstract  WorkflowTransition     removeOutgoingTransition(WorkflowTransition transition);
	
	public  abstract  List     getValidOutgoingTransitions();  
	
	public  abstract  SplitType  getSplitType();
	public  abstract  void       setSplitType(SplitType splitType);
	public  abstract  void       setSplitType(String splitType);
	  
  public  abstract  JoinType  getJoinType();
  public  abstract  void      setJoinType(JoinType joinType);
  public  abstract  void      setJoinType(String joinType);
 
	public  abstract  ActivityType   getActivityType();
	public  abstract  void           setActivityType(ActivityType activityType);
	public  abstract  void           setActivityType(String activityType);
	 
//------------------------------------------------------------------------------------------------   
  public  abstract  Implementation   getImplementation();  
  public  abstract  void             setImplementation(Implementation impl); 
  
  public  abstract  List             getPerformers();
	public  abstract  void             addPerformer(String performerID);
	public  abstract  String           removePerformer(String performerID);
  public  abstract  void             parsePerformers(String performers);
  
  public  abstract  PerformerType    getPerformerType();
  public  abstract  void             setPerformerType(PerformerType performerType );
  

	public  abstract  PerformerMode    getPerformerMode();
	public  abstract  void             setPerformerMode(PerformerMode mode);
  
    
  public  abstract  void addWorkListener(WorkEventListener listener);
  public  abstract  void removeWorkListener(WorkEventListener listener);  
  public  abstract  WorkEventListener[] getWorkListeners(); 
  
	public  abstract  String  getListenerClassName();
	public  abstract  void    setListenerClassName(String className);
}
