Class QueryDslJiraCrowdDAO

java.lang.Object
com.atlassian.jira.crowd.embedded.QueryDslJiraCrowdDAO
All Implemented Interfaces:
JiraCrowdDAO, Startable

public class QueryDslJiraCrowdDAO extends Object implements JiraCrowdDAO, Startable
  • Field Details

    • MAX_TOP

      public static final int MAX_TOP
    • GROUP_BATCH_SIZE

      public static final int GROUP_BATCH_SIZE
    • NUMBER_OF_GROUP_BATCHES

      public static final int NUMBER_OF_GROUP_BATCHES
    • MAX_GROUP_NESTED_LEVEL

      public static final int MAX_GROUP_NESTED_LEVEL
    • BIG_NUMBER_OF_GROUPS

      public static final int BIG_NUMBER_OF_GROUPS
    • TOP_USERS_CACHE_MAX_SIZE

      public static final int TOP_USERS_CACHE_MAX_SIZE
    • TOP_USERS_CACHE_EXPIRATION_SECONDS

      public static final int TOP_USERS_CACHE_EXPIRATION_SECONDS
  • Constructor Details

    • QueryDslJiraCrowdDAO

      public QueryDslJiraCrowdDAO(QueryDslAccessor queryDslAccessor, DatabaseAccessor databaseAccessor, com.atlassian.event.api.EventPublisher eventPublisher)
  • Method Details

    • start

      public void start()
      Description copied from interface: Startable
      This method will be called after the plugin system is fully initialised and all components added to the dependency injection framework.
      Specified by:
      start in interface Startable
    • onEvent

      @EventListener public void onEvent(ClearCacheEvent event)
    • findTopUsersWithNameInGroups

      public List<UserDTO> findTopUsersWithNameInGroups(String searchName, Set<com.atlassian.crowd.embedded.api.Group> groups, int topN)
      Note: this query only returns active users from active directories.
      Specified by:
      findTopUsersWithNameInGroups in interface JiraCrowdDAO
      Parameters:
      searchName - part of user name (comparison is case insensitive)
      groups - set of group
      topN - N
      Returns:
      list of users from groups where user name contains searchName
    • findTopUsers

      public List<UserDTO> findTopUsers(String searchName, int topN)
      Description copied from interface: JiraCrowdDAO
      Finds top topN active users (from all active directories) where user name matches searchName
      Specified by:
      findTopUsers in interface JiraCrowdDAO
      Parameters:
      searchName - part of user name (comparison is case insensitive)
      topN - N
      Returns:
      list of User matching requirements ordered ascending by user display name
    • findNestedGroupsOf

      public Set<com.atlassian.crowd.embedded.api.Group> findNestedGroupsOf(Set<com.atlassian.crowd.embedded.api.Group> groups)
      Description copied from interface: JiraCrowdDAO
      Find all nested groups for a given set of Group
      Specified by:
      findNestedGroupsOf in interface JiraCrowdDAO
      Returns:
      all nested groups of given group including all groups