public class SingleDirectorySearchStrategy extends Object implements UserSearchStrategy, GroupSearchStrategy, MembershipSearchStrategy
SearchStrategy optimized for a single directory| Constructor and Description |
|---|
SingleDirectorySearchStrategy(DirectoryManager directoryManager,
long directoryId) |
| Modifier and Type | Method and Description |
|---|---|
<T> List<T> |
searchDirectGroupRelationships(MembershipQuery<T> query)
Searches for direct group relationships in any of the application's active assigned directories.
|
<T> List<T> |
searchGroups(EntityQuery<T> query)
Returns a
List<Group> or List<String> groupnames matching the search criteria defined in the query. |
<T> List<T> |
searchNestedGroupRelationships(MembershipQuery<T> query)
Searches for direct and indirect (nested) group relationships in any of the application's active assigned directories.
|
<T> List<T> |
searchUsers(EntityQuery<T> query)
Returns a
List<User> or List<String> matching the search criteria defined in the query. |
public SingleDirectorySearchStrategy(DirectoryManager directoryManager, long directoryId)
public <T> List<T> searchUsers(EntityQuery<T> query)
UserSearchStrategyList<User> or List<String> matching the search criteria defined in the query.
The users will be returned in a stable order including across pagination boundaries (excluding modification).
searchUsers in interface UserSearchStrategyquery - the search query.List<User> user objects or List<String> usernames, depending on the query.public <T> List<T> searchGroups(EntityQuery<T> query)
GroupSearchStrategyList<Group> or List<String> groupnames matching the search criteria defined in the query.
The groups will be returned in a stable order including across pagination boundaries (excluding modification).
searchGroups in interface GroupSearchStrategyquery - the search query.List<Group> group objects or List<String> groupnames, depending on the query.public <T> List<T> searchDirectGroupRelationships(MembershipQuery<T> query)
MembershipSearchStrategy
When searching for the groups an entity is a member of,
the membership aggregation semantic
will determine whether only the owning directory (when false) or all directories (when true) will be searched.
searchDirectGroupRelationships in interface MembershipSearchStrategyquery - membership query.User entities,
Group entities,
String usernames or String group names matching the query criteria.public <T> List<T> searchNestedGroupRelationships(MembershipQuery<T> query)
MembershipSearchStrategy
If the directory does not support nested groups, this call will be equivalent to DirectoryManager.searchDirectGroupRelationships(long, com.atlassian.crowd.search.query.membership.MembershipQuery).
WARNING: this method could be very slow if the underlying RemoteDirectory does not employ caching.
When searching for the groups a user is a member of only the directory of the user (as determined by findUserByName) is searched. When searching for memberships of a group or groups a group is a member of all directories are searched and the results amalgamated.
searchNestedGroupRelationships in interface MembershipSearchStrategyquery - membership query.User entities,
Group entities,
String usernames or String group names matching the query criteria.Copyright © 2019 Atlassian. All rights reserved.