Class QueryDslJiraCrowdDAO
java.lang.Object
com.atlassian.jira.crowd.embedded.QueryDslJiraCrowdDAO
- All Implemented Interfaces:
JiraCrowdDAO
,Startable
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final int
static final int
static 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 ofGroup
findTopUsers
(String searchName, int topN) Finds toptopN
active users (from all active directories) where user name matchessearchName
findTopUsersWithNameInGroups
(String searchName, Set<com.atlassian.crowd.embedded.api.Group> groups, int topN) Note: this query only returns active users from active directories.void
onEvent
(ClearCacheEvent event) void
start()
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:Startable
This 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:
findTopUsersWithNameInGroups
in interfaceJiraCrowdDAO
- Parameters:
searchName
- part of user name (comparison is case insensitive)groups
- set of grouptopN
- N- Returns:
- list of users from
groups
where user name containssearchName
-
findTopUsers
Description copied from interface:JiraCrowdDAO
Finds toptopN
active users (from all active directories) where user name matchessearchName
- Specified by:
findTopUsers
in interfaceJiraCrowdDAO
- 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 ofGroup
- Specified by:
findNestedGroupsOf
in interfaceJiraCrowdDAO
- Returns:
- all nested groups of given
group
including allgroups
-