if((anyOplans != null) && (!(anyOplans.isEmpty())) && getBlackboardService().didRehydrate()) { getLogisticsOPlans(); doUpdateOplans();
oplans = (IncrementalSubscription)getBlackboardService().subscribe(new OplanPredicate());       if (! oplans.isEmpty()) { if (logger.isInfoEnabled()) logger.info(getAgentIdentifier() + ".setupSub: have oplans. Restoring hashes.");  Enumeration enum = oplans.elements(); while (enum.hasMoreElements()) { Oplan oplan = (Oplan)enum.nextElement(); UID oplanUID = oplan.getUID(); IncrementalSubscription oplanActivities = (IncrementalSubscription) orgActivitySubscriptionOfOPlanUID.get(oplanUID); if (oplanActivities == null) { oplanActivities = (IncrementalSubscription) getBlackboardService().subscribe(new OplanOrgActivitiesPredicate(oplanUID)); orgActivitySubscriptionOfOPlanUID.put(oplanUID, oplanActivities); }  }      Collection c = getBlackboardService().query(logisticsOPlanPredicate); for (Iterator i = c.iterator(); i.hasNext(); ) { LogisticsOPlan loplan = (LogisticsOPlan) i.next(); oplanHash.put(loplan.getOplanUID(), loplan); }
  protected void setupSubscriptions() {    oplans = (IncrementalSubscription)getBlackboardService().subscribe(new OplanPredicate());    selfOrganizations = (IncrementalSubscription) getBlackboardService().subscribe(orgsPredicate);    Collection anyOplans = getBlackboardService().query(new OplanPredicate());    if((anyOplans != null) &&       (!(anyOplans.isEmpty())) &&       getBlackboardService().didRehydrate()) {      getLogisticsOPlans();      doUpdateOplans();      publishLogOplanObjects();    }  }