Class BitbucketRepositoryClientImpl
- java.lang.Object
-
- com.atlassian.bitbucket.jenkins.internal.client.BitbucketRepositoryClientImpl
-
- All Implemented Interfaces:
BitbucketRepositoryClient
public class BitbucketRepositoryClientImpl extends Object implements BitbucketRepositoryClient
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BitbucketTagClientgetBitbucketTagClient(TaskListener taskListener)Returns a client for getting tag information from a repository.BitbucketBranchClientgetBranchClient(TaskListener taskListener)Returns a client for getting branch information from a repository.BitbucketBuildStatusClientgetBuildStatusClient(String revisionSha)Return a client that can post the current status of a build to Bitbucket.BitbucketBuildStatusClientgetBuildStatusClient(String revisionSha, BitbucketSCMRepository bitbucketSCMRepo, BitbucketCICapabilities ciCapabilities, InstanceKeyPairProvider instanceKeyPairProvider, org.jenkinsci.plugins.displayurlapi.DisplayURLProvider displayURLProvider)BitbucketCommitClientgetCommitClient()Returns a client for getting commit information from a repository.BitbucketDefaultBranchgetDefaultBranch()Returns the default branch of a repository.BitbucketDeploymentClientgetDeploymentClient(String revisionSha)Return a client that can post deployment information to Bitbucket.BitbucketFilePathClientgetFilePathClient()Returns a client for getting file content and directory information on paths in a repository.BitbucketPullRequestgetPullRequest(long id)Gets the pull request corresponding to the given ID.Stream<BitbucketPullRequest>getPullRequests()Gets all pull requests for the repository.Stream<BitbucketPullRequest>getPullRequests(BitbucketPullRequestState state)Gets all pull requests of the given state for the repository.BitbucketRepositorygetRepository()Make the call out to Bitbucket and read the response.BitbucketWebhookClientgetWebhookClient()Returns a client for performing various webhook related operations.
-
-
-
Method Detail
-
getBuildStatusClient
public BitbucketBuildStatusClient getBuildStatusClient(String revisionSha, BitbucketSCMRepository bitbucketSCMRepo, BitbucketCICapabilities ciCapabilities, InstanceKeyPairProvider instanceKeyPairProvider, org.jenkinsci.plugins.displayurlapi.DisplayURLProvider displayURLProvider)
-
getBranchClient
public BitbucketBranchClient getBranchClient(TaskListener taskListener)
Description copied from interface:BitbucketRepositoryClientReturns a client for getting branch information from a repository.- Specified by:
getBranchClientin interfaceBitbucketRepositoryClient- Returns:
- a git client that is ready to use
-
getBuildStatusClient
public BitbucketBuildStatusClient getBuildStatusClient(String revisionSha)
Description copied from interface:BitbucketRepositoryClientReturn a client that can post the current status of a build to Bitbucket.- Specified by:
getBuildStatusClientin interfaceBitbucketRepositoryClient- Parameters:
revisionSha- the revision for the build status- Returns:
- a client that can post a build status
-
getCommitClient
public BitbucketCommitClient getCommitClient()
Description copied from interface:BitbucketRepositoryClientReturns a client for getting commit information from a repository.- Specified by:
getCommitClientin interfaceBitbucketRepositoryClient- Returns:
- a git client that is ready to use
-
getDeploymentClient
public BitbucketDeploymentClient getDeploymentClient(String revisionSha)
Description copied from interface:BitbucketRepositoryClientReturn a client that can post deployment information to Bitbucket.- Specified by:
getDeploymentClientin interfaceBitbucketRepositoryClient- Parameters:
revisionSha- the revision for the deployment- Returns:
- a client that can post deployment information
-
getFilePathClient
public BitbucketFilePathClient getFilePathClient()
Description copied from interface:BitbucketRepositoryClientReturns a client for getting file content and directory information on paths in a repository.- Specified by:
getFilePathClientin interfaceBitbucketRepositoryClient- Returns:
- A client that is ready to use
-
getPullRequest
public BitbucketPullRequest getPullRequest(long id)
Description copied from interface:BitbucketRepositoryClientGets the pull request corresponding to the given ID.- Specified by:
getPullRequestin interfaceBitbucketRepositoryClient- Parameters:
id- the pull request's id- Returns:
- the pull request with the given ID
-
getPullRequests
public Stream<BitbucketPullRequest> getPullRequests(BitbucketPullRequestState state)
Description copied from interface:BitbucketRepositoryClientGets all pull requests of the given state for the repository. The returned stream will make paged calls to Bitbucket to ensure that all pull requests are returned. Consumers are advised that this can return large amounts of data and are strongly encouraged to not collect to a list or similar before processing items, but rather process them as they come in.- Specified by:
getPullRequestsin interfaceBitbucketRepositoryClient- Parameters:
state- the state of the pull requests to fetch- Returns:
- a stream of all pull requests in the repository with the given state
-
getPullRequests
public Stream<BitbucketPullRequest> getPullRequests()
Description copied from interface:BitbucketRepositoryClientGets all pull requests for the repository. The returned stream will make paged calls to Bitbucket to ensure that all pull requests are returned. Consumers are advised that this can return large amounts of data and are strongly encouraged to not collect to a list or similar before processing items, but rather process them as they come in.- Specified by:
getPullRequestsin interfaceBitbucketRepositoryClient- Returns:
- a stream of all pull requests in the repository
-
getRepository
public BitbucketRepository getRepository()
Description copied from interface:BitbucketRepositoryClientMake the call out to Bitbucket and read the response.- Specified by:
getRepositoryin interfaceBitbucketRepositoryClient- Returns:
- the result of the call
-
getWebhookClient
public BitbucketWebhookClient getWebhookClient()
Description copied from interface:BitbucketRepositoryClientReturns a client for performing various webhook related operations.- Specified by:
getWebhookClientin interfaceBitbucketRepositoryClient- Returns:
- a client that is ready to use
-
getDefaultBranch
public BitbucketDefaultBranch getDefaultBranch()
Description copied from interface:BitbucketRepositoryClientReturns the default branch of a repository.- Specified by:
getDefaultBranchin interfaceBitbucketRepositoryClient- Returns:
- the result of the call
-
getBitbucketTagClient
public BitbucketTagClient getBitbucketTagClient(TaskListener taskListener)
Description copied from interface:BitbucketRepositoryClientReturns a client for getting tag information from a repository.- Specified by:
getBitbucketTagClientin interfaceBitbucketRepositoryClient- Returns:
- a git client that is ready to use
-
-