Interface DirectoryEntitySearchService


@ExperimentalApi public interface DirectoryEntitySearchService
Interface for various user searches.
Since:
3.3.0
  • Method Summary

    Modifier and Type
    Method
    Description
    List<com.atlassian.crowd.model.group.Group>
    searchGroups(com.atlassian.crowd.search.query.entity.EntityQuery<com.atlassian.crowd.model.group.Group> groupsQuery, List<com.atlassian.crowd.embedded.api.Directory> directoriesRestriction)
    Returns groups matching groupsQuery.
    List<com.atlassian.crowd.model.user.User>
    searchPotentialMembers(com.atlassian.crowd.search.query.entity.EntityQuery<com.atlassian.crowd.model.user.User> usersQuery, long directoryId, String groupName)
    Returns users that can be assigned as members of the specified group.
    List<com.atlassian.crowd.model.user.User>
    searchUsers(com.atlassian.crowd.search.query.entity.EntityQuery<com.atlassian.crowd.model.user.User> usersQuery, List<com.atlassian.crowd.embedded.api.Directory> directoriesRestriction)
    Returns users matching usersQuery.
  • Method Details

    • searchUsers

      List<com.atlassian.crowd.model.user.User> searchUsers(com.atlassian.crowd.search.query.entity.EntityQuery<com.atlassian.crowd.model.user.User> usersQuery, List<com.atlassian.crowd.embedded.api.Directory> directoriesRestriction) throws com.atlassian.crowd.exception.DirectoryNotFoundException, com.atlassian.crowd.exception.OperationFailedException, IllegalAccessException, com.atlassian.crowd.exception.UserNotFoundException, com.atlassian.crowd.exception.FeatureInaccessibleException
      Returns users matching usersQuery. Requires a user context, and only allows searches in directories that the current user can administer.
      Parameters:
      usersQuery - users query
      directoriesRestriction - if not empty, search will be restricted to the specified directories
      Returns:
      list of matching users with stable sort. User existing in multiple directories won't be merged.
      Throws:
      com.atlassian.crowd.exception.DirectoryNotFoundException
      com.atlassian.crowd.exception.OperationFailedException
      IllegalAccessException
      com.atlassian.crowd.exception.UserNotFoundException
      com.atlassian.crowd.exception.FeatureInaccessibleException
    • searchPotentialMembers

      List<com.atlassian.crowd.model.user.User> searchPotentialMembers(com.atlassian.crowd.search.query.entity.EntityQuery<com.atlassian.crowd.model.user.User> usersQuery, long directoryId, String groupName) throws com.atlassian.crowd.exception.DirectoryNotFoundException, com.atlassian.crowd.exception.GroupNotFoundException, com.atlassian.crowd.exception.OperationFailedException, com.atlassian.crowd.exception.UserNotFoundException, com.atlassian.crowd.exception.FeatureInaccessibleException
      Returns users that can be assigned as members of the specified group.
      Parameters:
      usersQuery - users query
      directoryId - directory id of the group
      groupName - group name
      Returns:
      list of matching users with stable sort.
      Throws:
      com.atlassian.crowd.exception.DirectoryNotFoundException
      com.atlassian.crowd.exception.GroupNotFoundException
      com.atlassian.crowd.exception.OperationFailedException
      com.atlassian.crowd.exception.UserNotFoundException
      com.atlassian.crowd.exception.FeatureInaccessibleException
    • searchGroups

      List<com.atlassian.crowd.model.group.Group> searchGroups(com.atlassian.crowd.search.query.entity.EntityQuery<com.atlassian.crowd.model.group.Group> groupsQuery, List<com.atlassian.crowd.embedded.api.Directory> directoriesRestriction) throws com.atlassian.crowd.exception.DirectoryNotFoundException, com.atlassian.crowd.exception.OperationFailedException, IllegalAccessException, com.atlassian.crowd.exception.UserNotFoundException, com.atlassian.crowd.exception.FeatureInaccessibleException
      Returns groups matching groupsQuery. Requires a user context, and only allows searches in directories that the current user can administer.
      Parameters:
      groupsQuery - groups query
      directoriesRestriction - if not empty, search will be restricted to the specified directories
      Returns:
      list of matching groups with stable sort. Group existing in multiple directories won't be merged.
      Throws:
      com.atlassian.crowd.exception.DirectoryNotFoundException
      com.atlassian.crowd.exception.OperationFailedException
      IllegalAccessException
      com.atlassian.crowd.exception.UserNotFoundException
      com.atlassian.crowd.exception.FeatureInaccessibleException