Interface BitbucketRepositoryClient
-
- All Known Implementing Classes:
BitbucketRepositoryClientImpl
public interface BitbucketRepositoryClient
Repository client, used to interact with a remote repository for all operations except cloning source code.
-
-
Method Summary
All Methods Instance Methods Abstract 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.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
-
getBranchClient
BitbucketBranchClient getBranchClient(TaskListener taskListener)
Returns a client for getting branch information from a repository.- Returns:
- a git client that is ready to use
- Since:
- 4.0.0
-
getCommitClient
BitbucketCommitClient getCommitClient()
Returns a client for getting commit information from a repository.- Returns:
- a git client that is ready to use
- Since:
- 4.1.0
-
getFilePathClient
BitbucketFilePathClient getFilePathClient()
Returns a client for getting file content and directory information on paths in a repository.- Returns:
- A client that is ready to use
- Since:
- 3.0.0
-
getRepository
BitbucketRepository getRepository()
Make the call out to Bitbucket and read the response.- Returns:
- the result of the call
- Throws:
AuthorizationException
- if the credentials did not allow access to the given urlNoContentException
- if the server did not respond with a bodyConnectionFailureException
- if the server did not respondNotFoundException
- if the requested url does not existBadRequestException
- if the request was malformed and thus rejected by the serverServerErrorException
- if the server failed to process the requestBitbucketClientException
- for all errors not already captured
-
getWebhookClient
BitbucketWebhookClient getWebhookClient()
Returns a client for performing various webhook related operations.- Returns:
- a client that is ready to use
-
getBuildStatusClient
BitbucketBuildStatusClient getBuildStatusClient(String revisionSha)
Return a client that can post the current status of a build to Bitbucket.- Parameters:
revisionSha
- the revision for the build status- Returns:
- a client that can post a build status
- Since:
- 3.1.0
-
getDeploymentClient
BitbucketDeploymentClient getDeploymentClient(String revisionSha)
Return a client that can post deployment information to Bitbucket.- Parameters:
revisionSha
- the revision for the deployment- Returns:
- a client that can post deployment information
- Since:
- 3.1.0
-
getPullRequest
BitbucketPullRequest getPullRequest(long id)
Gets the pull request corresponding to the given ID.- Parameters:
id
- the pull request's id- Returns:
- the pull request with the given ID
- Since:
- 4.1.0
-
getPullRequests
Stream<BitbucketPullRequest> getPullRequests(BitbucketPullRequestState state)
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.- Parameters:
state
- the state of the pull requests to fetch- Returns:
- a stream of all pull requests in the repository with the given state
- Since:
- 3.0.0
-
getPullRequests
Stream<BitbucketPullRequest> getPullRequests()
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.- Returns:
- a stream of all pull requests in the repository
- Since:
- 3.0.0
-
getDefaultBranch
BitbucketDefaultBranch getDefaultBranch()
Returns the default branch of a repository.- Returns:
- the result of the call
- Throws:
AuthorizationException
- if the credentials did not allow access to the given urlNoContentException
- if the server did not respond with a bodyConnectionFailureException
- if the server did not respondNotFoundException
- if the requested url does not existBadRequestException
- if the request was malformed and thus rejected by the serverServerErrorException
- if the server failed to process the requestBitbucketClientException
- for all errors not already captured
-
getBitbucketTagClient
BitbucketTagClient getBitbucketTagClient(TaskListener taskListener)
Returns a client for getting tag information from a repository.- Returns:
- a git client that is ready to use
- Since:
- 4.1.0
-
-