Class ValidationMessage
- java.lang.Object
-
- com.google.gerrit.server.git.validators.ValidationMessage
-
- Direct Known Subclasses:
CommitValidationMessage
public class ValidationMessage extends Object
Message used as result of a validation that run during a git operation (for examplegit push. Intended to be shown to users.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classValidationMessage.Type
-
Constructor Summary
Constructors Constructor Description ValidationMessage(String message, boolean isError)ValidationMessage(String message, ValidationMessage.Type type)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetMessage()Returns the message to be shown to the user.ValidationMessage.TypegetType()Returns theValidationMessage.Type.booleanisError()Returns if this message is an error.
-
-
-
Constructor Detail
-
ValidationMessage
public ValidationMessage(String message, ValidationMessage.Type type)
- See Also:
ValidationMessage
-
ValidationMessage
public ValidationMessage(String message, boolean isError)
-
-
Method Detail
-
getMessage
public String getMessage()
Returns the message to be shown to the user.
-
getType
public ValidationMessage.Type getType()
Returns theValidationMessage.Type. Used to as prefix for the message in the git CLI and to color messages.
-
isError
public boolean isError()
Returns if this message is an error. Used to decide if the operation should be aborted.
-
-