Class SubmitRequirement

java.lang.Object
com.google.gerrit.entities.SubmitRequirement

public abstract class SubmitRequirement extends Object
Entity describing a requirement that should be met for a change to become submittable.

There are two ways to contribute SubmitRequirement:

  • Constructor Details

    • SubmitRequirement

      public SubmitRequirement()
  • Method Details

    • name

      public abstract String name()
      Requirement name.
    • description

      public abstract Optional<String> description()
      Description of what this requirement means.
    • applicabilityExpression

      public abstract Optional<SubmitRequirementExpression> applicabilityExpression()
      Expression of the condition that makes the requirement applicable. The expression should be evaluated for a specific Change and if it returns false, the requirement becomes irrelevant for the change (i.e. submittabilityExpression() and overrideExpression() are not evaluated).

      An empty Optional indicates that the requirement is applicable for any change.

    • submittabilityExpression

      public abstract SubmitRequirementExpression submittabilityExpression()
      Expression of the condition that allows the submission of a change. The expression should be evaluated for a specific Change and if it returns true, the requirement becomes fulfilled for the change.
    • overrideExpression

      public abstract Optional<SubmitRequirementExpression> overrideExpression()
      Expression that, if evaluated to true, causes the submit requirement to be fulfilled, regardless of the submittability expression. This expression should be evaluated for a specific Change.

      An empty Optional indicates that the requirement is not overridable.

    • allowOverrideInChildProjects

      public abstract boolean allowOverrideInChildProjects()
      Boolean value indicating if the SubmitRequirement definition can be overridden in child projects.

      For globally bound SubmitRequirement, indicates if can be overridden by SubmitRequirement in project.config.

      Default is false.

    • builder

      public static SubmitRequirement.Builder builder()
    • typeAdapter

      public static com.google.gson.TypeAdapter<SubmitRequirement> typeAdapter(com.google.gson.Gson gson)