public class ValidationMessageDefault extends Object implements ValidationMessage
| Constructor and Description |
|---|
ValidationMessageDefault(ValidationLevel validationLevel,
String code,
String text,
JsonManager jsonManager) |
| Modifier and Type | Method and Description |
|---|---|
JsonObject |
convertToJsonObject()
Converts the message to a
JsonObject object. |
String |
getCode()
The validation code.
|
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, JsonManager jsonManager)
public String getText()
ValidationMessagegetText 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 © 2017. All rights reserved.