Package com.atlassian.crowd.service
Interface DirectoryEntitySearchService
@ExperimentalApi
public interface DirectoryEntitySearchService
Interface for various user searches.
- Since:
- 3.3.0
-
Method Summary
Modifier and TypeMethodDescriptionList<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 matchinggroupsQuery.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 matchingusersQuery.
-
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 matchingusersQuery. Requires a user context, and only allows searches in directories that the current user can administer.- Parameters:
usersQuery- users querydirectoriesRestriction- 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.DirectoryNotFoundExceptioncom.atlassian.crowd.exception.OperationFailedExceptionIllegalAccessExceptioncom.atlassian.crowd.exception.UserNotFoundExceptioncom.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 querydirectoryId- directory id of the groupgroupName- group name- Returns:
- list of matching users with stable sort.
- Throws:
com.atlassian.crowd.exception.DirectoryNotFoundExceptioncom.atlassian.crowd.exception.GroupNotFoundExceptioncom.atlassian.crowd.exception.OperationFailedExceptioncom.atlassian.crowd.exception.UserNotFoundExceptioncom.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 matchinggroupsQuery. Requires a user context, and only allows searches in directories that the current user can administer.- Parameters:
groupsQuery- groups querydirectoriesRestriction- 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.DirectoryNotFoundExceptioncom.atlassian.crowd.exception.OperationFailedExceptionIllegalAccessExceptioncom.atlassian.crowd.exception.UserNotFoundExceptioncom.atlassian.crowd.exception.FeatureInaccessibleException
-