| Modifier and Type | Field and Description |
|---|---|
private java.util.List<Message> |
messages
List of validation failure messages.
|
private boolean |
valid
Flag whether some of inner validators failed.
|
private java.util.List<Validator> |
validators
List of validators.
|
| Modifier | Constructor and Description |
|---|---|
protected |
GroupValidator()
Creates new instance of group validator.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(Validator aValidator)
Adds new validator to collection of validations.
|
void |
add(Validator aValidator,
Adds new validator to collection of validations.
|
static GroupValidator |
getInstance()
Returns new instance of group validator.
|
Message |
getMessage()
Returns default message of validator.
|
java.util.List<Message> |
getMessages()
Returns all messages from validators contained in this group validator.
|
boolean |
isValid()
Performs validation and returns its result.
|
void |
validate(java.lang.Class<? extends UESRuntimeException> aException)
Performs validation and throws exception in case validation did not pass.
|
void |
validate(ErrorCode aErrorCode,
Performs validation and throws exception in case validation did not pass.
|
aValidator - Validator to be addedaValidator - Validator to be addedaMsgCode - Code of custom validation messageaMessage - Text of custom validation messageaParameters - Parameters of custom validation messagegetMessage in interface ValidatorValidator.getMessage()isValid in interface ValidatorValidator.isValid()aException - Class of exception to be thrown in case validation did not pass.