Package com.google.gerrit.server.rules
Interface SubmitRule
-
- All Known Implementing Classes:
DefaultSubmitRule,IgnoreSelfApprovalRule,PrologRule
public interface SubmitRuleAllows plugins to decide whether a change is ready to be submitted or not.For a given
ChangeData, each plugin is called and returns aCollectionofSubmitRecord. This collection can be empty, or contain one or several values.A Change can only be submitted if all the plugins give their consent.
Each
SubmitRecordrepresents a decision made by the plugin. If the plugin rejects a change, it should hold valuable informations to help the end user understand and correct the blocking points.It should be noted that each plugin can handle rules inheritance.
This interface should be used to write pre-submit validation rules. This includes both simple checks, coded in Java, and more complex fully fledged expression evaluators (think: Prolog, JavaCC, or even JavaScript rules).
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Collection<SubmitRecord>evaluate(ChangeData changeData, SubmitRuleOptions options)Returns aCollectionofSubmitRecordstatus for the change.
-
-
-
Method Detail
-
evaluate
Collection<SubmitRecord> evaluate(ChangeData changeData, SubmitRuleOptions options)
Returns aCollectionofSubmitRecordstatus for the change.
-
-