public class BitbucketApiServiceImpl extends Object implements BitbucketApiService, org.springframework.beans.factory.DisposableBean
Constructor and Description |
---|
BitbucketApiServiceImpl() |
Modifier and Type | Method and Description |
---|---|
void |
destroy() |
BitbucketPageEntity<BitbucketNodeEntity> |
findBranches(String owner,
String slug,
String username,
String password,
String queryString,
int start,
int limit) |
BitbucketPageEntity<BitbucketResourceEntity> |
findPublicRepositories(String username,
String queryString,
int start,
int limit)
Return a filtered list of public repositories that user has access to.
|
BitbucketPageEntity<BitbucketResourceEntity> |
findRepositories(String username,
String password,
String queryString,
int start,
int limit)
Return a filtered list of accessible to Bitbucket user.
|
BitbucketNodeEntity |
getBranch(String owner,
String slug,
String branch,
String username,
String password)
Returns a branch of a repository if it exists, throws exception (404) if not.
|
List<BitbucketNodeEntity> |
getBranches(String owner,
String slug,
String username,
String password)
JAXB binding cannot be used in this method as Bitbucket returns JSON with node names containing characters
which cannot be used as XML element names.
|
BitbucketNodeEntity |
getDefaultBranch(String owner,
String slug,
String username,
String password)
Fetch default branch of a repository.
|
List<BitbucketResourceEntity> |
getPublicRepositories(String username)
Return a list of all public repositories that user has access to.
|
List<BitbucketResourceEntity> |
getPublicRepositories(String username,
String queryString)
Return a list of all public repositories that user has access to.
|
List<BitbucketResourceEntity> |
getRepositories(String username,
String password)
Retrieve list of all repositories accessible to Bitbucket user
|
List<BitbucketResourceEntity> |
getRepositories(String username,
String password,
String queryString)
Retrieve list of all repositories accessible to Bitbucket user
|
BitbucketResourceEntity |
getRepository(String owner,
String slug,
String username,
String password)
Retrieve data about single Bitbucket repository.
|
void |
updateBuildStatus(String owner,
String slug,
String revision,
RestBuildStatus buildStatus,
String username,
String password)
Send build status update to Bitbucket server
|
public void destroy()
destroy
in interface org.springframework.beans.factory.DisposableBean
@NotNull public BitbucketPageEntity<BitbucketResourceEntity> findPublicRepositories(@NotNull String username, @Nullable String queryString, int start, int limit) throws BitbucketApiException
BitbucketApiService
findPublicRepositories
in interface BitbucketApiService
BitbucketApiException
@NotNull public List<BitbucketResourceEntity> getPublicRepositories(@NotNull String username, @Nullable String queryString) throws BitbucketApiException
BitbucketApiService
getPublicRepositories
in interface BitbucketApiService
BitbucketApiException
@NotNull public List<BitbucketResourceEntity> getPublicRepositories(@NotNull String username) throws BitbucketApiException
BitbucketApiService
getPublicRepositories
in interface BitbucketApiService
BitbucketApiException
@NotNull public BitbucketPageEntity<BitbucketResourceEntity> findRepositories(@NotNull String username, @NotNull String password, @Nullable String queryString, int start, int limit) throws BitbucketApiException
BitbucketApiService
findRepositories
in interface BitbucketApiService
BitbucketApiException
@NotNull public List<BitbucketResourceEntity> getRepositories(@NotNull String username, @NotNull String password) throws BitbucketApiException
BitbucketApiService
getRepositories
in interface BitbucketApiService
BitbucketApiException
@NotNull public List<BitbucketResourceEntity> getRepositories(@NotNull String username, @NotNull String password, @Nullable String queryString) throws BitbucketApiException
BitbucketApiService
getRepositories
in interface BitbucketApiService
BitbucketApiException
@NotNull public BitbucketPageEntity<BitbucketNodeEntity> findBranches(@NotNull String owner, @NotNull String slug, @NotNull String username, @Nullable String password, @Nullable String queryString, int start, int limit) throws BitbucketApiException
findBranches
in interface BitbucketApiService
BitbucketApiException
@NotNull public List<BitbucketNodeEntity> getBranches(@NotNull String owner, @NotNull String slug, @NotNull String username, @Nullable String password) throws BitbucketApiException
getBranches
in interface BitbucketApiService
owner
- slug
- username
- password
- BitbucketApiException
@NotNull public BitbucketNodeEntity getBranch(@NotNull String owner, @NotNull String slug, @NotNull String branch, String username, String password) throws BitbucketApiException
BitbucketApiService
getBranch
in interface BitbucketApiService
BitbucketApiException
@NotNull public BitbucketResourceEntity getRepository(@NotNull String owner, @NotNull String slug, @Nullable String username, @Nullable String password) throws BitbucketApiException
BitbucketApiService
getRepository
in interface BitbucketApiService
BitbucketApiException
@NotNull public BitbucketNodeEntity getDefaultBranch(@NotNull String owner, @NotNull String slug, @Nullable String username, @Nullable String password) throws BitbucketApiException
BitbucketApiService
getDefaultBranch
in interface BitbucketApiService
BitbucketApiException
public void updateBuildStatus(@NotNull String owner, @NotNull String slug, @NotNull String revision, @NotNull RestBuildStatus buildStatus, @NotNull String username, @NotNull String password) throws BitbucketApiException
BitbucketApiService
updateBuildStatus
in interface BitbucketApiService
owner
- repository ownerslug
- repository slugrevision
- changeset revisionbuildStatus
- payload to be sent to Bitbucketusername
- credentials used to authenticate against Bitbucketpassword
- credentials used to authenticate against BitbucketBitbucketApiException
Copyright © 2020 Atlassian Software Systems Pty Ltd. All rights reserved.