public interface GitExtendedCommandFactory
extends com.atlassian.bitbucket.scm.PluginExtendedCommandFactory
PluginExtendedCommandFactory interface and returns GitCommand
instances instead of simple Command or AsyncCommand instances. This allows commands created by this
factory to be used synchronously or asynchronously at the caller's discretion, rather than fixing execution to one
approach or the other.
This interface does not add any commands to the standard interface. It only covariantly adjusts their return types.
| Modifier and Type | Method and Description |
|---|---|
GitCommand<Void> |
archive(com.atlassian.bitbucket.repository.Repository repository,
com.atlassian.bitbucket.scm.ArchiveCommandParameters parameters,
com.atlassian.bitbucket.io.TypeAwareOutputSupplier outputSupplier) |
GitCommand<com.atlassian.bitbucket.commit.Commit> |
editFile(com.atlassian.bitbucket.repository.Repository repository,
com.atlassian.bitbucket.scm.EditFileCommandParameters parameters) |
GitCommand<Void> |
fork(com.atlassian.bitbucket.repository.Repository repository,
com.atlassian.bitbucket.scm.ForkCommandParameters parameters) |
GitCommand<Void> |
lastModified(com.atlassian.bitbucket.repository.Repository repository,
com.atlassian.bitbucket.scm.LastModifiedCommandParameters parameters,
com.atlassian.bitbucket.commit.LastModifiedCallback callback) |
GitCommand<com.atlassian.bitbucket.repository.Branch> |
merge(com.atlassian.bitbucket.repository.Repository toRepository,
com.atlassian.bitbucket.scm.MergeCommandParameters parameters) |
GitCommand<Void> |
patch(com.atlassian.bitbucket.repository.Repository repository,
com.atlassian.bitbucket.scm.PatchCommandParameters parameters,
com.atlassian.bitbucket.io.TypeAwareOutputSupplier outputSupplier) |
GitCommand<com.atlassian.bitbucket.repository.Branch> |
rebase(com.atlassian.bitbucket.repository.Repository repository,
GitRebaseCommandParameters parameters) |
GitCommand<Void> |
signedObjects(com.atlassian.bitbucket.repository.Repository repository,
com.atlassian.bitbucket.scm.signed.SignedObjectsParameters parameters,
com.atlassian.bitbucket.scm.signed.SignedObjectCallback callback) |
GitCommand<Void> |
updateDefaultBranch(com.atlassian.bitbucket.repository.Repository repository,
com.atlassian.bitbucket.scm.UpdateDefaultBranchCommandParameters parameters) |
@Nonnull GitCommand<Void> archive(@Nonnull com.atlassian.bitbucket.repository.Repository repository, @Nonnull com.atlassian.bitbucket.scm.ArchiveCommandParameters parameters, @Nonnull com.atlassian.bitbucket.io.TypeAwareOutputSupplier outputSupplier)
archive in interface com.atlassian.bitbucket.scm.PluginExtendedCommandFactoryrepository - the repository to stream the archive fromparameters - parameters describing the commit to archive and the format to produce the archive inoutputSupplier - a supplier which, when given the archive content type, will provide an output stream@Nonnull GitCommand<com.atlassian.bitbucket.commit.Commit> editFile(@Nonnull com.atlassian.bitbucket.repository.Repository repository, @Nonnull com.atlassian.bitbucket.scm.EditFileCommandParameters parameters)
editFile in interface com.atlassian.bitbucket.scm.PluginExtendedCommandFactory@Nonnull GitCommand<Void> fork(@Nonnull com.atlassian.bitbucket.repository.Repository repository, @Nonnull com.atlassian.bitbucket.scm.ForkCommandParameters parameters)
fork in interface com.atlassian.bitbucket.scm.PluginExtendedCommandFactory@Nonnull GitCommand<Void> lastModified(@Nonnull com.atlassian.bitbucket.repository.Repository repository, @Nonnull com.atlassian.bitbucket.scm.LastModifiedCommandParameters parameters, @Nonnull com.atlassian.bitbucket.commit.LastModifiedCallback callback)
lastModified in interface com.atlassian.bitbucket.scm.PluginExtendedCommandFactoryrepository - the repository containing the starting commitparameters - parameters describing the path to stream modifications for, and the starting commit for
the traversalcallback - a callback to receive the latest commit for files in the specified pathnull if
streaming last modifications is not supported@Nonnull GitCommand<com.atlassian.bitbucket.repository.Branch> merge(@Nonnull com.atlassian.bitbucket.repository.Repository toRepository, @Nonnull com.atlassian.bitbucket.scm.MergeCommandParameters parameters)
merge in interface com.atlassian.bitbucket.scm.PluginExtendedCommandFactorytoRepository - the repository containing the target of the mergeparameters - parameters describing the merge to performfor additional parameters specific to git@Nonnull GitCommand<Void> patch(@Nonnull com.atlassian.bitbucket.repository.Repository repository, @Nonnull com.atlassian.bitbucket.scm.PatchCommandParameters parameters, @Nonnull com.atlassian.bitbucket.io.TypeAwareOutputSupplier outputSupplier)
patch in interface com.atlassian.bitbucket.scm.PluginExtendedCommandFactoryrepository - the repository from which to stream the patchparameters - parameters describing the commits for which to generate the patchoutputSupplier - a supplier which will provide an output stream@Nonnull GitCommand<com.atlassian.bitbucket.repository.Branch> rebase(@Nonnull com.atlassian.bitbucket.repository.Repository repository, @Nonnull GitRebaseCommandParameters parameters)
repository - the repository containing the branch to rebaseparameters - parameters describing the rebase to performcom.atlassian.bitbucket.validation.ArgumentValidationException - if the upstream
is not a full 40-character commit ID, or if an
upstream repository
was specified which does not belong to the same
hierarchy as repositoryIllegalArgumentException - if the specified branch is not
actually a branch@Nonnull GitCommand<Void> signedObjects(@Nonnull com.atlassian.bitbucket.repository.Repository repository, @Nonnull com.atlassian.bitbucket.scm.signed.SignedObjectsParameters parameters, @Nonnull com.atlassian.bitbucket.scm.signed.SignedObjectCallback callback)
signedObjects in interface com.atlassian.bitbucket.scm.PluginExtendedCommandFactoryrepository - the repository containing the requested objectsparameters - describes the objects to retrievecallback - callback to receive the requested objects@Nonnull GitCommand<Void> updateDefaultBranch(@Nonnull com.atlassian.bitbucket.repository.Repository repository, @Nonnull com.atlassian.bitbucket.scm.UpdateDefaultBranchCommandParameters parameters)
updateDefaultBranch in interface com.atlassian.bitbucket.scm.PluginExtendedCommandFactoryrepository - the repository whose default branch should be updatedparameters - parameters describing the new branch to set as the defaultnull if updating the default branch is not supportedCopyright © 2019 Atlassian. All rights reserved.