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 aJsonObject
object.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.boolean
isError()
Returnstrue
if the message level is ERROR.boolean
Returnstrue
if the message level is SUCCESS.boolean
Returnstrue
if the message level is WARNING.
-
Method Details
-
getValidationLevel
ValidationLevel getValidationLevel()The validation level of thr message : ERROR, WARNING or SUCCESS. -
isWarning
boolean isWarning()Returnstrue
if the message level is WARNING. -
isSuccess
boolean isSuccess()Returnstrue
if the message level is SUCCESS. -
isError
boolean isError()Returnstrue
if 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 aJsonObject
object.The resulting
JsonObject
object is immutable.- Specified by:
convertToJsonObject
in interfaceToJsonObjectConvertible
-