Class InMemoryEntitySearchStrategy
java.lang.Object
com.atlassian.crowd.manager.application.search.InMemoryEntitySearchStrategy
- All Implemented Interfaces:
GroupSearchStrategy,UserSearchStrategy
public class InMemoryEntitySearchStrategy
extends Object
implements UserSearchStrategy, GroupSearchStrategy
An
UserSearchStrategy and GroupSearchStrategy implementation which merges results in-memory.
This class will search across multiple directories, potentially consuming a lot of memory. This is the same (in spirit) as what Crowd 2.8 and earlier would do by default.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionInMemoryEntitySearchStrategy(DirectoryManager directoryManager, List<Directory> directories, boolean mergeEntities, AccessFilter accessFilter) -
Method Summary
Modifier and TypeMethodDescription<T> PagedSearcher<T>createPagedGroupSearcher(EntityQuery<T> query) <T> PagedSearcher<T>createPagedUserSearcher(EntityQuery<T> query) protected <T> List<T>search(EntityQuery<T> query) <T> List<T>searchGroups(EntityQuery<T> query) Returns aList<Group>orList<String>groupnames matching the search criteria defined in the query.<T> List<T>searchUsers(EntityQuery<T> query) Returns aList<User>orList<String>matching the search criteria defined in the query.
-
Field Details
-
directoryManagerSearchWrapper
-
directories
-
-
Constructor Details
-
InMemoryEntitySearchStrategy
public InMemoryEntitySearchStrategy(DirectoryManager directoryManager, List<Directory> directories, boolean mergeEntities, AccessFilter accessFilter)
-
-
Method Details
-
searchUsers
Description copied from interface:UserSearchStrategyReturns aList<User>orList<String>matching the search criteria defined in the query.The users will be returned in a stable order including across pagination boundaries (excluding modification).
- Specified by:
searchUsersin interfaceUserSearchStrategy- Parameters:
query- the search query.- Returns:
List<User>user objects orList<String>usernames, depending on the query.
-
searchGroups
Description copied from interface:GroupSearchStrategyReturns aList<Group>orList<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).
- Specified by:
searchGroupsin interfaceGroupSearchStrategy- Parameters:
query- the search query.- Returns:
List<Group>group objects orList<String>groupnames, depending on the query.
-
search
-
createPagedUserSearcher
public <T> PagedSearcher<T> createPagedUserSearcher(EntityQuery<T> query) throws PagingNotSupportedException - Specified by:
createPagedUserSearcherin interfaceUserSearchStrategy- Throws:
PagingNotSupportedException- See Also:
-
createPagedGroupSearcher
public <T> PagedSearcher<T> createPagedGroupSearcher(EntityQuery<T> query) throws PagingNotSupportedException - Specified by:
createPagedGroupSearcherin interfaceGroupSearchStrategy- Throws:
PagingNotSupportedException- See Also:
-