@PublicApi
public interface UserSearchService
ApplicationUser
objects based on a partial query stringModifier and Type | Method and Description |
---|---|
boolean |
canPerformAjaxSearch(ApplicationUser user)
Determines whether the given user could perform AJAX search.
|
boolean |
canPerformAjaxSearch(JiraServiceContext jiraServiceContext)
Returns true only if UserPicker Ajax search is enabled AND the user in the context has com.atlassian.jira.user.ApplicationUser Browse permission.
|
boolean |
canShowEmailAddresses(JiraServiceContext jiraServiceContext)
Whether or not the UserPicker Ajax should search or show email addresses
|
Iterable<String> |
findUserKeysByEmail(String email)
Searches for a user with the specified e-mail address.
|
Iterable<String> |
findUserKeysByFullName(String fullName)
Searches for a user with the specified full name.
|
List<String> |
findUserNames(String nameQuery,
String emailQuery,
UserSearchParams userSearchParams)
Get user names based on query strings.
|
List<String> |
findUserNames(String query,
UserSearchParams userSearchParams)
Get user names based on a query string.
|
List<ApplicationUser> |
findUsers(JiraServiceContext jiraServiceContext,
String query)
Get Users based on a query string.
|
List<ApplicationUser> |
findUsers(JiraServiceContext jiraServiceContext,
String query,
UserSearchParams userSearchParams)
Get Users based on a query string.
|
List<ApplicationUser> |
findUsers(String nameQuery,
String emailQuery,
UserSearchParams userSearchParams)
Get Users based on query strings.
|
List<ApplicationUser> |
findUsers(String query,
UserSearchParams userSearchParams)
Get Users based on a query string.
|
List<ApplicationUser> |
findUsersAllowEmptyQuery(JiraServiceContext jiraServiceContext,
String query)
Get Users based on a query string.
|
Iterable<ApplicationUser> |
findUsersByEmail(String email)
Searches for a user with the specified e-mail address.
|
Iterable<ApplicationUser> |
findUsersByFullName(String fullName)
Searches for a user with the specified full name.
|
ApplicationUser |
getUserByName(JiraServiceContext jiraServiceContext,
String query)
Returns a user by exact username
|
boolean |
userMatches(ApplicationUser user,
UserSearchParams userSearchParams)
Determine whether a user matches the search criteria specified in the
userSearchParams parameter. |
List<ApplicationUser> findUsers(JiraServiceContext jiraServiceContext, String query)
Matches on start of username, full name and email as well as all the tokenised (on spaces, '.', '@' etc) words Only returns active users.
Results are sorted according to the UserCachingComparator
.
jiraServiceContext
- Jira Service Contextquery
- String to search for.ApplicationUser
objects that match criteria.findUsers(JiraServiceContext, String, UserSearchParams)
ApplicationUser getUserByName(JiraServiceContext jiraServiceContext, String query)
jiraServiceContext
- Jira Service Contextquery
- String to search for.ApplicationUser
object with supplied username.List<ApplicationUser> findUsersAllowEmptyQuery(JiraServiceContext jiraServiceContext, String query)
Matches on start of username, full name and email as well as all the tokenised (on spaces, '.', '@' etc) words This will search even if the query passed is null or empty. Only returns active users.
Results are sorted according to the UserCachingComparator
.
jiraServiceContext
- Jira Service Contextquery
- String to search for.ApplicationUser
objects that match criteria.findUsers(JiraServiceContext, String, UserSearchParams)
List<ApplicationUser> findUsers(JiraServiceContext jiraServiceContext, String query, UserSearchParams userSearchParams)
Matches on start of username, full name and email as well as all the tokenised (on spaces, '.', '@' etc) words
Results are sorted according to the UserCachingComparator
.
If the users in the database change during this call results might not be consistent if a post processing filter and a result limit is used.
jiraServiceContext
- Jira Service Contextquery
- String to search for.userSearchParams
- Additional search parametersApplicationUser
objects that match criteria.List<ApplicationUser> findUsers(String query, UserSearchParams userSearchParams)
Matches on start of username, full name and email as well as all the tokenised (on spaces, '.', '@' etc) words
Matches email only when userSearchParams.canMatchEmail() is true.
If the users in the database change during this call results might not be consistent if a post processing filter and a result limit is used.
query
- the query to search username, display name and email addressuserSearchParams
- the search criteriaList<ApplicationUser> findUsers(String nameQuery, String emailQuery, UserSearchParams userSearchParams)
Matches nameQuery on start of username, full name and email as well as all the tokenised (on spaces, '.', '@' etc) words
Matches emailQuery on start of email, as well as the tokenised words. Email matching is performed only when userSearchParams.canMatchEmail() is true. If email matching is enabled, nameQuery AND emailQuery criteria must match returned users.
If the users in the database change during this call results might not be consistent if a post processing filter and a result limit is used.
nameQuery
- the query to search username and display name.emailQuery
- the query to search email address, subject to userSearchParams.canMatchEmail.userSearchParams
- the search criteriaList<String> findUserNames(String query, UserSearchParams userSearchParams)
Matches on start of username, full name and email as well as all the tokenised (on spaces, '.', '@' etc) words
Matches email only when userSearchParams.canMatchEmail() is true.
If the users in the database change during this call results might not be consistent if a post processing filter and a result limit is used.
query
- the query to search username, display name and email addressuserSearchParams
- the search criteriaList<String> findUserNames(String nameQuery, String emailQuery, UserSearchParams userSearchParams)
Matches nameQuery on start of username, full name and email as well as all the tokenised (on spaces, '.', '@' etc) words
Matches emailQuery on start of email, as well as the tokenised words. Email matching is performed only when userSearchParams.canMatchEmail() is true. If email matching is enabled, nameQuery AND emailQuery criteria must match returned users.
If the users in the database change during this call results might not be consistent if a post processing filter and a result limit is used.
nameQuery
- the query to search username and display name.emailQuery
- the query to search email address, subject to userSearchParams.canMatchEmail.userSearchParams
- the search criteriaboolean userMatches(ApplicationUser user, UserSearchParams userSearchParams)
userSearchParams
parameter.
allowEmptyQuery in userSearchParams
is ignored.
user
- the user to be matcheduserSearchParams
- the search criteriaboolean canPerformAjaxSearch(JiraServiceContext jiraServiceContext)
jiraServiceContext
- Jira Service Contextboolean canPerformAjaxSearch(ApplicationUser user)
boolean canShowEmailAddresses(JiraServiceContext jiraServiceContext)
jiraServiceContext
- Jira Service Context@Nonnull Iterable<String> findUserKeysByFullName(@Nullable String fullName)
fullName
- the full name to search for.@Nonnull Iterable<ApplicationUser> findUsersByFullName(@Nullable String fullName)
fullName
- the full name to search for.@Nonnull Iterable<String> findUserKeysByEmail(@Nullable String email)
email
- the e-mail address to search.@Nonnull Iterable<ApplicationUser> findUsersByEmail(@Nullable String email)
email
- the e-mail address to search.Copyright © 2002-2015 Atlassian. All Rights Reserved.