public abstract class BitbucketApiFactory extends Object implements ExtensionPoint
BitbucketApi
instances to connect to a given server URL
.ExtensionPoint.LegacyInstancesAreScopedToHudson
Constructor and Description |
---|
BitbucketApiFactory() |
Modifier and Type | Method and Description |
---|---|
protected abstract BitbucketApi |
create(String serverUrl,
BitbucketAuthenticator authenticator,
String owner,
String repository)
Creates a
BitbucketApi for the specified URL with the supplied credentials, owner and (optional)
repository. |
protected BitbucketApi |
create(String serverUrl,
com.cloudbees.plugins.credentials.common.StandardUsernamePasswordCredentials credentials,
String owner,
String repository)
Deprecated.
|
protected abstract boolean |
isMatch(String serverUrl)
Tests if the supplied URL is supported by this factory.
|
static BitbucketApi |
newInstance(String serverUrl,
BitbucketAuthenticator authenticator,
String owner,
String repository)
Creates a
BitbucketApi for the specified URL with the supplied credentials, owner and (optional)
repository. |
static BitbucketApi |
newInstance(String serverUrl,
com.cloudbees.plugins.credentials.common.StandardUsernamePasswordCredentials credentials,
String owner,
String repository)
Deprecated.
|
protected abstract boolean isMatch(@Nullable String serverUrl)
serverUrl
- the server URL (may be null
, e.g. for Bitbucket Cloud)true
if this factory can connect to the specified URL.@NonNull protected abstract BitbucketApi create(@Nullable String serverUrl, @Nullable BitbucketAuthenticator authenticator, @NonNull String owner, @CheckForNull String repository)
BitbucketApi
for the specified URL with the supplied credentials, owner and (optional)
repository.serverUrl
- the server URL.authenticator
- the (optional) authenticator.owner
- the owner name.repository
- the (optional) repository name.BitbucketApi
.@NonNull @Deprecated protected BitbucketApi create(@Nullable String serverUrl, @Nullable com.cloudbees.plugins.credentials.common.StandardUsernamePasswordCredentials credentials, @NonNull String owner, @CheckForNull String repository)
@NonNull public static BitbucketApi newInstance(@Nullable String serverUrl, @Nullable BitbucketAuthenticator authenticator, @NonNull String owner, @CheckForNull String repository)
BitbucketApi
for the specified URL with the supplied credentials, owner and (optional)
repository.serverUrl
- the server URL.authenticator
- the (optional) authenticator.owner
- the owner name.repository
- the (optional) repository name.BitbucketApi
.IllegalArgumentException
- if the supplied URL is not supported.@NonNull @Deprecated public static BitbucketApi newInstance(@Nullable String serverUrl, @Nullable com.cloudbees.plugins.credentials.common.StandardUsernamePasswordCredentials credentials, @NonNull String owner, @CheckForNull String repository)
Copyright © 2016–2022. All rights reserved.