Package com.google.gerrit.entities
Class SubmitRequirement
java.lang.Object
com.google.gerrit.entities.SubmitRequirement
Entity describing a requirement that should be met for a change to become submittable.
There are two ways to contribute SubmitRequirement
:
- Set per-project in project.config (see
ProjectState.getSubmitRequirements()
- Bind a global
SubmitRequirement
that will be evaluated for all projects.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract boolean
Boolean value indicating if theSubmitRequirement
definition can be overridden in child projects.abstract Optional<SubmitRequirementExpression>
Expression of the condition that makes the requirement applicable.static SubmitRequirement.Builder
builder()
Description of what this requirement means.abstract String
name()
Requirement name.abstract Optional<SubmitRequirementExpression>
Expression that, if evaluated to true, causes the submit requirement to be fulfilled, regardless of the submittability expression.abstract SubmitRequirementExpression
Expression of the condition that allows the submission of a change.static com.google.gson.TypeAdapter<SubmitRequirement>
typeAdapter
(com.google.gson.Gson gson)
-
Constructor Details
-
SubmitRequirement
public SubmitRequirement()
-
-
Method Details
-
name
Requirement name. -
description
Description of what this requirement means. -
applicabilityExpression
Expression of the condition that makes the requirement applicable. The expression should be evaluated for a specificChange
and if it returns false, the requirement becomes irrelevant for the change (i.e.submittabilityExpression()
andoverrideExpression()
are not evaluated).An empty
Optional
indicates that the requirement is applicable for any change. -
submittabilityExpression
Expression of the condition that allows the submission of a change. The expression should be evaluated for a specificChange
and if it returns true, the requirement becomes fulfilled for the change. -
overrideExpression
-
allowOverrideInChildProjects
public abstract boolean allowOverrideInChildProjects()Boolean value indicating if theSubmitRequirement
definition can be overridden in child projects.For globally bound
SubmitRequirement
, indicates if can be overridden bySubmitRequirement
in project.config.Default is false.
-
builder
-
typeAdapter
-