Interface BitbucketApiService
-
- All Known Implementing Classes:
BitbucketApiServiceImpl
public interface BitbucketApiService
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
deleteComment(String username, String password, String repositorySlug, String commitId, String commentId)
Delete commit comment.@NotNull BitbucketPageEntity<BitbucketNodeEntity>
findBranches(@NotNull String owner, @NotNull String slug, @NotNull String username, @Nullable String password, @Nullable String queryString, int start, int limit)
@NotNull BitbucketPageEntity<BitbucketResourceEntity>
findPublicRepositories(@NotNull String username, @Nullable String queryString, int start, int limit)
Return a filtered list of public repositories that user has access to.@NotNull BitbucketPageEntity<BitbucketResourceEntity>
findRepositories(@NotNull String username, @NotNull String password, @Nullable String queryString, int start, int limit)
Return a filtered list of accessible to Bitbucket user.@NotNull BitbucketNodeEntity
getBranch(@NotNull String owner, @NotNull String slug, @NotNull String branch, @Nullable String username, @Nullable String password)
Returns a branch of a repository if it exists, throws exception (404) if not.@NotNull List<BitbucketNodeEntity>
getBranches(@NotNull String owner, @NotNull String slug, @NotNull String username, @Nullable String password)
Retrieve list of all branches for given repositoryList<String>
getCommentIds(String username, String password, String repositorySlug, String commitId)
Fetch comment ids by commit id.List<String>
getCommits(String username, String password, String repositorySlug, int limit)
Fetch repository commits.@NotNull BitbucketNodeEntity
getDefaultBranch(@NotNull String owner, @NotNull String slug, @Nullable String username, @Nullable String password)
Fetch default branch of a repository.@NotNull List<BitbucketResourceEntity>
getPublicRepositories(@NotNull String username)
Return a list of all public repositories that user has access to.@NotNull List<BitbucketResourceEntity>
getPublicRepositories(@NotNull String username, @Nullable String queryString)
Return a list of all public repositories that user has access to.@NotNull List<BitbucketResourceEntity>
getRepositories(@NotNull String username, @NotNull String password)
Retrieve list of all repositories accessible to Bitbucket user@NotNull List<BitbucketResourceEntity>
getRepositories(@NotNull String username, @NotNull String password, @Nullable String queryString)
Retrieve list of all repositories accessible to Bitbucket user@NotNull BitbucketResourceEntity
getRepository(@NotNull String owner, @NotNull String slug, @Nullable String username, @Nullable String password)
Retrieve data about single Bitbucket repository.@Nullable String
getUuidForWorkspaceOrUsername(@NotNull String identifier, @NotNull String secret)
Fetch UUID for given identifier.void
updateBuildStatus(@NotNull String owner, @NotNull String slug, @NotNull String revision, @NotNull RestBuildStatus buildStatus, @NotNull String username, @NotNull String password)
Send build status update to Bitbucket server
-
-
-
Method Detail
-
getPublicRepositories
@NotNull @NotNull List<BitbucketResourceEntity> getPublicRepositories(@NotNull @NotNull String username) throws BitbucketApiException
Return a list of all public repositories that user has access to.- Throws:
BitbucketApiException
-
getPublicRepositories
@NotNull @NotNull List<BitbucketResourceEntity> getPublicRepositories(@NotNull @NotNull String username, @Nullable @Nullable String queryString) throws BitbucketApiException
Return a list of all public repositories that user has access to.- Throws:
BitbucketApiException
-
findPublicRepositories
@NotNull @NotNull BitbucketPageEntity<BitbucketResourceEntity> findPublicRepositories(@NotNull @NotNull String username, @Nullable @Nullable String queryString, int start, int limit) throws BitbucketApiException
Return a filtered list of public repositories that user has access to. The length of the list is limited.- Throws:
BitbucketApiException
-
getRepositories
@NotNull @NotNull List<BitbucketResourceEntity> getRepositories(@NotNull @NotNull String username, @NotNull @NotNull String password) throws BitbucketApiException
Retrieve list of all repositories accessible to Bitbucket user- Parameters:
username
-password
-- Returns:
- Throws:
BitbucketApiException
-
getRepositories
@NotNull @NotNull List<BitbucketResourceEntity> getRepositories(@NotNull @NotNull String username, @NotNull @NotNull String password, @Nullable @Nullable String queryString) throws BitbucketApiException
Retrieve list of all repositories accessible to Bitbucket user- Parameters:
username
-password
-- Throws:
BitbucketApiException
-
findRepositories
@NotNull @NotNull BitbucketPageEntity<BitbucketResourceEntity> findRepositories(@NotNull @NotNull String username, @NotNull @NotNull String password, @Nullable @Nullable String queryString, int start, int limit) throws BitbucketApiException
Return a filtered list of accessible to Bitbucket user. The length of the list is limited.- Throws:
BitbucketApiException
-
getBranches
@NotNull @NotNull List<BitbucketNodeEntity> getBranches(@NotNull @NotNull String owner, @NotNull @NotNull String slug, @NotNull @NotNull String username, @Nullable @Nullable String password) throws BitbucketApiException
Retrieve list of all branches for given repository- Parameters:
owner
-slug
-username
-password
-- Returns:
- Throws:
BitbucketApiException
-
findBranches
@NotNull @NotNull BitbucketPageEntity<BitbucketNodeEntity> findBranches(@NotNull @NotNull String owner, @NotNull @NotNull String slug, @NotNull @NotNull String username, @Nullable @Nullable String password, @Nullable @Nullable String queryString, int start, int limit) throws BitbucketApiException
- Throws:
BitbucketApiException
-
getRepository
@NotNull @NotNull BitbucketResourceEntity getRepository(@NotNull @NotNull String owner, @NotNull @NotNull String slug, @Nullable @Nullable String username, @Nullable @Nullable String password) throws BitbucketApiException
Retrieve data about single Bitbucket repository.- Throws:
BitbucketApiException
-
getDefaultBranch
@NotNull @NotNull BitbucketNodeEntity getDefaultBranch(@NotNull @NotNull String owner, @NotNull @NotNull String slug, @Nullable @Nullable String username, @Nullable @Nullable String password) throws BitbucketApiException
Fetch default branch of a repository.- Throws:
BitbucketApiException
-
getBranch
@NotNull @NotNull BitbucketNodeEntity getBranch(@NotNull @NotNull String owner, @NotNull @NotNull String slug, @NotNull @NotNull String branch, @Nullable @Nullable String username, @Nullable @Nullable String password) throws BitbucketApiException
Returns a branch of a repository if it exists, throws exception (404) if not.- Throws:
BitbucketApiException
-
getUuidForWorkspaceOrUsername
@Nullable @Nullable String getUuidForWorkspaceOrUsername(@NotNull @NotNull String identifier, @NotNull @NotNull String secret)
Fetch UUID for given identifier.- Parameters:
identifier
- might be username, email, team name or workspace.secret
- the password of the uuid account- Returns:
-
getCommits
List<String> getCommits(String username, String password, String repositorySlug, int limit) throws BitbucketApiException, com.opensymphony.webwork.dispatcher.json.JSONException
Fetch repository commits.- Throws:
BitbucketApiException
com.opensymphony.webwork.dispatcher.json.JSONException
-
getCommentIds
List<String> getCommentIds(String username, String password, String repositorySlug, String commitId) throws BitbucketApiException, com.opensymphony.webwork.dispatcher.json.JSONException
Fetch comment ids by commit id.- Throws:
BitbucketApiException
com.opensymphony.webwork.dispatcher.json.JSONException
-
deleteComment
void deleteComment(String username, String password, String repositorySlug, String commitId, String commentId)
Delete commit comment.
-
updateBuildStatus
void updateBuildStatus(@NotNull @NotNull String owner, @NotNull @NotNull String slug, @NotNull @NotNull String revision, @NotNull @NotNull RestBuildStatus buildStatus, @NotNull @NotNull String username, @NotNull @NotNull String password) throws BitbucketApiException
Send build status update to Bitbucket server- Parameters:
owner
- repository ownerslug
- repository slugrevision
- changeset revisionbuildStatus
- payload to be sent to Bitbucketusername
- credentials used to authenticate against Bitbucketpassword
- credentials used to authenticate against Bitbucket- Throws:
BitbucketApiException
-
-