Class QueryDslJiraCrowdDAO
java.lang.Object
com.atlassian.jira.crowd.embedded.QueryDslJiraCrowdDAO
- All Implemented Interfaces:
JiraCrowdDAO,Startable
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final int -
Constructor Summary
ConstructorsConstructorDescriptionQueryDslJiraCrowdDAO(QueryDslAccessor queryDslAccessor, DatabaseAccessor databaseAccessor, com.atlassian.event.api.EventPublisher eventPublisher) -
Method Summary
Modifier and TypeMethodDescriptionSet<com.atlassian.crowd.embedded.api.Group>findNestedGroupsOf(Set<com.atlassian.crowd.embedded.api.Group> groups) Find all nested groups for a given set ofGroupfindTopUsers(String searchName, int topN) Finds toptopNactive users (from all active directories) where user name matchessearchNamefindTopUsersWithNameInGroups(String searchName, Set<com.atlassian.crowd.embedded.api.Group> groups, int topN) Note: this query only returns active users from active directories.voidonEvent(ClearCacheEvent event) voidstart()This method will be called after the plugin system is fully initialised and all components added to the dependency injection framework.
-
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:StartableThis method will be called after the plugin system is fully initialised and all components added to the dependency injection framework. -
onEvent
-
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:
findTopUsersWithNameInGroupsin interfaceJiraCrowdDAO- Parameters:
searchName- part of user name (comparison is case insensitive)groups- set of grouptopN- N- Returns:
- list of users from
groupswhere user name containssearchName
-
findTopUsers
Description copied from interface:JiraCrowdDAOFinds toptopNactive users (from all active directories) where user name matchessearchName- Specified by:
findTopUsersin interfaceJiraCrowdDAO- Parameters:
searchName- part of user name (comparison is case insensitive)topN- N- Returns:
- list of
Usermatching 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:JiraCrowdDAOFind all nested groups for a given set ofGroup- Specified by:
findNestedGroupsOfin interfaceJiraCrowdDAO- Returns:
- all nested groups of given
groupincluding allgroups
-