Package com.atlassian.crowd.service
Interface DirectoryEntitySearchService
- All Known Implementing Classes:
DirectoryEntitySearchServiceImpl
@ExperimentalApi
public interface DirectoryEntitySearchService
Interface for various user searches.
- Since:
- 3.3.0
-
Method Summary
Modifier and TypeMethodDescriptionsearchGroups(EntityQuery<Group> groupsQuery, List<Directory> directoriesRestriction) Returns groups matchinggroupsQuery.searchPotentialMembers(EntityQuery<User> usersQuery, long directoryId, String groupName) Returns users that can be assigned as members of the specified group.searchUsers(EntityQuery<User> usersQuery, List<Directory> directoriesRestriction) Returns users matchingusersQuery.
-
Method Details
-
searchUsers
List<User> searchUsers(EntityQuery<User> usersQuery, List<Directory> directoriesRestriction) throws DirectoryNotFoundException, OperationFailedException, IllegalAccessException, UserNotFoundException, 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:
DirectoryNotFoundExceptionOperationFailedExceptionIllegalAccessExceptionUserNotFoundExceptionFeatureInaccessibleException
-
searchPotentialMembers
List<User> searchPotentialMembers(EntityQuery<User> usersQuery, long directoryId, String groupName) throws DirectoryNotFoundException, GroupNotFoundException, OperationFailedException, UserNotFoundException, 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:
DirectoryNotFoundExceptionGroupNotFoundExceptionOperationFailedExceptionUserNotFoundExceptionFeatureInaccessibleException
-
searchGroups
List<Group> searchGroups(EntityQuery<Group> groupsQuery, List<Directory> directoriesRestriction) throws DirectoryNotFoundException, OperationFailedException, IllegalAccessException, UserNotFoundException, 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:
DirectoryNotFoundExceptionOperationFailedExceptionIllegalAccessExceptionUserNotFoundExceptionFeatureInaccessibleException
-