if((assets == null) || (assets.isEmpty())) { disposeOfTask(detReqTask); return; } ArrayList gpTasks = new ArrayList(); Iterator assetIT = assets.iterator(); while(assetIT.hasNext()) { Asset consumer = (Asset) assetIT.next(); NewTask gpTask = createGPTask(detReqTask, consumer); gpTasks.add(gpTask); } if(gpTasks.isEmpty()) { logger.warn("Cannot expand - no subtasks for determine requirements task " + getTaskUtils().taskDesc(detReqTask)); } else { PlanElement pe = detReqTask.getPlanElement(); if((pe!=null) && (pe instanceof Disposition)) { dfPlugin.publishRemove(pe); pe = null; }  if(pe == null) { createAndPublishExpansion(detReqTask, gpTasks); }  else if(pe instanceof Expansion){ addToAndPublishExpansion(detReqTask,gpTasks); } else { logger.error("Unhandled plan element type on DetermineRequirementsTask :" + pe.getClass().getName()); } }
if((assets == null) || (assets.isEmpty())) { disposeOfTask(detReqTask); return;
    public void expandDetermineRequirements(Task detReqTask, Collection assets)    {	if((assets == null) || (assets.isEmpty())) {	    disposeOfTask(detReqTask);	    return;	}	ArrayList gpTasks = new ArrayList();	Iterator assetIT = assets.iterator();	while(assetIT.hasNext()) {	    Asset consumer = (Asset) assetIT.next();	    NewTask gpTask = createGPTask(detReqTask, consumer);	    gpTasks.add(gpTask);	}	if(gpTasks.isEmpty()) {	    logger.warn("Cannot expand - no subtasks for determine requirements task " 			+ getTaskUtils().taskDesc(detReqTask));	}	else {	    PlanElement pe = detReqTask.getPlanElement();	    if((pe!=null) && (pe instanceof Disposition)) {		dfPlugin.publishRemove(pe);		pe = null;	    }	    // First time through build a fresh expansion	    if(pe == null) {		createAndPublishExpansion(detReqTask, gpTasks);	    }	    // There are new assets to add to the expansion	    else if(pe instanceof Expansion){		addToAndPublishExpansion(detReqTask,gpTasks);	    }	    else {		logger.error("Unhandled plan element type on DetermineRequirementsTask :" + pe.getClass().getName());	    }	}	    	    }