package tool.content;
import java.util.HashMap;
import org.eclipse.core.resources.IFolder;
import tool.model.SupplierPlan;
import tool.model.ToolPlan;
public class SupplierPlanFolder{
String planName = "";
IFolder planFolder;
HashMap<String, SupplierPlan> supplierPlans;
public SupplierPlanFolder(IFolder planFolder) {
super();
this.planFolder = planFolder;
planName = planFolder.getName();
}
public IFolder getPlanFolder() {
return planFolder;
}
public String getName(){
return "Supplier Plans";
}
public boolean contains(String planName){
ToolPlan plan = ToolPlan.fetch(planFolder);
return plan.getSupplierPlans().contains(planName);
}
public Object[] getChildren(){
ToolPlan plan = ToolPlan.fetch(planFolder);
return plan.getSupplierPlansAsList().toArray();
}
}