public class ValidationResult
extends java.lang.Object
implements java.io.Serializable
| Constructor and Description |
|---|
ValidationResult() |
| Modifier and Type | Method and Description |
|---|---|
void |
addMessage(ValidationMessage.Type type,
java.lang.String field,
java.lang.String messageKey)
Adds a validation message to this validation result
|
void |
addMessage(ValidationMessage.Type type,
java.lang.String field,
java.lang.String messageKey,
java.lang.String[] messageParameters)
Adds a validation message to this validation result
|
Bill |
getCleanedBill()
Gets the cleaned bill data
|
java.util.List<ValidationMessage> |
getValidationMessages()
Gets the list of validation messages
|
boolean |
hasErrors()
Gets if this validation result contains any error messages
|
boolean |
hasMessages()
Gets if this validation result contains any messages
|
boolean |
hasWarnings()
Gets if this validation result contains any warning messages
|
boolean |
isValid()
Gets if the bill data is valid and the validation therefore has succeeded
|
void |
setCleanedBill(Bill cleanedBill)
Sets the cleaned bill data
|
public java.util.List<ValidationMessage> getValidationMessages()
public boolean hasMessages()
true if there are validation messages, false otherwisepublic boolean hasWarnings()
true if there are any warning messages, false otherwisepublic boolean hasErrors()
true if there are any error messages, false otherwisepublic boolean isValid()
true if the bill data was valid, false otherwisepublic void addMessage(ValidationMessage.Type type, java.lang.String field, java.lang.String messageKey)
type - the message typefield - the name of the affected fieldmessageKey - the language-netural message keypublic void addMessage(ValidationMessage.Type type, java.lang.String field, java.lang.String messageKey, java.lang.String[] messageParameters)
type - the message typefield - the name of the affected fieldmessageKey - the language-netural message keymessageParameters - additional message parameters (text) to be inserted into the localized messagepublic Bill getCleanedBill()
public void setCleanedBill(Bill cleanedBill)
cleanedBill - the cleand bill data