示例#1
0
 /**
  * Returns the groups that match the search given a start index and desired number of results. The
  * search is over group names and implicitly uses wildcard matching (although the exact search
  * semantics are left up to each provider implementation). For example, a search for "HR" should
  * match the groups "HR", "HR Department", and "The HR People".
  *
  * <p>Before searching or showing a search UI, use the {@link #isSearchSupported} method to ensure
  * that searching is supported.
  *
  * @param query the search string for group names.
  * @return all groups that match the search.
  */
 public Collection<Group> search(String query, int startIndex, int numResults) {
   Collection<String> groupNames = provider.search(query, startIndex, numResults);
   return new GroupCollection(groupNames);
 }
示例#2
0
 /**
  * Returns the groups that match the search. The search is over group names and implicitly uses
  * wildcard matching (although the exact search semantics are left up to each provider
  * implementation). For example, a search for "HR" should match the groups "HR", "HR Department",
  * and "The HR People".
  *
  * <p>Before searching or showing a search UI, use the {@link #isSearchSupported} method to ensure
  * that searching is supported.
  *
  * @param query the search string for group names.
  * @return all groups that match the search.
  */
 public Collection<Group> search(String query) {
   Collection<String> groupNames = provider.search(query);
   return new GroupCollection(groupNames);
 }