public static class UserSearchParams.Builder extends Object
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
UserSearchParams.Builder |
allowEmptyQuery(boolean allowEmptyQuery) |
UserSearchParams |
build() |
UserSearchParams.Builder |
canMatchEmail(boolean canMatchEmail) |
UserSearchParams.Builder |
filter(com.google.common.base.Predicate<com.atlassian.crowd.embedded.api.User> postProcessingFilter) |
UserSearchParams.Builder |
filter(UserFilter userFilter) |
UserSearchParams.Builder |
filterByProjectIds(Collection<Long> projectIds) |
UserSearchParams.Builder |
ignorePermissionCheck(boolean ignorePermissionCheck) |
UserSearchParams.Builder |
includeActive(boolean includeActive) |
UserSearchParams.Builder |
includeInactive(boolean includeInactive) |
UserSearchParams.Builder |
maxResults(Integer maxResults) |
UserSearchParams.Builder |
sorted(boolean sorted) |
public UserSearchParams build()
public UserSearchParams.Builder allowEmptyQuery(boolean allowEmptyQuery)
allowEmptyQuery
- if true, empty queries that would retrieve all results are allowed.public UserSearchParams.Builder includeActive(boolean includeActive)
includeActive
- active users are searched.public UserSearchParams.Builder includeInactive(boolean includeInactive)
includeInactive
- inactive users are searched.public UserSearchParams.Builder canMatchEmail(boolean canMatchEmail)
canMatchEmail
- if search applies to email address as well.public UserSearchParams.Builder filter(UserFilter userFilter)
userFilter
- filter users by groups or roles.public UserSearchParams.Builder filterByProjectIds(Collection<Long> projectIds)
projectIds
- the list of project ids to be used in conjunction with the roles in user filter.public UserSearchParams.Builder filter(com.google.common.base.Predicate<com.atlassian.crowd.embedded.api.User> postProcessingFilter)
postProcessingFilter
- a filter applied after search results are retrieved. Use this for more complex
filter logic that can't be expressed in a UserFilter
or other parameters.public UserSearchParams.Builder maxResults(Integer maxResults)
maxResults
- the maximum number of results to retrieve.public UserSearchParams.Builder sorted(boolean sorted)
sorted
- true to ensure results are sorted, false if results may be unsorted. Turning sorting off
may have better performance.public UserSearchParams.Builder ignorePermissionCheck(boolean ignorePermissionCheck)
ignorePermissionCheck
- a flag indicating whether the permission checking has already been
performed. If false (the default), the logged in user must have browser users permission to list
users or else an empty list is always returned.
If true, searches are not restricted by the logged in user's permissions.Copyright © 2002-2015 Atlassian. All Rights Reserved.