public class MockValidator extends AbstractValidator
| Constructor and Description |
|---|
MockValidator() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(Message message) |
void |
addAll(Collection<? extends Message> messages) |
void |
checking(Validations validations) |
boolean |
containsMessage(String messageKey,
Object... messageParameters) |
List<Message> |
getErrors() |
boolean |
hasErrors() |
<T extends View> |
onErrorUse(Class<T> view) |
void |
validate(Object object,
Class<?>... groups)
Validate an object using some Bean Validation engine.
|
void |
validateProperties(Object object,
String... properties)
Validate the specifics propeties of an object using some Bean Validation engine.
|
void |
validateProperty(Object object,
String property,
Class<?>... groups)
Validate the specific property of an object using some Bean Validation engine.
|
onErrorForwardTo, onErrorForwardTo, onErrorRedirectTo, onErrorRedirectTo, onErrorSendBadRequest, onErrorUsePageOf, onErrorUsePageOfpublic void checking(Validations validations)
public void validate(Object object, Class<?>... groups)
Validatorobject - The object to be validated.groups - The groups to be validated.public void validateProperties(Object object, String... properties)
Validatorobject - The object to be validated.properties - The names of properties to be validated.public void validateProperty(Object object, String property, Class<?>... groups)
Validatorobject - The object to be validated.property - The name of property to be validated.groups - The groups to be validated.public void addAll(Collection<? extends Message> messages)
public void add(Message message)
public boolean hasErrors()
Copyright © 2014 Caelum. All Rights Reserved.