public interface

GitRefCommandFactory

implements PluginRefCommandFactory
com.atlassian.bitbucket.scm.git.command.GitRefCommandFactory

Public Methods

@Nonnull public GitCommand<Branch> createBranch (Repository repository, CreateBranchCommandParameters parameters)

@Nonnull public GitCommand<Tag> createTag (Repository repository, CreateTagCommandParameters parameters)

@Nonnull public GitCommand<Void> deleteBranch (Repository repository, GitDeleteBranchCommandParameters parameters)

Parameters
repository the repository containing the branch to delete
parameters describes the parameters required to delete a branch
Returns
  • a command which, when called, will delete a branch
Throws
InvalidAuthorException if an author is not provided and there is no current effective user

@Nonnull public GitCommand<Void> deleteTag (Repository repository, GitDeleteTagCommandParameters parameters)

Parameters
repository the repository containing the tag to delete
parameters describes the parameters required to delete a tag
Returns
  • a command which, when called, will delete a tag
Throws
InvalidAuthorException if an author is not provided and there is no current effective user

@Nonnull public GitCommand<Void> resolveAnnotatedTags (Repository repository, GitResolveAnnotatedTagsCommandParameters parameters, GitAnnotatedTagCallback callback)

Parameters
repository the repository containing the tag to retrieve
parameters describes the parameters required to retrieve the tag
callback the callback to stream the annotated tags to
Returns
  • a command which, when called, provides each successfully retrieved annotated tag to the provided callback.

public Command<Void> validateRef (GitValidateRefCommandParameters parameters)

Parameters
parameters describes the parameters required to validate the ref
Returns
  • a command which, when calls, will validate the given ref name and throw an exception if it is invalid
Throws
InvalidRefNameException if the provided ref is invalid