Collection alCommunities = communityService.listParentCommunities(getAgentIdentifier().toString(), "(CommunityType=AdaptiveLogistics)");
Collection alCommunities = communityService.listParentCommunities(getAgentIdentifier().toString(), "(CommunityType=AdaptiveLogistics)", null);
  public void execute() {    if (myOplanSubscription.getAddedCollection().size() > 0) {      CommunityService communityService =         (CommunityService) getBindingSite().getServiceBroker().getService(this, CommunityService.class, null);      if (communityService == null) {        myLoggingService.error("CommunityService not available.");        return;      }      Collection alCommunities = communityService.listParentCommunities(getAgentIdentifier().toString(), "(CommunityType=AdaptiveLogistics)");      if (alCommunities.size() == 0) {        myLoggingService.warn(getAgentIdentifier().toString() +                                      " does not belong to an AdaptiveLogistics community.");      }      for (Iterator iterator = alCommunities.iterator();           iterator.hasNext();) {        String community = (String) iterator.next();        LoadIndicator loadIndicator =           new LoadIndicator(this.getClass(),                             getAgentIdentifier().toString(),                            myUIDService.nextUID(),                            LoadIndicator.MODERATE_LOAD);        loadIndicator.addTarget(AttributeBasedAddress.getAttributeBasedAddress(community,                                                          "Role",                                                           "AdaptiveLogisticsManager"));        if (myLoggingService.isDebugEnabled()) {          myLoggingService.debug(getAgentIdentifier().toString() +                                  ": adding LoadIndicator to be sent to " +                                  loadIndicator.getTargets());        }        publishAdd(loadIndicator);      }    }    if (myGLSSubscription.getAddedCollection().size() > 0) {      for (Iterator iterator = myLoadIndicatorSubscription.getCollection().iterator();           iterator.hasNext();) {        LoadIndicator loadIndicator = (LoadIndicator) iterator.next();        loadIndicator.setLoadStatus(LoadIndicator.SEVERE_LOAD);        if (myLoggingService.isDebugEnabled()) {          myLoggingService.debug(getAgentIdentifier().toString() +                                  ": changing load status to SEVERE_LOAD for LoadIndicator to  " +                                  loadIndicator.getTargets());        }        publishChange(loadIndicator);      }    }    if (myLoggingService.isDebugEnabled()) {      for (Iterator iterator = myInterAgentOperatingModePolicySubscription.getAddedCollection().iterator();            iterator.hasNext();) {                myLoggingService.debug(getAgentIdentifier().toString() +                                ": new InterAgentOperatingModePolicy: " +                                ((InterAgentOperatingModePolicy) iterator.next()).toString());              }             for (Iterator iterator = myInterAgentOperatingModePolicySubscription.getChangedCollection().iterator();            iterator.hasNext();) {                myLoggingService.debug(getAgentIdentifier().toString() + ": modified InterAgentOperatingModePolicy: " +                                ((InterAgentOperatingModePolicy) iterator.next()).toString());      }            for (Iterator iterator = myInterAgentOperatingModePolicySubscription.getRemovedCollection().iterator();            iterator.hasNext();) {        myLoggingService.debug(getAgentIdentifier().toString() +                                ": removed InterAgentOperatingModePolicy: " +                                ((InterAgentOperatingModePolicy) iterator.next()).toString());              }     }  }