Package com.google.gerrit.entities
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
:- Set per-project in project.config (see
ProjectState.getSubmitRequirements()
- Bind a global
SubmitRequirement
that will be evaluated for all projects.
- Set per-project in project.config (see
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SubmitRequirement.Builder
-
Constructor Summary
Constructors Constructor Description SubmitRequirement()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract boolean
allowOverrideInChildProjects()
Boolean value indicating if theSubmitRequirement
definition can be overridden in child projects.abstract Optional<SubmitRequirementExpression>
applicabilityExpression()
Expression of the condition that makes the requirement applicable.static SubmitRequirement.Builder
builder()
abstract Optional<String>
description()
Description of what this requirement means.abstract String
name()
Requirement name.abstract Optional<SubmitRequirementExpression>
overrideExpression()
Expression that, if evaluated to true, causes the submit requirement to be fulfilled, regardless of the submittability expression.abstract SubmitRequirementExpression
submittabilityExpression()
Expression of the condition that allows the submission of a change.static com.google.gson.TypeAdapter<SubmitRequirement>
typeAdapter(com.google.gson.Gson gson)
-
-
-
Method Detail
-
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 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
public abstract SubmitRequirementExpression 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
public abstract Optional<SubmitRequirementExpression> 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
public static SubmitRequirement.Builder builder()
-
typeAdapter
public static com.google.gson.TypeAdapter<SubmitRequirement> typeAdapter(com.google.gson.Gson gson)
-
-