/src/main/java/com/atlassian/jira/plugins/bitbucket/spi/Communicator.java
Java | 59 lines | 16 code | 10 blank | 33 comment | 0 complexity | 2b7cb194bed20c4379abcc23d2515730 MD5 | raw file
- package com.atlassian.jira.plugins.bitbucket.spi;
- import com.atlassian.jira.plugins.bitbucket.api.Changeset;
- import com.atlassian.jira.plugins.bitbucket.api.SourceControlException;
- import com.atlassian.jira.plugins.bitbucket.api.SourceControlRepository;
- import com.atlassian.jira.plugins.bitbucket.api.SourceControlUser;
- /**
- * Starting point for remote API calls to the bitbucket remote API
- */
- public interface Communicator
- {
- /**
- * Retrieves information about a bitbucket user
- * @param username the user to load
- * @return the bitbucket user details
- */
- public SourceControlUser getUser(SourceControlRepository repository, String username);
- /**
- * Retrieves information about a changeset by changeset id
- *
- * @param auth the authentication rules for this request
- * @param owner the owner of the project
- * @param slug the slug of the project
- * @param id the changeset id
- * @return the project
- */
- public Changeset getChangeset(SourceControlRepository repository, String id);
- /**
- * @param repo
- * @param postCommitUrl
- */
- public void setupPostcommitHook(SourceControlRepository repo, String postCommitUrl);
- /**
- * @param repo
- * @param postCommitUrl
- */
- public void removePostcommitHook(SourceControlRepository repo, String postCommitUrl);
- /**
- * @param repository
- * @return
- */
- public Iterable<Changeset> getChangesets(SourceControlRepository repository);
- /**
- * @param repositoryUri
- * @return info about the repository or null if repository is invalid
- */
- public UrlInfo getUrlInfo(final RepositoryUri repositoryUri);
- public void validateRepositoryAccess(String repositoryType, String projectKey, RepositoryUri repositoryUri, String username,
- String password, String adminUsername, String adminPassword, String accessToken) throws SourceControlException;
- }