Class ApprovalContext

java.lang.Object
com.google.gerrit.server.query.approval.ApprovalContext

public abstract class ApprovalContext extends Object
Entity representing all required information to match predicates for copying approvals.
  • Constructor Details

    • ApprovalContext

      public ApprovalContext()
  • Method Details

    • sourcePatchSetId

      public abstract PatchSet.Id sourcePatchSetId()
    • approverId

      public abstract Account.Id approverId()
    • labelType

      public abstract LabelType labelType()
    • approvalValue

      public abstract short approvalValue()
      Value of the approval on the source patch set to be copied.
    • targetPatchSet

      public abstract PatchSet targetPatchSet()
      Target change and patch set for the approval. This must be used instead of getting the PatchSet from changeNotes() because it is possible we are now creating the patch-set, so it doesn't exist in changeNotes yet.
    • changeNotes

      public abstract ChangeNotes changeNotes()
      ChangeNotes of the change in question.
    • changeKind

      public abstract ChangeKind 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.
    • repoView

      public abstract RepoView repoView()
    • create

      public static ApprovalContext create(ChangeNotes changeNotes, PatchSet.Id sourcePatchSetId, Account.Id approverId, LabelType labelType, short approvalValue, PatchSet targetPatchSet, ChangeKind changeKind, boolean isMerge, RepoView repoView)