} }
if (persistEarly) { boolean s1Done = false; Enumeration changedPEs = myGLSExpansions.getChangedList(); while ( changedPEs.hasMoreElements() ) { Expansion pe = (Expansion) changedPEs.nextElement();  if (PluginHelper.checkChangeReports(myGLSExpansions.getChangeReports(pe), PlanElement.ReportedResultChangeReport.class)) {  if (pe.getEstimatedResult() != null && pe.getEstimatedResult().getConfidenceRating() == 1.0) { if (logger.isDebugEnabled()) logger.debug("A GLS Expansion changed RepResult, now has conf 1: " + pe); Task task = pe.getTask(); if (task == null) { if (logger.isInfoEnabled()) logger.info("Null task for GLSExpansion: " + pe); continue; }  SortedSet stages = (SortedSet) task .getPrepositionalPhrase(FOR_OPLAN_STAGES) .getIndirectObject(); if (stages == null || stages.isEmpty() || stages.size() != 2) {  if (logger.isDebugEnabled()) logger.debug("OplanStages say this is not stage 1: " + stages); } else {      if (myGLSTasks.size() != 1) { if (logger.isDebugEnabled()) logger.debug("I have more than the 1 GLS task?!?: " + myGLSTasks.size()); } else { if (logger.isDebugEnabled()) logger.debug("The only GLS for self has 2 stages and just changed its reported result and has a conf of 1: " + task); s1Done = true; break; } } } } }  if (s1Done) { if (logger.isDebugEnabled()) logger.debug("Stage1 GLS task Done propogating. Will persist."); persistEarly(); } } } }
  protected void execute() {        if (mySelfOrgs.hasChanged()) {      processOrgAssets(mySelfOrgs.getAddedList());    }        if (myRegisterServicesTasks == null) {      return; // Still waiting for ourself    }    if (myRegisterServicesTasks.hasChanged()) {      Collection adds = myRegisterServicesTasks.getAddedCollection();      if (logger.isDebugEnabled()) {        logger.debug("Expanding " + adds.size()                     + " PropagateRegisterServices tasks");      }      handleNewTasks(adds);      Collection changes = myRegisterServicesTasks.getChangedCollection();      handleChangedTasks(changes);    }    if (myFindProvidersTasks.hasChanged()) {      Collection adds = myFindProvidersTasks.getAddedCollection();      if (logger.isDebugEnabled()) {        logger.debug("Expanding " + adds.size()                     + " PropagateFindProviders tasks");      }      handleNewTasks(adds);      Collection changes = myFindProvidersTasks.getChangedCollection();      handleChangedTasks(changes);    }    if (myGLSTasks.hasChanged()) {      Collection adds = myGLSTasks.getAddedCollection();      if (logger.isDebugEnabled()) {        logger.debug("Expanding " + adds.size()                     + " GLS tasks");      }      handleNewTasks(adds);      Collection changes = myGLSTasks.getChangedCollection();      handleChangedTasks(changes);    }    if (myRegisterServicesExpansions.hasChanged()) {      PluginHelper.updateAllocationResult(myRegisterServicesExpansions);    }    if (myFindProvidersExpansions.hasChanged()) {      PluginHelper.updateAllocationResult(myFindProvidersExpansions);    }    if (myGLSExpansions.hasChanged()) {      PluginHelper.updateAllocationResult(myGLSExpansions);    }  }