@ 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 ( ) ] ) ; }
Find EntityIdentifiers for groups whose name matches the query string according to the specified method and matches the provided leaf type