com.atlassian.stash.repository.RepositoryMetadataService |
This interface is deprecated.
in 3.10 for removal in 4.0. Use RefService
instead, except for isEmpty(Repository)
which has moved to the RepositoryService
A service for interacting with metadata about a given Repository
, such as branches and tags.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Retrieves a paged list of
branches for the specified repository, optionally filtered by the provided
starting text. | |||||||||||
Retrieves the default branch for the specified repository.
| |||||||||||
Retrieves the associated metadata based on a given collection of refs in a repository.
| |||||||||||
Retrieves a paged list of
Tag s for the specified repository, optionally filtered by the provided
starting text. | |||||||||||
This method is deprecated.
in 3.10 for removal in 4.0. Use
isEmpty(Repository) instead.
| |||||||||||
Attempts to resolve a
Ref from the provided objectId . | |||||||||||
Sets the default branch for the specified repository.
|
Retrieves a paged list of branches
for the specified repository, optionally filtered by the provided
starting text.
request | request parameters for this query, including repository, filter text and ordering |
---|---|
pageRequest | the page request defining the page start and limit |
Retrieves the default branch for the specified repository.
If the repository is newly created and no commits have been pushed to it, it will have no default branch. As a
result, for new repositories, this method can throw NoDefaultBranchException
.
repository | the repository to retrieve the default branch for |
---|
NoDefaultBranchException | when no default branch is configured for the repository |
---|
Retrieves the associated metadata based on a given collection of refs in a repository.
request | request parameters for this query, including repository and refs to find metadata for |
---|
Ref
Retrieves a paged list of Tag
s for the specified repository, optionally filtered by the provided
starting text.
repository | the repository to retrieve tags from |
---|---|
pageRequest | the page request defining the page start and limit |
filterText | optional text for filtering returned tags |
order | the ordering to apply when listing tags |
This method is deprecated.
in 3.10 for removal in 4.0. Use isEmpty(Repository)
instead.
Retrieves a flag indicating whether the specified repository is empty or not. While the definition of "empty" is SCM-specific, it generally distills to a repository which contains no branches or tags.
repository | the repository to check |
---|
true
if the repository is empty; otherwise false
Attempts to resolve a Ref
from the provided objectId
. Specifically, the object is resolved as
either a Branch
or Tag
. If the provided objectId
references something else, such as a
commit hash, tree or blob, null
is returned.
repository | the repository to resolve the objectId in |
---|---|
objectId | the object within the repository to resolve |
Sets the default branch for the specified repository. Support for this operation is SCM-specific, and different SCMs may apply different rules to what values are supported.
repository | the repository to update the default branch for |
---|---|
branchName | the branch to mark as the default within the repository |
FeatureUnsupportedScmException | if the SCM for the specified repository does not support updating the default branch |
---|