public class ValidationMessageDefault extends Object implements ValidationMessage
| Constructor and Description |
|---|
ValidationMessageDefault(ValidationLevel validationLevel,
String code,
String text,
ValidationHtmlEscapeType htmlEscapeType,
JsonManager jsonManager) |
| Modifier and Type | Method and Description |
|---|---|
JsonObject |
convertToJsonObject()
Converts the message to a
JsonObject object. |
String |
getCode()
The validation code.
|
ValidationHtmlEscapeType |
getHtmlEscapeType()
How should the text be escaped when displayed in
HTML?
|
protected JsonManager |
getJsonManager() |
String |
getText()
The text of the message.
|
ValidationLevel |
getValidationLevel()
The validation level of thr message :
ERROR, WARNING or SUCCESS.
|
boolean |
isError()
Returns
true if the message level
is ERROR. |
boolean |
isSuccess()
Returns
true if the message level
is SUCCESS. |
boolean |
isWarning()
Returns
true if the message level
is WARNING. |
String |
toString() |
public ValidationMessageDefault(ValidationLevel validationLevel, String code, String text, ValidationHtmlEscapeType htmlEscapeType, JsonManager jsonManager)
public String getText()
ValidationMessagegetText in interface ValidationMessagepublic ValidationHtmlEscapeType getHtmlEscapeType()
ValidationMessagegetHtmlEscapeType in interface ValidationMessagepublic String getCode()
ValidationMessagegetCode in interface ValidationMessagepublic ValidationLevel getValidationLevel()
ValidationMessagegetValidationLevel in interface ValidationMessagepublic boolean isWarning()
ValidationMessagetrue if the message level
is WARNING.isWarning in interface ValidationMessagepublic boolean isSuccess()
ValidationMessagetrue if the message level
is SUCCESS.isSuccess in interface ValidationMessagepublic boolean isError()
ValidationMessagetrue if the message level
is ERROR.isError in interface ValidationMessageprotected JsonManager getJsonManager()
public JsonObject convertToJsonObject()
ValidationMessageJsonObject object.
The resulting JsonObject object
is immutable.
convertToJsonObject in interface ToJsonObjectConvertibleconvertToJsonObject in interface ValidationMessageCopyright © 2018. All rights reserved.