PageRenderTime 36ms CodeModel.GetById 13ms RepoModel.GetById 1ms app.codeStats 0ms

/src/main/java/com/atlassian/jira/plugins/bitbucket/spi/Communicator.java

https://bitbucket.org/atlassian/jira-bitbucket-connector/
Java | 59 lines | 16 code | 10 blank | 33 comment | 0 complexity | 2b7cb194bed20c4379abcc23d2515730 MD5 | raw file
  1. package com.atlassian.jira.plugins.bitbucket.spi;
  2. import com.atlassian.jira.plugins.bitbucket.api.Changeset;
  3. import com.atlassian.jira.plugins.bitbucket.api.SourceControlException;
  4. import com.atlassian.jira.plugins.bitbucket.api.SourceControlRepository;
  5. import com.atlassian.jira.plugins.bitbucket.api.SourceControlUser;
  6. /**
  7. * Starting point for remote API calls to the bitbucket remote API
  8. */
  9. public interface Communicator
  10. {
  11. /**
  12. * Retrieves information about a bitbucket user
  13. * @param username the user to load
  14. * @return the bitbucket user details
  15. */
  16. public SourceControlUser getUser(SourceControlRepository repository, String username);
  17. /**
  18. * Retrieves information about a changeset by changeset id
  19. *
  20. * @param auth the authentication rules for this request
  21. * @param owner the owner of the project
  22. * @param slug the slug of the project
  23. * @param id the changeset id
  24. * @return the project
  25. */
  26. public Changeset getChangeset(SourceControlRepository repository, String id);
  27. /**
  28. * @param repo
  29. * @param postCommitUrl
  30. */
  31. public void setupPostcommitHook(SourceControlRepository repo, String postCommitUrl);
  32. /**
  33. * @param repo
  34. * @param postCommitUrl
  35. */
  36. public void removePostcommitHook(SourceControlRepository repo, String postCommitUrl);
  37. /**
  38. * @param repository
  39. * @return
  40. */
  41. public Iterable<Changeset> getChangesets(SourceControlRepository repository);
  42. /**
  43. * @param repositoryUri
  44. * @return info about the repository or null if repository is invalid
  45. */
  46. public UrlInfo getUrlInfo(final RepositoryUri repositoryUri);
  47. public void validateRepositoryAccess(String repositoryType, String projectKey, RepositoryUri repositoryUri, String username,
  48. String password, String adminUsername, String adminPassword, String accessToken) throws SourceControlException;
  49. }