Interface MembershipSearchStrategy

All Known Implementing Classes:
AbstractInMemoryMembershipSearchStrategy, InMemoryAggregatingMembershipSearchStrategy, InMemoryNonAggregatingMembershipSearchStrategy, NoDirectorySearchStrategy

public interface MembershipSearchStrategy
A set of querying across a collection of active directories.

A strategy is resolved using a SearchStrategyFactory and can be optimised for specific configurations of directory.

See Also:
  • Method Details

    • searchDirectGroupRelationships

      <T> List<T> searchDirectGroupRelationships(MembershipQuery<T> query)
      Searches 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 semantic will determine whether only the owning directory (when false) or all directories (when true) will be searched.

      Parameters:
      query - membership query.
      Returns:
      List of User entities, Group entities, String usernames or String group names matching the query criteria.
    • searchNestedGroupRelationships

      <T> List<T> searchNestedGroupRelationships(MembershipQuery<T> query)
      Searches 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.

      Parameters:
      query - membership query.
      Returns:
      List of User entities, Group entities, String usernames or String group names matching the query criteria.
    • searchDirectGroupRelationshipsGroupedByName

      <T> com.google.common.collect.ListMultimap<String,T> searchDirectGroupRelationshipsGroupedByName(MembershipQuery<T> query)
      Searches 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 semantic will determine whether only the owning directory (when false) or all directories (when true) will be searched.

      Parameters:
      query - membership query.
      Returns:
      ListMultimap where keys are elements of MembershipQuery.getEntityNamesToMatch() and values are List of User entities, Group entities, String usernames or String group names matching the query criteria for the given key.