public class QueryDslJiraCrowdDAO extends Object implements JiraCrowdDAO, Startable
Modifier and Type | Field and Description |
---|---|
static int |
BIG_NUMBER_OF_GROUPS |
static int |
GROUP_BATCH_SIZE |
static int |
MAX_GROUP_NESTED_LEVEL |
static int |
MAX_TOP |
static int |
NUMBER_OF_GROUP_BATCHES |
static int |
TOP_USERS_CACHE_EXPIRATION_SECONDS |
static int |
TOP_USERS_CACHE_MAX_SIZE |
Constructor and Description |
---|
QueryDslJiraCrowdDAO(QueryDslAccessor queryDslAccessor,
DatabaseAccessor databaseAccessor,
com.atlassian.event.api.EventPublisher eventPublisher) |
Modifier and Type | Method and Description |
---|---|
Set<com.atlassian.crowd.embedded.api.Group> |
findNestedGroupsOf(Set<com.atlassian.crowd.embedded.api.Group> groups)
Find all nested groups for a given set of
Group |
List<UserDTO> |
findTopUsers(String searchName,
int topN)
Finds top
topN active users (from all active directories) where user name matches searchName |
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.
|
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.
|
public static final int MAX_TOP
public static final int GROUP_BATCH_SIZE
public static final int NUMBER_OF_GROUP_BATCHES
public static final int MAX_GROUP_NESTED_LEVEL
public static final int BIG_NUMBER_OF_GROUPS
public static final int TOP_USERS_CACHE_MAX_SIZE
public static final int TOP_USERS_CACHE_EXPIRATION_SECONDS
public QueryDslJiraCrowdDAO(QueryDslAccessor queryDslAccessor, DatabaseAccessor databaseAccessor, com.atlassian.event.api.EventPublisher eventPublisher)
public void start()
Startable
@EventListener public void onEvent(ClearCacheEvent event)
public List<UserDTO> findTopUsersWithNameInGroups(String searchName, Set<com.atlassian.crowd.embedded.api.Group> groups, int topN)
findTopUsersWithNameInGroups
in interface JiraCrowdDAO
searchName
- part of user name (comparison is case insensitive)groups
- set of grouptopN
- Ngroups
where user name contains searchName
public List<UserDTO> findTopUsers(String searchName, int topN)
JiraCrowdDAO
topN
active users (from all active directories) where user name matches searchName
findTopUsers
in interface JiraCrowdDAO
searchName
- part of user name (comparison is case insensitive)topN
- NUser
matching requirements ordered ascending by user display namepublic Set<com.atlassian.crowd.embedded.api.Group> findNestedGroupsOf(Set<com.atlassian.crowd.embedded.api.Group> groups)
JiraCrowdDAO
Group
findNestedGroupsOf
in interface JiraCrowdDAO
group
including all groups
Copyright © 2002-2024 Atlassian. All Rights Reserved.