Example #1
0
 /**
  * Returns an iterator for all groups that the entity with the specified JID is a member of.
  *
  * @param user the JID of the entity to get a list of groups for.
  * @return all groups that an entity belongs to.
  */
 public Collection<Group> getGroups(JID user) {
   // TODO: add caching
   return provider.getGroups(user);
 }
Example #2
0
 /**
  * Returns an iterator for all groups according to a filter.
  *
  * <p>This is useful to support pagination in a GUI where you may only want to display a certain
  * number of results per page. It is possible that the number of results returned will be less
  * than that specified by numResults if numResults is greater than the number of records left in
  * the system to display.
  *
  * @param startIndex start index in results.
  * @param numResults number of results to return.
  * @return an Iterator for all groups in the specified range.
  */
 public Collection<Group> getGroups(int startIndex, int numResults) {
   // TODO: add caching
   return provider.getGroups(startIndex, numResults);
 }