Index: DCWoRMS/trunk/src/gssim/schedframe/scheduling/ExecTask.java
===================================================================
--- DCWoRMS/trunk/src/gssim/schedframe/scheduling/ExecTask.java	(revision 481)
+++ 	(revision )
@@ -1,15 +1,0 @@
-package gssim.schedframe.scheduling;
-
-import java.util.List;
-
-import schedframe.scheduling.tasks.TaskInterface;
-import schedframe.scheduling.tasks.requirements.ResourceParameterName;
-
-public interface ExecTask extends TaskInterface<org.qcg.broker.schemas.resreqs.Task> {
-
-	public boolean expectSpecificResource(ResourceParameterName resourceName);	
-	public Object getExpectedSpecificResource(ResourceParameterName resourceName);
-
-	public void visitResource(String resName);
-	public List<String> getVisitedResources();
-}
Index: DCWoRMS/trunk/src/gssim/schedframe/scheduling/Executable.java
===================================================================
--- DCWoRMS/trunk/src/gssim/schedframe/scheduling/Executable.java	(revision 481)
+++ 	(revision )
@@ -1,366 +1,0 @@
-package gssim.schedframe.scheduling;
-
-
-import gridsim.GridSim;
-import gridsim.gssim.DCWormsTags;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.commons.lang.ArrayUtils;
-import org.joda.time.DateTime;
-import org.joda.time.DateTimeUtilsExt;
-import org.joda.time.ReadableDuration;
-
-import schedframe.resources.computing.ComputingResource;
-import schedframe.resources.units.ProcessingElements;
-import schedframe.resources.units.StandardResourceUnitName;
-import schedframe.scheduling.ResourceHistoryItem;
-import schedframe.scheduling.UsedResourceList;
-import schedframe.scheduling.WorkloadUnitHandler;
-import schedframe.scheduling.manager.tasks.JobRegistryImpl;
-import schedframe.scheduling.tasks.AbstractProcesses;
-import schedframe.scheduling.tasks.AbstractProcessesGroup;
-import schedframe.scheduling.tasks.Task;
-import schedframe.scheduling.tasks.requirements.ResourceParameterName;
-
-/**
- * 
- * @author Marcin Krystek
- *
- */
-public class Executable implements ExecTask{
-
-	protected Task task;
-	protected String processesSetId;
-	
-	protected int status; 
-	protected double length;
-	protected Map<ResourceParameterName, Object> specificResources;
-	
-	protected String reservationId;
-	protected double completionPercentage;
-	
-	protected int estimatedDuration;
-	//TO DO remove and benefit from visitedResources
-	protected String schedName;
-	protected UsedResourceList<ResourceHistoryItem> usedResources;
-	//TO DO consider removing
-	protected List<String> visitedResources;
-
-	protected double submissionTime;
-    protected double arrivalTime;
-	protected double execStartTime ;
-    protected double totalCompletionTime; 
-	protected double finishTime; 
-	
-	public Executable(Task t){
-		this.task = t;
-		this.status = DCWormsTags.CREATED;
-		
-		this.usedResources = new UsedResourceList<ResourceHistoryItem>();
-		this.visitedResources = new ArrayList<String>();
-		init();
-	}
-	
-	public Executable(Task t, AbstractProcesses procesesSet){
-		this.task = t;
-		this.status = DCWormsTags.CREATED;
-		this.processesSetId = procesesSet.getId(); 
-		
-		this.usedResources = new UsedResourceList<ResourceHistoryItem>();
-		this.visitedResources = new ArrayList<String>();
-		init();
-	}
-	
-	protected void init() {
-		double currentTime =  DateTimeUtilsExt.getDateTimeAt(arrivalTime).getMillis() / 1000;
-		this.submissionTime =  currentTime;
-        this.totalCompletionTime = 0.0;
-	 }
-	
-	public int getUserId() {
-		return task.getSenderId();
-	}
-	public String getUserDN() {
-		return task.getUserDN();
-	}
-
-	public String getJobId() {
-		return task.getJobId();
-	}
-	
-	public String getTaskId(){
-		return this.task.getId();
-	}
-	
-	public String getId() {
-		if(processesSetId == null)
-			return task.getId();
-		else 
-			return task.getId() + "_" + processesSetId;
-	}
-	
-	public String getProcessesId(){
-		return this.processesSetId;
-	}
-	
-    public int getUniqueId(){
-    	if(processesSetId == null){
-    		return (task.getJobId() + "_" + task.getId()).hashCode();
-    	} else {
-    		return (task.getJobId() + "_" + task.getId() + "_" + processesSetId).hashCode();
-    	}
-    }
-    
-	public List<AbstractProcesses> getProcesses() {
-		return task.getProcesses();
-	}
-
-	public List<AbstractProcesses> getProcesses(
-			AbstractProcessesGroup processGroup) {
-		return task.getProcesses(processGroup);
-	}
-
-	public List<AbstractProcessesGroup> getProcessesGroups() {
-		return task.getProcessesGroups();
-	}
-
-	public org.qcg.broker.schemas.resreqs.Task getDescription() {
-		return task.getDescription();
-	}
-
-	public String getDocument() throws Exception {
-		return task.getDocument();
-	}
-	
-	public long getLength() {
-		return task.getLength();
-	}
-
-	public int getStatus() {
-		return status;
-	}
-	
-	public boolean isFinished()
-    {
-		return task.isFinished();
-    }
-	
-	public void setStatus(int newStatus) throws Exception {
-		int prevStatus = status;
-	    
-        if (status == newStatus) {
-            return;
-        }
-
-        if (newStatus < DCWormsTags.CREATED || newStatus > DCWormsTags.FAILED_RESOURCE_UNAVAILABLE)
-        {
-            throw new Exception("Gridlet.setGridletStatus() : Error - " +
-                    "Invalid integer range for Gridlet status.");
-        }
-
-        status = newStatus;
-        double currentTime = DateTimeUtilsExt.currentTimeMillis() / 1000; // time in seconds 
-    
-		
-		if (newStatus == DCWormsTags.SUCCESS || newStatus == DCWormsTags.CANCELED) {
-            finishTime = DateTimeUtilsExt.currentTimeMillis() / 1000;
-        }
-		
-		if(newStatus == DCWormsTags.SUBMITTED){
-			 arrivalTime = GridSim.clock();
-		}
-
-        if (prevStatus == DCWormsTags.INEXEC)
-        {
-
-            if (status == DCWormsTags.CANCELED || status == DCWormsTags.PAUSED ||
-                status == DCWormsTags.SUCCESS)
-            {
-                totalCompletionTime += (currentTime -  execStartTime);
-            }
-        }
-
-        if (prevStatus == DCWormsTags.RESUMED && status == DCWormsTags.SUCCESS)
-        {
-            totalCompletionTime += (currentTime -  execStartTime);
-        }
-
-        if (status == DCWormsTags.INEXEC ||
-            (prevStatus == DCWormsTags.PAUSED && status == DCWormsTags.RESUMED) )
-        {
-        	execStartTime = currentTime;
-    		ProcessingElements pes = (ProcessingElements) getUsedResources().getLast().getResourceUnits().get(StandardResourceUnitName.PE);
-    		for (ComputingResource resource : pes) {
-
-    			visitResource(resource.getName());
-    			ComputingResource parent = resource.getParent();
-
-				List<String> visitedResource = getVisitedResources();
-    			while (parent != null && !ArrayUtils.contains(visitedResource.toArray(new String[visitedResource.size()]), parent.getName())) {
-    				visitResource(parent.getName());
-    				parent = parent.getParent();
-    			}
-    		}
-        }
-	}
-	
-	public void addSpecificResource(ResourceParameterName resourceName, Object value){
-		if(this.specificResources == null)
-			this.specificResources = new HashMap<ResourceParameterName, Object>();
-		
-		this.specificResources.put(resourceName, value);
-	}
-
-	public boolean expectSpecificResource(ResourceParameterName resourceName){
-		if(this.specificResources == null)
-			return false;
-
-		return this.specificResources.containsKey(resourceName);
-	}
-	
-	public Object getExpectedSpecificResource(ResourceParameterName resourceName){
-		if(this.specificResources == null)
-			return null;
-		
-		return this.specificResources.get(resourceName);
-	}
-	
-	public void setReservationId(String reservationId){
-		this.reservationId = reservationId;
-	}
-	
-	public boolean requireReservation(){
-		return (reservationId != null);
-	}
-	
-	public String getReservationId(){
-		return this.reservationId;
-	}
-	
-	public double getCompletionPercentage() {
-		return completionPercentage;
-	}
-
-	public void setCompletionPercentage(double completionPercentage) {
-		this.completionPercentage = completionPercentage;
-	}
-
-	public void addUsedResources(ResourceHistoryItem usedResources){
-		this.usedResources.add(usedResources);
-	}
-	
-	public UsedResourceList<ResourceHistoryItem> getUsedResources(){
-		return this.usedResources;
-	}
-	
-    public void setSchedulerName(int resourceId)
-    {
-        this.schedName = GridSim.getEntityName(resourceId);
-    }
-
-    public String getSchedulerName()
-    {
-        return schedName;
-    }
-	
-	public int getEstimatedDuration(){
-		return this.estimatedDuration;
-	}
-	
-	public void setEstimatedDuration(int value){
-		this.estimatedDuration = value;
-	}
-
-	public boolean isRegistered() {
-		return task.isRegistered();
-	}
-
-	public void register(JobRegistryImpl jobRegistry) {
-		task.register(jobRegistry);
-	}
-	
-	public void visitResource(String resName){
-		visitedResources.add(resName);
-	}
-	
-	public List<String> getVisitedResources(){
-		return visitedResources;
-	}
-	
-	public ReadableDuration getExpectedDuration() throws NoSuchFieldException {
-		return task.getExpectedDuration();
-	}
-
-	public double getParameterDoubleValue(ResourceParameterName parameterName)
-			throws NoSuchFieldException, IllegalArgumentException {
-		return task.getParameterDoubleValue(parameterName);
-	}
-
-	public String getParameterStringValue(ResourceParameterName parameterName)
-			throws NoSuchFieldException, IllegalArgumentException {
-		return task.getParameterStringValue(parameterName);
-	}
-	
-	public double getCpuCntRequest() throws NoSuchFieldException{
-		return getParameterDoubleValue(ResourceParameterName.CPUCOUNT);
-	}
-	
-	public double getMemoryRequest() throws NoSuchFieldException{
-		return getParameterDoubleValue(ResourceParameterName.MEMORY);
-	}
-	
-	public DateTime getExecutionEndTime() throws NoSuchFieldException {
-		return task.getExecutionEndTime();
-	}
-
-	public DateTime getExecutionStartTime() throws NoSuchFieldException {
-		return task.getExecutionStartTime();
-	}
-
-	public DateTime getSubmissionTimeToBroker() {
-		return task.getSubmissionTimeToBroker();
-	}
-
-	public long getWorkloadLogWaitTime() {
-		return task.getWorkloadLogWaitTime();
-	}
-
-    public double getExecStartTime() {
-        return execStartTime;
-    }
-
-    public double getFinishTime() {
-        return finishTime;
-    }
-
-    public double getSubmissionTime() {
-        return submissionTime;
-    }
-    
-    public double getWaitingTime()
-    {
-        return execStartTime - submissionTime;
-    }
-
-    
-    public void finalizeExecutable(){
-
-    }
-    
-	public void accept(WorkloadUnitHandler wuh) {
-		wuh.handleExecutable(this);
-	}
-    
-	public boolean equals(Object obj){
-		if(obj instanceof Executable){
-			Executable t = (Executable) obj;
-			return getId().equals(t.getId());
-		}
-		return false;
-	}
-
-}
