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

public abstract class WorkflowPackage extends WorkflowComplexComponent implements WorkflowXPDLComponent
{
	/** 
	 * Construct a new WorkflowComponenet.
	 */
	protected WorkflowPackage()
	{
		this(null, null);
	}
	
	/** 
	 * Construct a new WorkflowComponenet.
	 *
	 * @param uuid_ The element ID
	 * @param name The element name
	 */
	protected WorkflowPackage(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 WorkflowPackage(String uuid_, String name, String description)
	{
		super(uuid_, name, description);
	}
	
	public abstract WorkflowPackageHeader getPackageHeader();
	public abstract void setPackageHeader(WorkflowPackageHeader header);

	public abstract List getApplications();
	public abstract void addApplication(WorkflowApplication app);
	public abstract WorkflowApplication removeApplication(WorkflowApplication app);
	public abstract WorkflowApplication findApplication(String appId);
	public abstract WorkflowApplication findApplication(String appNameOrID, boolean findByUUID);

	public abstract List getDataFields();
	public abstract void addDataField(WorkflowParameter param);
	public abstract WorkflowParameter removeDataField(WorkflowParameter param);
	public abstract WorkflowParameter findDataField(String paramId);
	public abstract WorkflowParameter findDataField(String paramNameOrID, boolean findByUUID);

	public abstract List getWorkflowProcesses();
	public abstract void addWorkflowProcess(WorkflowProcess process);
	public abstract WorkflowProcess removeWorkflowProcess(WorkflowProcess process);
	public abstract WorkflowProcess findWorkflowProcess(String processId);
	public abstract WorkflowProcess findWorkflowProcess(String processNameOrID, boolean findByUUID);
	public abstract WorkflowProcess getMainWorkflowProcess();

	public abstract WorkflowScript getScript();
	public abstract void setScript(WorkflowScript script);
}
