public interface

GitPullRequestCommandFactory

implements PluginPullRequestCommandFactory
com.atlassian.bitbucket.scm.git.command.GitPullRequestCommandFactory

Class Overview

Overrides methods from the standard PluginPullRequestCommandFactory 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.

Summary

Public Methods
@Nonnull GitCommand<Void> bulkRescope(BulkRescopeCommandParameters parameters)
@Deprecated @Nonnull GitCommand<Void> changes(PullRequest pullRequest, PullRequestChangeCommandParameters parameters, ChangeCallback callback)
This method is deprecated. in 6.0 for removal in 7.0. Use changes(PullRequest, PullRequestChangesCommandParameters, ChangeCallback) instead.
@Nonnull GitCommand<Void> changes(PullRequest pullRequest, PullRequestChangesCommandParameters parameters, ChangeCallback callback)
@Nonnull GitCommand<Void> commits(PullRequest pullRequest, PullRequestCommitsCommandParameters parameters, CommitCallback callback)
@Deprecated @Nonnull GitCommand<Void> commits(PullRequest pullRequest, CommitCallback callback)
This method is deprecated. in 6.0 for removal in 7.0. Use commits(PullRequest, PullRequestCommitsCommandParameters, CommitCallback) instead.
@Nonnull GitCommand<Void> delete(PullRequest pullRequest, PullRequestDeleteCommandParameters parameters)
@Nonnull GitCommand<Void> diff(PullRequest pullRequest, PullRequestDiffCommandParameters parameters, DiffContentCallback callback)
@Nonnull GitCommand<PullRequestEffectiveDiff> effectiveDiff(PullRequest pullRequest)
@Nonnull GitCommand<Branch> merge(PullRequest pullRequest, PullRequestMergeCommandParameters parameters)
@Nonnull GitCommand<PullRequestMergeResult> tryMerge(PullRequest pullRequest)
Attempt to merge the pull request to determine what the expected result of actually merging it would be.
[Expand]
Inherited Methods
From interface com.atlassian.bitbucket.scm.pull.PluginPullRequestCommandFactory

Public Methods

@Nonnull public GitCommand<Void> bulkRescope (BulkRescopeCommandParameters parameters)

Parameters
parameters describes the repository and provides a context for the command to use to retrieve the rescopes and apply updates
Returns
  • a command which can be used to calculate pull request rescopes synchronously or asynchronously

@Deprecated @Nonnull public GitCommand<Void> changes (PullRequest pullRequest, PullRequestChangeCommandParameters parameters, ChangeCallback callback)

This method is deprecated.
in 6.0 for removal in 7.0. Use changes(PullRequest, PullRequestChangesCommandParameters, ChangeCallback) instead.

Parameters
pullRequest the pull request to retrieve the change tree for
parameters parameters controlling which changes are returned
callback a callback to receive the changes
Returns
  • a command which can retrieve changes synchronously or asynchronously

@Nonnull public GitCommand<Void> changes (PullRequest pullRequest, PullRequestChangesCommandParameters parameters, ChangeCallback callback)

Parameters
pullRequest the pull request to retrieve the change tree for
parameters parameters controlling which changes are returned
callback a callback to receive the changes
Returns
  • a command which can retrieve changes synchronously or asynchronously

@Nonnull public GitCommand<Void> commits (PullRequest pullRequest, PullRequestCommitsCommandParameters parameters, CommitCallback callback)

Parameters
pullRequest the pull request to retrieve commits for
parameters parameters controlling how commits are streamed
callback a callback to receive the commits
Returns
  • a command which can retrieve commits synchronously or asynchronously

@Deprecated @Nonnull public GitCommand<Void> commits (PullRequest pullRequest, CommitCallback callback)

This method is deprecated.
in 6.0 for removal in 7.0. Use commits(PullRequest, PullRequestCommitsCommandParameters, CommitCallback) instead.

Parameters
pullRequest the pull request to retrieve commits for
callback a callback to receive the commits
Returns
  • a command which can retrieve commits synchronously or asynchronously

@Nonnull public GitCommand<Void> delete (PullRequest pullRequest, PullRequestDeleteCommandParameters parameters)

Parameters
pullRequest the pull request to delete
parameters parameters providing context for the deleted pull request
Returns
  • a command which, when executed, will delete the specified pull request, releasing any artifacts, such as refs or objects, that are associated with it

@Nonnull public GitCommand<Void> diff (PullRequest pullRequest, PullRequestDiffCommandParameters parameters, DiffContentCallback callback)

Parameters
pullRequest the pull request to retrieve diffs for
parameters parameters controlling which diffs are returned, and how much
callback a callback to receive the diff output
Returns
  • a command which can retrieve diffs synchronously or asynchronously

@Nonnull public GitCommand<PullRequestEffectiveDiff> effectiveDiff (PullRequest pullRequest)

Parameters
pullRequest the pull request to resolve the effective diff for
Returns
  • a command which can resolve the effective diff for the pull request synchronously or asynchronously

@Nonnull public GitCommand<Branch> merge (PullRequest pullRequest, PullRequestMergeCommandParameters parameters)

Parameters
pullRequest the pull request to merge
parameters parameters controlling how the pull request is merged
Returns
  • a command which can be used to merge the pull request synchronously or asynchronously

@Nonnull public GitCommand<PullRequestMergeResult> tryMerge (PullRequest pullRequest)

Attempt to merge the pull request to determine what the expected result of actually merging it would be.

Parameters
pullRequest the pull request to test for merge-ability
Returns
  • the result of trying to merge the pull request