Package org.spincast.core.validation
Class ValidationMessageDefault
java.lang.Object
org.spincast.core.validation.ValidationMessageDefault
- All Implemented Interfaces:
- ToJsonObjectConvertible,- ValidationMessage
Validation message implementation.
- 
Constructor SummaryConstructorsConstructorDescriptionValidationMessageDefault(ValidationLevel validationLevel, String code, String text, ValidationHtmlEscapeType htmlEscapeType, JsonManager jsonManager) 
- 
Method SummaryModifier and TypeMethodDescriptionConverts the message to aJsonObjectobject.getCode()The validation code.How should the text be escaped when displayed in HTML?protected JsonManagergetText()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.toString()
- 
Constructor Details- 
ValidationMessageDefaultpublic ValidationMessageDefault(ValidationLevel validationLevel, String code, String text, ValidationHtmlEscapeType htmlEscapeType, JsonManager jsonManager) 
 
- 
- 
Method Details- 
getTextDescription copied from interface:ValidationMessageThe text of the message.- Specified by:
- getTextin interface- ValidationMessage
 
- 
getHtmlEscapeTypeDescription copied from interface:ValidationMessageHow should the text be escaped when displayed in HTML?- Specified by:
- getHtmlEscapeTypein interface- ValidationMessage
 
- 
getCodeDescription copied from interface:ValidationMessageThe validation code.- Specified by:
- getCodein interface- ValidationMessage
 
- 
getValidationLevelDescription copied from interface:ValidationMessageThe validation level of thr message : ERROR, WARNING or SUCCESS.- Specified by:
- getValidationLevelin interface- ValidationMessage
 
- 
isWarningpublic boolean isWarning()Description copied from interface:ValidationMessageReturnstrueif the message level is WARNING.- Specified by:
- isWarningin interface- ValidationMessage
 
- 
isSuccesspublic boolean isSuccess()Description copied from interface:ValidationMessageReturnstrueif the message level is SUCCESS.- Specified by:
- isSuccessin interface- ValidationMessage
 
- 
isErrorpublic boolean isError()Description copied from interface:ValidationMessageReturnstrueif the message level is ERROR.- Specified by:
- isErrorin interface- ValidationMessage
 
- 
getJsonManager
- 
convertToJsonObjectDescription copied from interface:ValidationMessageConverts the message to aJsonObjectobject.The resulting JsonObjectobject is immutable.- Specified by:
- convertToJsonObjectin interface- ToJsonObjectConvertible
- Specified by:
- convertToJsonObjectin interface- ValidationMessage
 
- 
toString
 
-