public static abstract class

AbstractRepositoryRequest.AbstractBuilder

extends BuilderSupport
java.lang.Object
   ↳ com.atlassian.bitbucket.util.BuilderSupport
     ↳ com.atlassian.bitbucket.repository.AbstractRepositoryRequest.AbstractBuilder<B extends com.atlassian.bitbucket.repository.AbstractRepositoryRequest.AbstractBuilder<B>>
Known Direct Subclasses

Class Overview

Base class for creating builders for repository-related requests.

Summary

Fields
protected boolean forkable
protected String name
protected boolean publiclyAccessible
[Expand]
Inherited Fields
From class com.atlassian.bitbucket.util.BuilderSupport
Protected Constructors
AbstractBuilder()
AbstractBuilder(Repository repository)
AbstractBuilder(AbstractRepositoryRequest request)
Public Methods
@Nonnull B forkable(boolean value)
Sets whether the request should mark the repository forkable or not.
@Nonnull B name(String value)
Sets the name to be used for the request.
@Nonnull B publiclyAccessible(boolean value)
Protected Methods
abstract B self()
Overridden in concrete builder implementations to return this.
[Expand]
Inherited Methods
From class com.atlassian.bitbucket.util.BuilderSupport
From class java.lang.Object

Fields

protected boolean forkable

protected String name

protected boolean publiclyAccessible

Protected Constructors

protected AbstractBuilder ()

protected AbstractBuilder (Repository repository)

protected AbstractBuilder (AbstractRepositoryRequest request)

Public Methods

@Nonnull public B forkable (boolean value)

Sets whether the request should mark the repository forkable or not. If this method is not called prior to building the request, its value defaults to true and the repository will be forkable by default.

Parameters
value true to mark the repository as forkable, or false to disable forking
Returns
  • this

@Nonnull public B name (String value)

Sets the name to be used for the request. The provided value may not be 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.

Parameters
value the name for the repository
Returns
  • this
Throws
IllegalArgumentException if the provided value is empty or contains only whitespace
NullPointerException if the provided value is null

@Nonnull public B publiclyAccessible (boolean value)

Parameters
value whether the repository will be publicly accessible or not.
Returns
  • this

Protected Methods

protected abstract B self ()

Overridden in concrete builder implementations to return this.

Returns
  • this