B - The builder class, used to control the return type on builder methods to provide a fluent APIpublic abstract static class AbstractRepositoryRequest.AbstractBuilder<B extends AbstractRepositoryRequest.AbstractBuilder<B>> extends BuilderSupport
repository-related requests.NOT_BLANK| Modifier | Constructor and Description |
|---|---|
protected |
AbstractBuilder() |
protected |
AbstractBuilder(AbstractRepositoryRequest request) |
protected |
AbstractBuilder(Repository repository) |
| Modifier and Type | Method and Description |
|---|---|
B |
description(String value)
Sets the description of the repository.
|
B |
forkable(boolean value)
Sets whether the request should mark the repository forkable or not.
|
B |
name(String value)
Sets the name to be used for the request.
|
B |
publiclyAccessible(boolean value) |
protected abstract B |
self()
Overridden in concrete builder implementations to return
this. |
addIf, addIf, addIf, addIf, addIf, addIf, checkNotBlank, requireNonBlankprotected AbstractBuilder()
protected AbstractBuilder(@Nonnull Repository repository)
protected AbstractBuilder(@Nonnull AbstractRepositoryRequest request)
@Nonnull public B description(@Nullable String value)
value - the description of the repositorythis@Nonnull public B forkable(boolean value)
true and the repository will be forkable by default.value - true to mark the repository as forkable, or false to disable forkingthis@Nonnull public B name(@Nonnull String value)
null, empty or contain only
whitespace or an exception will be thrown.
Note: This value is required. If this method is not called prior to building the request, an exception will be thrown.
value - the name for the repositorythisIllegalArgumentException - if the provided value is empty or contains only whitespaceNullPointerException - if the provided value is null@Nonnull public B publiclyAccessible(boolean value)
value - whether the repository will be publicly accessible or not.thisprotected abstract B self()
this.thisCopyright © 2023 Atlassian. All rights reserved.