Class UserSearchRequest.Builder

java.lang.Object
com.atlassian.bitbucket.user.UserSearchRequest.Builder
Enclosing class:
UserSearchRequest

public static class UserSearchRequest.Builder extends Object
  • Constructor Details

    • Builder

      public Builder()
    • Builder

      public Builder(@Nonnull UserSearchRequest request)
  • Method Details

    • build

      @Nonnull public UserSearchRequest build()
      Assembles a new UserSearchRequest from the provided values.
      Returns:
      a new request
    • filter

      @Nonnull public UserSearchRequest.Builder filter(@Nullable String filter)
      Set the filter for the resulting request instance.
      Parameters:
      filter - filter text for the user search; may be blank, which will be treated as an empty filter
      Returns:
      this builder instance
      See Also:
    • group

      @Nonnull public UserSearchRequest.Builder group(@Nullable String group)
      Set a group filter for the resulting request instance.
      Parameters:
      group - the group name for the user search; may be blank
      Returns:
      this builder instance
      Since:
      4.4
      See Also:
    • permission

      @Nonnull public UserSearchRequest.Builder permission(@Nonnull Permission permission)
      Set the global permission filter for the resulting request.
      Parameters:
      permission - filter permission for the user search
      Returns:
      this builder instance
    • projectPermission

      @Nonnull public UserSearchRequest.Builder projectPermission(@Nonnull Project project, @Nonnull Permission permission)
      Set the project permission filter for the resulting request.
      Parameters:
      project - filter project for the user search
      permission - filter project permission for the user search
      Returns:
      this builder instance
    • projectPermission

      @Nonnull public UserSearchRequest.Builder projectPermission(int projectId, @Nonnull Permission permission)
      Set the project permission filter for the resulting request.

      NOTE: passing in an ID of a non-existing project will not filter out any users.

      Parameters:
      projectId - ID of the filter project for the user search
      permission - filter project permission for the user search
      Returns:
      this builder instance
    • repositoryPermission

      @Nonnull public UserSearchRequest.Builder repositoryPermission(@Nonnull Repository repository, @Nonnull Permission permission)
      Set the repository permission filter for the resulting request.
      Parameters:
      repository - filter repository for the user search
      permission - filter repository permission for the user search
      Returns:
      this builder instance
    • repositoryPermission

      @Nonnull public UserSearchRequest.Builder repositoryPermission(int repositoryId, @Nonnull Permission permission)
      Set the repository permission filter for the resulting request.

      NOTE: passing in an ID of a non-existing repository will not filter out any users.

      Parameters:
      repositoryId - ID of the filter repository for the user search
      permission - filter repository permission for the user search
      Returns:
      this builder instance