Package org.spincast.core.validation
Interface ValidationMessage
- All Superinterfaces:
ToJsonObjectConvertible
- All Known Implementing Classes:
ValidationMessageDefault
A validation message.
-
Method Summary
Modifier and TypeMethodDescriptionConverts the message to aJsonObjectobject.getCode()The validation code.How should the text be escaped when displayed in HTML?getText()The text of the message.The validation level of thr message : ERROR, WARNING or SUCCESS.booleanisError()Returnstrueif the message level is ERROR.booleanReturnstrueif the message level is SUCCESS.booleanReturnstrueif the message level is WARNING.
-
Method Details
-
getValidationLevel
ValidationLevel getValidationLevel()The validation level of thr message : ERROR, WARNING or SUCCESS. -
isWarning
boolean isWarning()Returnstrueif the message level is WARNING. -
isSuccess
boolean isSuccess()Returnstrueif the message level is SUCCESS. -
isError
boolean isError()Returnstrueif the message level is ERROR. -
getCode
String getCode()The validation code. -
getText
String getText()The text of the message. -
getHtmlEscapeType
ValidationHtmlEscapeType getHtmlEscapeType()How should the text be escaped when displayed in HTML? -
convertToJsonObject
JsonObject convertToJsonObject()Converts the message to aJsonObjectobject.The resulting
JsonObjectobject is immutable.- Specified by:
convertToJsonObjectin interfaceToJsonObjectConvertible
-