Package com.google.gerrit.server.project
Class SubmitRuleEvaluator
- java.lang.Object
-
- com.google.gerrit.server.project.SubmitRuleEvaluator
-
public class SubmitRuleEvaluator extends Object
Evaluates a submit-like Prolog rule found in the rules.pl file of the current project and filters the results through rules found in the parent projects, all the way up to All-Projects.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
SubmitRuleEvaluator.Factory
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SubmitRecord
createRuleError(String err)
static SubmitRecord
defaultRuleError()
static SubmitTypeRecord
defaultTypeError()
List<SubmitRecord>
evaluate(ChangeData cd)
Evaluate the submit rules.SubmitTypeRecord
getSubmitType(ChangeData cd)
Evaluate the submit type rules to get the submit type.
-
-
-
Method Detail
-
defaultRuleError
public static SubmitRecord defaultRuleError()
-
createRuleError
public static SubmitRecord createRuleError(String err)
-
defaultTypeError
public static SubmitTypeRecord defaultTypeError()
-
evaluate
public List<SubmitRecord> evaluate(ChangeData cd)
Evaluate the submit rules.- Parameters:
cd
- ChangeData to evaluate- Returns:
- List of
SubmitRecord
objects returned from the evaluated rules, including any errors.
-
getSubmitType
public SubmitTypeRecord getSubmitType(ChangeData cd)
Evaluate the submit type rules to get the submit type.- Parameters:
cd
-- Returns:
- record from the evaluated rules.
-
-