Class BitbucketApiFactory
java.lang.Object
io.jenkins.blueocean.blueocean_bitbucket_pipeline.BitbucketApiFactory
- All Implemented Interfaces:
ExtensionPoint
- Direct Known Subclasses:
BitbucketCloudApi.BitbucketCloudApiFactory
,BitbucketServerApi.BitbucketServerApiFactory
Factory for Bitbucket API. Bitbucket server and cloud APIs are different and
different factories are needed to handle it
- Author:
- Vivek Pandey
-
Nested Class Summary
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract BitbucketApi
create
(String apiUrl, com.cloudbees.plugins.credentials.common.StandardUsernamePasswordCredentials credentials) CreateBitbucketApi
instance.abstract boolean
static BitbucketApiFactory
Resolves aBitbucketApiFactory
-
Constructor Details
-
BitbucketApiFactory
public BitbucketApiFactory()
-
-
Method Details
-
handles
- Returns:
- true if this factory can handle this scmId
-
create
@NonNull public abstract BitbucketApi create(@NonNull String apiUrl, @NonNull com.cloudbees.plugins.credentials.common.StandardUsernamePasswordCredentials credentials) CreateBitbucketApi
instance. Before calling this method, clients must ensurehandles(String)
is called first and returned true- Parameters:
apiUrl
- API url (host url) of bitbucket server or cloud. e.g. https://mybitbucketserver.com/credentials
-StandardUsernamePasswordCredentials
- Returns:
BitbucketApi
instance
-
resolve
Resolves aBitbucketApiFactory
- Parameters:
scmId
- idScm.getId()
of Bitbucket SCM provider- Returns:
BitbucketApiFactory
instance, could be null
-