Class ApprovalContext
java.lang.Object
com.google.gerrit.server.query.approval.ApprovalContext
Entity representing all required information to match predicates for copying approvals.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract short
Value of the approval on the source patch set to be copied.abstract Account.Id
abstract ChangeKind
ChangeKind
of the delta between the origin and target patch set.abstract ChangeNotes
ChangeNotes
of the change in question.static ApprovalContext
create
(ChangeNotes changeNotes, PatchSet.Id sourcePatchSetId, Account.Id approverId, LabelType labelType, short approvalValue, PatchSet targetPatchSet, ChangeKind changeKind, boolean isMerge, org.eclipse.jgit.revwalk.RevWalk revWalk, org.eclipse.jgit.lib.Config repoConfig) abstract boolean
isMerge()
Whether the new patch set is a merge commit.abstract LabelType
abstract org.eclipse.jgit.lib.Config
RevWalk
of the repository for the current commit.abstract org.eclipse.jgit.revwalk.RevWalk
revWalk()
RevWalk
of the repository for the current commit.abstract PatchSet.Id
abstract PatchSet
Target change and patch set for the approval.
-
Constructor Details
-
ApprovalContext
public ApprovalContext()
-
-
Method Details
-
sourcePatchSetId
-
approverId
-
labelType
-
approvalValue
public abstract short approvalValue()Value of the approval on the source patch set to be copied. -
targetPatchSet
Target change and patch set for the approval. This must be used instead of getting the PatchSet fromchangeNotes()
because it is possible we are now creating the patch-set, so it doesn't exist in changeNotes yet. -
changeNotes
ChangeNotes
of the change in question. -
changeKind
ChangeKind
of the delta between the origin and target patch set. -
isMerge
public abstract boolean isMerge()Whether the new patch set is a merge commit. -
revWalk
public abstract org.eclipse.jgit.revwalk.RevWalk revWalk()RevWalk
of the repository for the current commit. -
repoConfig
public abstract org.eclipse.jgit.lib.Config repoConfig()RevWalk
of the repository for the current commit. -
create
public static ApprovalContext create(ChangeNotes changeNotes, PatchSet.Id sourcePatchSetId, Account.Id approverId, LabelType labelType, short approvalValue, PatchSet targetPatchSet, ChangeKind changeKind, boolean isMerge, org.eclipse.jgit.revwalk.RevWalk revWalk, org.eclipse.jgit.lib.Config repoConfig)
-