public static class UserSearchParams.Builder extends Object
Constructor and Description |
---|
Builder()
Deprecated.
|
Builder(int limit) |
@Deprecated public Builder()
public Builder(int limit)
limit
- the maximum number of results to retrieve using constructed UserSearchParams.
The maximum allowed is 100. If higher number is provided it will be set to 100 in resulting UserSearchParams.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.@Deprecated 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.@Deprecated public UserSearchParams.Builder maxResults(Integer maxResults)
limitResults(int)
instead.maxResults
- the maximum number of results to retrieve.public UserSearchParams.Builder limitResults(int limit)
limit
- the maximum number of results to retrieve. The maximum allowed is 100.
If higher number is provided it will be set to 100 in resulting UserSearchParams.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.public UserSearchParams.Builder forceStrongConsistency(boolean forceStrongConsistency)
forceStrongConsistency
- whether the search must avoid returning stale data.
Use only if really necessary as it may cripple performance.Copyright © 2002-2023 Atlassian. All Rights Reserved.