Package com.atlassian.bitbucket.user
Class UserSearchRequest.Builder
java.lang.Object
com.atlassian.bitbucket.user.UserSearchRequest.Builder
- Enclosing class:
- UserSearchRequest
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Assembles a newUserSearchRequest
from the provided values.Set the filter for the resultingrequest
instance.Set a group filter for the resultingrequest
instance.permission
(Permission permission) Set the global permission filter for the resultingrequest
.projectPermission
(int projectId, Permission permission) Set the project permission filter for the resultingrequest
.projectPermission
(Project project, Permission permission) Set the project permission filter for the resultingrequest
.repositoryPermission
(int repositoryId, Permission permission) Set the repository permission filter for the resultingrequest
.repositoryPermission
(Repository repository, Permission permission) Set the repository permission filter for the resultingrequest
.
-
Constructor Details
-
Builder
public Builder() -
Builder
-
-
Method Details
-
build
Assembles a newUserSearchRequest
from the provided values.- Returns:
- a new request
-
filter
Set the filter for the resultingrequest
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
Set a group filter for the resultingrequest
instance.- Parameters:
group
- the group name for the user search; may be blank- Returns:
- this builder instance
- Since:
- 4.4
- See Also:
-
permission
Set the global permission filter for the resultingrequest
.- 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 resultingrequest
.- Parameters:
project
- filter project for the user searchpermission
- 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 resultingrequest
.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 searchpermission
- 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 resultingrequest
.- Parameters:
repository
- filter repository for the user searchpermission
- 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 resultingrequest
.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 searchpermission
- filter repository permission for the user search- Returns:
- this builder instance
-