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

import java.util.ArrayList;
import java.util.List;

import org.huihoo.workflow.WorkflowException;
import org.huihoo.workflow.server.WorkflowWork;


public class ToolSet extends Implementation
{
  private List tools=new ArrayList();
  
  public ToolSet()
  {
  }
  
	public void execute(WorkflowWork workItem,ClassLoader loader)throws WorkflowException
	{
		int toolSize=tools.size();
		ToolImplementation toolImpl=null;
    
		for(int i=0;i<toolSize;++i)
		{
			toolImpl=(ToolImplementation)tools.get(i);
			toolImpl.execute(workItem,loader);
		}
	}
	
  public List getToolKits()
  {
    return tools;
  }
   
  public void addToolKit(ToolImplementation toolImpl)
  {
    tools.add(toolImpl);
  }  
}
