public abstract class AbstractInMemorySearchStrategy extends Object implements SearchStrategy
SearchStrategy
which searches across multiple directories in memory for users and groups
This is considered the worse case SearchStrategy
to use as aggregation across multiple directories
will be done in-memory, potentially consuming a lot of memory. This is the same (in spirit) as what Crowd 2.8
and earlier would do by default.
Modifier and Type | Field and Description |
---|---|
protected List<Directory> |
activeDirectories |
protected DirectoryManager |
directoryManager |
Constructor and Description |
---|
AbstractInMemorySearchStrategy(DirectoryManager directoryManager,
List<Directory> activeDirectories) |
Modifier and Type | Method and Description |
---|---|
protected <T> List<T> |
doDirectDirectoryMembershipQuery(MembershipQuery<T> query,
long directoryId)
Searches for direct group relationships in a single directory.
|
protected <T> List<T> |
doNestedDirectoryMembershipQuery(MembershipQuery<T> query,
long directoryId)
Searches for direct and indirect (nested) group relationships in a single directory.
|
protected static <T> com.google.common.base.Function<T,String> |
getAggregatingAndSortingComparatorFor(Class<T> type)
Returns a comparator for aggregating and sorting the results.
|
<T> List<T> |
searchGroups(EntityQuery<T> query)
Returns a
List<Group> matching the search criteria defined in the query. |
<T> List<T> |
searchUsers(EntityQuery<T> query)
Returns a
List<User> or List<String> matching the search criteria defined in the query. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
searchDirectGroupRelationships, searchNestedGroupRelationships
protected final DirectoryManager directoryManager
public AbstractInMemorySearchStrategy(DirectoryManager directoryManager, List<Directory> activeDirectories)
public <T> List<T> searchUsers(EntityQuery<T> query)
SearchStrategy
List<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 SearchStrategy
query
- the search query.List<User>
user objects or List<String>
usernames, depending on the query.public <T> List<T> searchGroups(EntityQuery<T> query)
SearchStrategy
List<Group>
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 SearchStrategy
query
- the search query.List<Group>
group objects or List<String>
groupnames, depending on the query.protected <T> List<T> doDirectDirectoryMembershipQuery(MembershipQuery<T> query, long directoryId)
protected <T> List<T> doNestedDirectoryMembershipQuery(MembershipQuery<T> query, long directoryId)
protected static <T> com.google.common.base.Function<T,String> getAggregatingAndSortingComparatorFor(Class<T> type)
For:
type
- type we are aggregating.Copyright © 2018 Atlassian. All rights reserved.