| com.atlassian.bitbucket.repository.RepositorySupplier |
Known Indirect Subclasses
|
Allows retrieving repositories by their ID or
project and slug.
This is a simplification of the RepositoryService, intended to be used in cases where a component needs to
be able to look up repositories but doesn't need the full service functionality. Using this interface instead makes
such components easier to test.
Plugin developers: Plugins cannot autowire their components when importing both RepositorySupplier and
RepositoryService. In general, if a plugin needs RepositoryService methods, it should only
use the RepositoryService. This interface should be used when a plugin only needs to retrieve repositories.
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Retrieves a
Repository by its ID. | |||||||||||
Retrieves a
Repository by its slug. | |||||||||||
Retrieves a
Repository by its slug. | |||||||||||
Retrieves a Repository by its ID.
| id | the repository's ID |
|---|
null if there is no repository with the specified ID| AuthorisationException | if the current user does not have permission to access the requested repository |
|---|
Retrieves a Repository by its slug. Slugs are only unique within a given
Project, so the project key is also required.
| projectKey | the key of the project to search in |
|---|---|
| slug | the slug of the repository to search for |
null if no matching repository is found| AuthorisationException | if the current user does not have permission to access the requested repository |
|---|---|
| RepositoryMovedException | if the repository has been moved to a different project, the project key has changed or the repository slug has changed |
Retrieves a Repository by its slug. Slugs are only unique within a given
Project, so the project key and project namespace
are required. Unless in mirror mode the namespace
specified should always be null.
| projectNamespace | the namespace of the project to search in, null
unless in mirror mode |
|---|---|
| projectKey | the key of the project to search in |
| slug | the slug of the repository to search for |
null if no matching repository is found| AuthorisationException | if the current user does not have permission to access the requested repository |
|---|---|
| RepositoryMovedException | if the repository has been moved to a different project, the project namespace or key has changed or the repository slug has changed |