| com.atlassian.bitbucket.repository.RefService | 
A service for interacting with a repository's refs, such as branches
 and tags.
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Create branch with the information provided in the  request. | |||||||||||
| Create tag with the information provided in the  request. | |||||||||||
| Retrieves a paged list of  branchesfor 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  tagsfor the specified repository, optionally filtered by the provided
 starting text. | |||||||||||
| Attempts to resolve multiple refs at once, returning a map with the successfully resolved IDs linked
 to their resolved  refs. | |||||||||||
| Sets the default branch for the specified repository. | |||||||||||
| Streams  branchesto a callback class, for the specified repository, and where the branches match
 the request. | |||||||||||
| Streams  tagsto a callback class, for the specified repository, and where the tags match the request. | |||||||||||
Create branch with the information provided in the request.
| request | the branch creation request | 
|---|
| RepositoryHookVetoedException | if branch creation was canceled by one or more repository-hooks | 
|---|
Create tag with the information provided in the request.
| request | the tag creation request | 
|---|
| RepositoryHookVetoedException | if tag creation was canceled by one or more repository-hooks | 
|---|
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 tags 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 | 
Attempts to resolve a Ref from the provided refId. Specifically,
 the object is resolved as either a Branch or Tag. If the provided refId references
 something else, such as a commit hash, tree or blob, null is returned.
 
 If the ID is expected to match a ref of a specific type, the request may be explicitly limited
 to that type.
 
 The exact behavior of this method may vary between SCMs. For example, when provided with a commit hash, the
 SCM implementor may choose to return a Branch or Tag which references that commit, instead of
 returning null.
| request | describes the ID to resolve, and the repository to resolve it in | 
|---|
Attempts to resolve multiple refs at once, returning a map with the successfully resolved IDs linked
 to their resolved refs.
 
 If an ID is expected to match a branch or
 tag, it should be included in the relevant set. IDs for which the type
 is not known in advance should be included in the generic ref set.
 
 The exact behavior of this method may vary between SCMs. For example, when provided with a commit hash, the
 SCM implementor may choose to resolve it to a Branch or Tag which references that commit, or
 they may choose to always omit it from the returned map.
| request | describes the branch, tag and unspecified ref IDs to resolve, and the repository to resolve them in | 
|---|
nullSets 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 | 
|---|