Class UserSearchParams

java.lang.Object
com.atlassian.jira.bc.user.search.UserSearchParams

public class UserSearchParams extends Object
Optional parameters to restrict or control a user search.

This allows you to include or exclude active and inactive users, allow or disallow empty search queries and avoid returning stale data.

Implementations which use this class may return "eventually consistent"/stale/cached data to improve performance.
If that's not what you expect as for example you don't want to return stale data in:
- security/permission context to avoid security problems,
- notification context to avoid sending-off notification to users who should not get information about something
you can set forceStrongConsistency to true to force the conforming implementation to return "strongly consistent"/fresh data.

Since:
v5.1.5
  • Field Details

    • MAXIMUM_RESULTS

      public static final int MAXIMUM_RESULTS
      See Also:
    • ACTIVE_USERS_IGNORE_EMPTY_QUERY

      @Deprecated public static final UserSearchParams ACTIVE_USERS_IGNORE_EMPTY_QUERY
      Deprecated.
      since 8.20, use LIMITED_ACTIVE_USERS_IGNORE_EMPTY_QUERY instead
    • ACTIVE_USERS_ALLOW_EMPTY_QUERY

      @Deprecated public static final UserSearchParams ACTIVE_USERS_ALLOW_EMPTY_QUERY
      Deprecated.
      since 8.20, use LIMITED_ACTIVE_USERS_ALLOW_EMPTY_QUERY instead
    • LIMITED_ACTIVE_USERS_IGNORE_EMPTY_QUERY

      public static final UserSearchParams LIMITED_ACTIVE_USERS_IGNORE_EMPTY_QUERY
    • LIMITED_ACTIVE_USERS_ALLOW_EMPTY_QUERY

      public static final UserSearchParams LIMITED_ACTIVE_USERS_ALLOW_EMPTY_QUERY
  • Method Details

    • allowEmptyQuery

      public boolean allowEmptyQuery()
    • includeActive

      public boolean includeActive()
    • includeInactive

      public boolean includeInactive()
    • canMatchEmail

      public boolean canMatchEmail()
    • getUserFilter

      public UserFilter getUserFilter()
    • getProjectIds

      public Set<Long> getProjectIds()
    • ignorePermissionCheck

      public boolean ignorePermissionCheck()
      Since:
      v7.0
    • getPostProcessingFilter

      @Deprecated @Nonnull public com.google.common.base.Predicate<com.atlassian.crowd.embedded.api.User> getPostProcessingFilter()
      Deprecated.
      since 8.20. Using postProcessingFilter field may cause performance issues.
      Since:
      v7.0
    • getMaxResults

      public Integer getMaxResults()
      Since:
      v7.0
    • isSorted

      public boolean isSorted()
      Since:
      v7.0
    • isForcingStrongConsistency

      public boolean isForcingStrongConsistency()
      Since:
      v9.0
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • builder

      public static UserSearchParams.Builder builder()
      returns builder with number of maximum results set to UserSearchParams.MAXIMUM_RESULTS
    • builder

      public static UserSearchParams.Builder builder(int limit)
      Parameters:
      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.
      Since:
      v8.20
    • builder

      public static UserSearchParams.Builder builder(UserSearchParams prototype)