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 BitbucketTagClient
getBitbucketTagClient(TaskListener taskListener)
Returns a client for getting tag information from a repository.BitbucketBranchClient
getBranchClient(TaskListener taskListener)
Returns a client for getting branch information from a repository.BitbucketBuildStatusClient
getBuildStatusClient(String revisionSha)
Return a client that can post the current status of a build to Bitbucket.BitbucketBuildStatusClient
getBuildStatusClient(String revisionSha, BitbucketSCMRepository bitbucketSCMRepo, BitbucketCICapabilities ciCapabilities, InstanceKeyPairProvider instanceKeyPairProvider, org.jenkinsci.plugins.displayurlapi.DisplayURLProvider displayURLProvider)
BitbucketCommitClient
getCommitClient()
Returns a client for getting commit information from a repository.BitbucketDefaultBranch
getDefaultBranch()
Returns the default branch of a repository.BitbucketDeploymentClient
getDeploymentClient(String revisionSha)
Return a client that can post deployment information to Bitbucket.BitbucketFilePathClient
getFilePathClient()
Returns a client for getting file content and directory information on paths in a repository.BitbucketPullRequest
getPullRequest(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.BitbucketRepository
getRepository()
Make the call out to Bitbucket and read the response.BitbucketWebhookClient
getWebhookClient()
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:BitbucketRepositoryClient
Returns a client for getting branch information from a repository.- Specified by:
getBranchClient
in interfaceBitbucketRepositoryClient
- Returns:
- a git client that is ready to use
-
getBuildStatusClient
public BitbucketBuildStatusClient getBuildStatusClient(String revisionSha)
Description copied from interface:BitbucketRepositoryClient
Return a client that can post the current status of a build to Bitbucket.- Specified by:
getBuildStatusClient
in 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:BitbucketRepositoryClient
Returns a client for getting commit information from a repository.- Specified by:
getCommitClient
in interfaceBitbucketRepositoryClient
- Returns:
- a git client that is ready to use
-
getDeploymentClient
public BitbucketDeploymentClient getDeploymentClient(String revisionSha)
Description copied from interface:BitbucketRepositoryClient
Return a client that can post deployment information to Bitbucket.- Specified by:
getDeploymentClient
in interfaceBitbucketRepositoryClient
- Parameters:
revisionSha
- the revision for the deployment- Returns:
- a client that can post deployment information
-
getFilePathClient
public BitbucketFilePathClient getFilePathClient()
Description copied from interface:BitbucketRepositoryClient
Returns a client for getting file content and directory information on paths in a repository.- Specified by:
getFilePathClient
in interfaceBitbucketRepositoryClient
- Returns:
- A client that is ready to use
-
getPullRequest
public BitbucketPullRequest getPullRequest(long id)
Description copied from interface:BitbucketRepositoryClient
Gets the pull request corresponding to the given ID.- Specified by:
getPullRequest
in 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:BitbucketRepositoryClient
Gets 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:
getPullRequests
in 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:BitbucketRepositoryClient
Gets 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:
getPullRequests
in interfaceBitbucketRepositoryClient
- Returns:
- a stream of all pull requests in the repository
-
getRepository
public BitbucketRepository getRepository()
Description copied from interface:BitbucketRepositoryClient
Make the call out to Bitbucket and read the response.- Specified by:
getRepository
in interfaceBitbucketRepositoryClient
- Returns:
- the result of the call
-
getWebhookClient
public BitbucketWebhookClient getWebhookClient()
Description copied from interface:BitbucketRepositoryClient
Returns a client for performing various webhook related operations.- Specified by:
getWebhookClient
in interfaceBitbucketRepositoryClient
- Returns:
- a client that is ready to use
-
getDefaultBranch
public BitbucketDefaultBranch getDefaultBranch()
Description copied from interface:BitbucketRepositoryClient
Returns the default branch of a repository.- Specified by:
getDefaultBranch
in interfaceBitbucketRepositoryClient
- Returns:
- the result of the call
-
getBitbucketTagClient
public BitbucketTagClient getBitbucketTagClient(TaskListener taskListener)
Description copied from interface:BitbucketRepositoryClient
Returns a client for getting tag information from a repository.- Specified by:
getBitbucketTagClient
in interfaceBitbucketRepositoryClient
- Returns:
- a git client that is ready to use
-
-