Class CommitValidationInfo
java.lang.Object
com.google.gerrit.server.git.validators.CommitValidationInfo
Result of invoking a
CommitValidationListener if the commit passed the validator.
Note, if a commit is rejected by a CommitValidationListener it throws a CommitValidationException and no CommitValidationInfo is returned. Hence
CommitValidationInfo doesn't cover rejections.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionEmpty metadata map. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionmetadata()Metadata about the commit validation that has been performed, for example the version ID of the configuration that was used for the commit validation or the SHA1 from which the configuration that was used for the commit validation was read.static CommitValidationInfonotApplicable(com.google.common.collect.ImmutableMap<String, String> metadata) static CommitValidationInfopassed(com.google.common.collect.ImmutableMap<String, String> metadata, com.google.common.collect.ImmutableList<CommitValidationMessage> validationMessages) static CommitValidationInfoskippedByUser(com.google.common.collect.ImmutableMap<String, String> metadata) abstract CommitValidationInfo.Statusstatus()Status of the commit validation run.abstract com.google.common.collect.ImmutableList<CommitValidationMessage> Validation messages collected during the commit validation run.
-
Field Details
-
NO_METADATA
Empty metadata map.
-
-
Constructor Details
-
CommitValidationInfo
public CommitValidationInfo()
-
-
Method Details
-
status
Status of the commit validation run. -
metadata
Metadata about the commit validation that has been performed, for example the version ID of the configuration that was used for the commit validation or the SHA1 from which the configuration that was used for the commit validation was read. -
validationMessages
public abstract com.google.common.collect.ImmutableList<CommitValidationMessage> validationMessages()Validation messages collected during the commit validation run. -
passed
public static CommitValidationInfo passed(com.google.common.collect.ImmutableMap<String, String> metadata, com.google.common.collect.ImmutableList<CommitValidationMessage> validationMessages) -
notApplicable
public static CommitValidationInfo notApplicable(com.google.common.collect.ImmutableMap<String, String> metadata) -
skippedByUser
public static CommitValidationInfo skippedByUser(com.google.common.collect.ImmutableMap<String, String> metadata)
-