Class AbstractInMemoryMembershipSearchStrategy
- All Implemented Interfaces:
MembershipSearchStrategy
- Direct Known Subclasses:
InMemoryAggregatingMembershipSearchStrategy,InMemoryNonAggregatingMembershipSearchStrategy
MembershipSearchStrategy which searches across multiple directories in memory for users and groups
This is considered the worse case MembershipSearchStrategy 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.
- Since:
- 2.9
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final AccessFilterprotected final DirectoryManagerSearchWrapper -
Constructor Summary
ConstructorsConstructorDescriptionAbstractInMemoryMembershipSearchStrategy(DirectoryManager directoryManager, List<Directory> directories, AccessFilter accessFilter) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract CanonicalityCheckerprotected abstract <T> BiFunction<Directory,MembershipQuery<T>, MembershipQuery<T>> getQueryTransformer(MembershipQuery<T> original) <T> List<T>Searches for direct group relationships in any of the application's active assigned directories.<T> com.google.common.collect.ListMultimap<String,T> Searches for direct group relationships in any of the application's active assigned directories.protected <T> List<T>searchGroupRelationships(MembershipQuery<T> query, boolean nested) <T> List<T>Searches for direct and indirect (nested) group relationships in any of the application's active assigned directories.
-
Field Details
-
directoryManagerSearchWrapper
-
directories
-
directoryIds
-
accessFilter
-
-
Constructor Details
-
AbstractInMemoryMembershipSearchStrategy
public AbstractInMemoryMembershipSearchStrategy(DirectoryManager directoryManager, List<Directory> directories, AccessFilter accessFilter)
-
-
Method Details
-
searchDirectGroupRelationships
Description copied from interface:MembershipSearchStrategySearches for direct group relationships in any of the application's active assigned directories.When searching for the groups an entity is a member of, the
membership aggregation semanticwill determine whether only the owning directory (whenfalse) or all directories (whentrue) will be searched.- Specified by:
searchDirectGroupRelationshipsin interfaceMembershipSearchStrategy- Parameters:
query- membership query.- Returns:
- List of
Userentities,Groupentities,Stringusernames orStringgroup names matching the query criteria.
-
searchNestedGroupRelationships
Description copied from interface:MembershipSearchStrategySearches for direct and indirect (nested) group relationships in any of the application's active assigned directories.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.
- Specified by:
searchNestedGroupRelationshipsin interfaceMembershipSearchStrategy- Parameters:
query- membership query.- Returns:
- List of
Userentities,Groupentities,Stringusernames orStringgroup names matching the query criteria.
-
searchGroupRelationships
-
searchDirectGroupRelationshipsGroupedByName
public <T> com.google.common.collect.ListMultimap<String,T> searchDirectGroupRelationshipsGroupedByName(MembershipQuery<T> query) Description copied from interface:MembershipSearchStrategySearches for direct group relationships in any of the application's active assigned directories.When searching for the groups an entity is a member of, the
membership aggregation semanticwill determine whether only the owning directory (whenfalse) or all directories (whentrue) will be searched.- Specified by:
searchDirectGroupRelationshipsGroupedByNamein interfaceMembershipSearchStrategy- Parameters:
query- membership query.- Returns:
ListMultimapwhere keys are elements ofMembershipQuery.getEntityNamesToMatch()and values are List ofUserentities,Groupentities,Stringusernames orStringgroup names matching the query criteria for the given key.
-
getCanonicalityCheckerIfNeeded
-
getQueryTransformer
protected abstract <T> BiFunction<Directory,MembershipQuery<T>, getQueryTransformerMembershipQuery<T>> (MembershipQuery<T> original)
-