docs: @Override
      public EntityIdentifier[] searchForGroups(
              String query, IGroupConstants.SearchMethod method, Class leaftype)
              throws GroupsException {
          Set allIds = new HashSet();
  
          for (Iterator services = getComponentServices().values().iterator(); services.hasNext(); ) {
              IIndividualGroupService service = (IIndividualGroupService) services.next();
              EntityIdentifier[] ids = service.searchForGroups(query, method, leaftype);
              for (int i = 0; i < ids.length; i++) {
                  try {
                      CompositeEntityIdentifier cei =
                              new CompositeEntityIdentifier(ids[i].getKey(), ids[i].getType());
                      cei.setServiceName(service.getServiceName());
                      allIds.add(cei);
                  } catch (javax.naming.InvalidNameException ine) {
                  }
              }
          }
          return (EntityIdentifier[]) allIds.toArray(new EntityIdentifier[allIds.size()]);
      }