@Component public class UserPickerResourceHelperImpl extends Object implements UserPickerResourceHelper
Constructor and Description |
---|
UserPickerResourceHelperImpl(UserSearchService userSearchService,
I18nHelper i18n,
AvatarService avatarService,
JiraAuthenticationContext authContext,
GlobalPermissionManager globalPermissionManager,
FeatureManager featureManager) |
Modifier and Type | Method and Description |
---|---|
List<ApplicationUser> |
findActiveUsers(String searchString)
Finds active users, throws exception if search string is null
|
List<ApplicationUser> |
findUsers(String searchString,
Boolean includeActive,
Boolean includeInactive)
Finds users, throws exception if search string is null
|
List<ApplicationUser> |
findUsers(String searchString,
Boolean includeActive,
Boolean includeInactive,
boolean allowEmptySearchString)
Finds users, throws exception if search string is null
|
List<ApplicationUser> |
findUsers(String searchString,
Boolean includeActive,
Boolean includeInactive,
boolean allowEmptySearchString,
com.google.common.base.Predicate<com.atlassian.crowd.embedded.api.User> userFilter)
Finds users, throws exception if search string is null
|
List<ApplicationUser> |
findUsers(String searchString,
Boolean includeActive,
Boolean includeInactive,
boolean allowEmptySearchString,
com.google.common.base.Predicate<com.atlassian.crowd.embedded.api.User> userFilter,
Integer maxResults)
Finds users, throws exception if search string is null
|
List<ApplicationUser> |
findUsers(String searchString,
UserSearchParams userSearchParams)
Finds users, throws exception if search string is null
|
UserPickerResultsBean |
findUsersAsBean(String query,
Integer maxResults,
Boolean showAvatar,
List<String> excludeUsers)
Returns a list of users matching query with highlighting.
|
UserPickerResultsBean |
findUsersAsBean(String query,
Integer maxResults,
Boolean showAvatar,
List<String> excludeUsers,
UserSearchParams userSearchParams)
Returns a list of users matching query with highlighting.
|
ApplicationUser |
getUserByName(String userName)
Returns a user if supplied userName is exact match to their username.
|
List<ApplicationUser> |
limitUserSearch(Integer startAt,
Integer maxResults,
Iterable<ApplicationUser> users,
Iterable<String> excludeUsers) |
@Autowired public UserPickerResourceHelperImpl(UserSearchService userSearchService, I18nHelper i18n, AvatarService avatarService, JiraAuthenticationContext authContext, GlobalPermissionManager globalPermissionManager, FeatureManager featureManager)
public UserPickerResultsBean findUsersAsBean(String query, Integer maxResults, Boolean showAvatar, List<String> excludeUsers)
findUsersAsBean
in interface UserPickerResourceHelper
query
- A string used to search username, Name or e-mail addressmaxResults
- the maximum number of users to return (defaults to 50). The maximum allowed value is 1000.
If you specify a value that is higher than this number, your search results will be truncated.showAvatar
- excludeUsers
- public UserPickerResultsBean findUsersAsBean(String query, Integer maxResults, Boolean showAvatar, List<String> excludeUsers, UserSearchParams userSearchParams)
UserPickerResourceHelper
findUsersAsBean
in interface UserPickerResourceHelper
query
- A string used to search username, Name or e-mail address. Empty query is not allowed.maxResults
- the maximum number of users to return (defaults to 50). The maximum allowed value is 1000.
If you specify a value that is higher than this number, your search results will be truncated.showAvatar
- get avatar urlexcludeUsers
- exclude these users from search resultsuserSearchParams
- additional search parameters. allowEmptyQuery is ignored, always treated as false.public List<ApplicationUser> limitUserSearch(Integer startAt, Integer maxResults, Iterable<ApplicationUser> users, Iterable<String> excludeUsers)
limitUserSearch
in interface UserPickerResourceHelper
startAt
- start the search at this indexmaxResults
- max resultsusers
- search results to limitexcludeUsers
- exclude these users from search resultspublic List<ApplicationUser> findActiveUsers(String searchString)
UserPickerResourceHelper
findActiveUsers
in interface UserPickerResourceHelper
searchString
- user querypublic List<ApplicationUser> findUsers(String searchString, Boolean includeActive, Boolean includeInactive)
UserPickerResourceHelper
findUsers
in interface UserPickerResourceHelper
searchString
- user query, no users returned if emptyincludeActive
- whether to include active users (null implies true)includeInactive
- whether to include inactive users (null implies false)public List<ApplicationUser> findUsers(String searchString, Boolean includeActive, Boolean includeInactive, boolean allowEmptySearchString)
UserPickerResourceHelper
findUsers
in interface UserPickerResourceHelper
searchString
- user queryincludeActive
- whether to include active users (null implies true)includeInactive
- whether to include inactive users (null implies false)allowEmptySearchString
- controls whether users are returned if searchString is emptypublic List<ApplicationUser> findUsers(String searchString, Boolean includeActive, Boolean includeInactive, boolean allowEmptySearchString, com.google.common.base.Predicate<com.atlassian.crowd.embedded.api.User> userFilter)
UserPickerResourceHelper
findUsers
in interface UserPickerResourceHelper
searchString
- user queryincludeActive
- whether to include active users (null implies true)includeInactive
- whether to include inactive users (null implies false)allowEmptySearchString
- controls whether users are returned if searchString is emptyuserFilter
- filter to post-process user results with. May be null for no filtering.public List<ApplicationUser> findUsers(String searchString, Boolean includeActive, Boolean includeInactive, boolean allowEmptySearchString, com.google.common.base.Predicate<com.atlassian.crowd.embedded.api.User> userFilter, Integer maxResults)
UserPickerResourceHelper
findUsers
in interface UserPickerResourceHelper
searchString
- user queryincludeActive
- whether to include active users (null implies true)includeInactive
- whether to include inactive users (null implies false)allowEmptySearchString
- controls whether users are returned if searchString is emptyuserFilter
- filter to post-process user results with. May be null for no filtering.maxResults
- the result limit, use null for no limit.public List<ApplicationUser> findUsers(String searchString, UserSearchParams userSearchParams)
UserPickerResourceHelper
findUsers
in interface UserPickerResourceHelper
searchString
- user queryuserSearchParams
- search parameters, including "includeActive", "includeInactive", etc. allowEmptyQuery is ignored, always treated as false.public ApplicationUser getUserByName(String userName)
UserPickerResourceHelper
getUserByName
in interface UserPickerResourceHelper
userName
- The username queryCopyright © 2002-2021 Atlassian. All Rights Reserved.