public interface ValidationResult
An interface that defines the results of a validation process.
Instances of this class are returned by Validator
objects. They
contain all information about the validation results: a flag whether the
validation was successful and a list with messages generating during the
validation operation. Messages can be either error or warning messages.
Modifier and Type | Method and Description |
---|---|
Collection<ValidationMessage> |
getValidationMessages()
Returns a collection with all
ValidationMessage objects that were
created during validation. |
Collection<ValidationMessage> |
getValidationMessages(ValidationMessageLevel level)
Returns a collection with all
ValidationMessage objects of the
specified level that were created during validation. |
boolean |
hasMessages(ValidationMessageLevel level)
Returns a flag whether this object contains validation messages of the
specified level.
|
boolean |
isValid()
Returns a flag if the validation was successful.
|
boolean isValid()
Collection<ValidationMessage> getValidationMessages()
ValidationMessage
objects that were
created during validation. If isValid()
returns false,
this collection should at least contain one element with the
ValidationMessageLevel
ERROR
. The objects in the returned
collection can be used to find out, which specific errors have been
occurred and for displaying messages to the user. The returned list must
not be null.boolean hasMessages(ValidationMessageLevel level)
level
- the ValidationMessageLevel
to checkValidationMessageLevel
Collection<ValidationMessage> getValidationMessages(ValidationMessageLevel level)
ValidationMessage
objects of the
specified level that were created during validation. This method allows
filtering for a specific message level. An implementation should never
return null.level
- the ValidationMessageLevel
Copyright © 2016 The JGUIraffe Team. All rights reserved.