Class ApprovalCopier.ApprovalCopyResult

java.lang.Object
com.google.gerrit.server.approval.ApprovalCopier.ApprovalCopyResult
Enclosing class:
ApprovalCopier

public abstract static class ApprovalCopier.ApprovalCopyResult extends Object
Result for checking if an approval can be copied to the next patch set.
  • Constructor Details

    • ApprovalCopyResult

      public ApprovalCopyResult()
  • Method Details

    • canCopy

      public abstract boolean canCopy()
      Whether the approval can be copied to the next patch set.
    • labelCopyCondition

      public abstract String labelCopyCondition()
      Label's copyCondition
    • labelCopy

      public abstract boolean labelCopy()
      Whether the approval can be copied to the next patch set based on label's copyCondition.
    • copyEnforcement

      public abstract String copyEnforcement()
      Condition that forces copy based on server configuration
    • forcedCopy

      public abstract boolean forcedCopy()
      Whether the approval must be copied to the next patch set based on servers copyEnforcement.
    • copyRestriction

      public abstract String copyRestriction()
      Condition that forces copy not to be made based on server configuration
    • forcedNonCopy

      public abstract boolean forcedNonCopy()
      Whether the approval must be not be copied to the next patch set based on servers copyRestriction.
    • passingAtoms

      public abstract com.google.common.collect.ImmutableSet<String> passingAtoms()
      Lists the leaf predicates of the copy condition that are fulfilled.

      Example: The expression

       changekind:TRIVIAL_REBASE OR is:MIN
       
      has two leaf predicates:
      • changekind:TRIVIAL_REBASE
      • is:MIN
      This method will return the leaf predicates that are fulfilled, for example if only the first predicate is fulfilled, the returned list will be equal to ["changekind:TRIVIAL_REBASE"].

      Empty if the label type is missing, if there is no copy condition or if the copy condition is not parseable.

    • failingAtoms

      public abstract com.google.common.collect.ImmutableSet<String> failingAtoms()
      Lists the leaf predicates of the copy condition that are not fulfilled. See passingAtoms() for more details.

      Empty if the label type is missing, if there is no copy condition or if the copy condition is not parseable.

    • create

      public static ApprovalCopier.ApprovalCopyResult create(String labelCopyCondition, boolean labelCopy, String copyEnforcement, boolean forcedCopy, String copyRestriction, boolean forcedNonCopy, Set<String> passingAtoms, Set<String> failingAtoms)
    • createEvaluationSkipped

      public static ApprovalCopier.ApprovalCopyResult createEvaluationSkipped()