com.atlassian.jira.bc.user.search
Interface UserPickerSearchService

All Known Implementing Classes:
DefaultUserPickerSearchService

public interface UserPickerSearchService

Service that retrieves a collection of User objects based on a partial query string


Method Summary
 boolean canPerformAjaxSearch(JiraServiceContext jiraServiceContext)
          Returns true only if UserPicker Ajax search is enabled AND the user in the context has User Browse permission.
 boolean canShowEmailAddresses(JiraServiceContext jiraServiceContext)
          Whether or not the UserPicker Ajax should search or show email addresses
 List<com.atlassian.crowd.embedded.api.User> findUsers(JiraServiceContext jiraServiceContext, String query)
          Get Users based on a query string.
 List<com.atlassian.crowd.embedded.api.User> findUsersAllowEmptyQuery(JiraServiceContext jiraServiceContext, String query)
          Get Users based on a query string.
 Collection<User> getResults(JiraServiceContext jiraServiceContext, String query)
          Deprecated. Please use findUsers(com.atlassian.jira.bc.JiraServiceContext, String) instead. Since 4.3
 Collection<User> getResultsSearchForEmptyQuery(JiraServiceContext jiraServiceContext, String query)
          Deprecated. Please use findUsersAllowEmptyQuery(com.atlassian.jira.bc.JiraServiceContext, String) instead. Since 4.3
 boolean isAjaxSearchEnabled()
          Returns true only if UserPicker Ajax search is enabled.
 

Method Detail

findUsers

List<com.atlassian.crowd.embedded.api.User> findUsers(JiraServiceContext jiraServiceContext,
                                                      String query)
Get Users based on a query string.

Matches on the start of username, Each word in Full Name & email.

Results are sorted according to the UserBestNameComparator.

Parameters:
jiraServiceContext - Jira Service Context
query - String to search for.
Returns:
List of User objects that match criteria.

getResults

Collection<User> getResults(JiraServiceContext jiraServiceContext,
                            String query)
Deprecated. Please use findUsers(com.atlassian.jira.bc.JiraServiceContext, String) instead. Since 4.3

Get Users based on a query string. Matches on the start of username, Each word in Full Name & email

Parameters:
jiraServiceContext - Jira Service Context
query - String to search for.
Returns:
Collection of User objects that match criteria.

findUsersAllowEmptyQuery

List<com.atlassian.crowd.embedded.api.User> findUsersAllowEmptyQuery(JiraServiceContext jiraServiceContext,
                                                                     String query)
Get Users based on a query string.

Matches on the start of username, Each word in Full Name & email. This will search even if the query passed is null or empty.

Results are sorted according to the UserBestNameComparator.

Parameters:
jiraServiceContext - Jira Service Context
query - String to search for.
Returns:
List of User objects that match criteria.

getResultsSearchForEmptyQuery

Collection<User> getResultsSearchForEmptyQuery(JiraServiceContext jiraServiceContext,
                                               String query)
Deprecated. Please use findUsersAllowEmptyQuery(com.atlassian.jira.bc.JiraServiceContext, String) instead. Since 4.3

Get Users based on a query string. Matches on the start of username, Each word in Full Name & email. This will search even if the query passed is null or empty.

Parameters:
jiraServiceContext - Jira Service Context
query - String to search for.
Returns:
Collection of User objects that match criteria.

canPerformAjaxSearch

boolean canPerformAjaxSearch(JiraServiceContext jiraServiceContext)
Returns true only if UserPicker Ajax search is enabled AND the user in the context has User Browse permission.

Parameters:
jiraServiceContext - Jira Service Context
Returns:
True if enabled, otherwise false

isAjaxSearchEnabled

boolean isAjaxSearchEnabled()
Returns true only if UserPicker Ajax search is enabled.

Returns:
true if enabled.

canShowEmailAddresses

boolean canShowEmailAddresses(JiraServiceContext jiraServiceContext)
Whether or not the UserPicker Ajax should search or show email addresses

Parameters:
jiraServiceContext - Jira Service Context
Returns:
True if email addresses can be shown, otherwise false


Copyright © 2002-2011 Atlassian. All Rights Reserved.