public abstract class AbstractValidator extends java.lang.Object implements Validator
Constructor and Description |
---|
AbstractValidator() |
Modifier and Type | Method and Description |
---|---|
<T> T |
onErrorForwardTo(java.lang.Class<T> controller)
Shortcut for
|
<T> T |
onErrorForwardTo(T controller)
Shortcut for
|
<T> T |
onErrorRedirectTo(java.lang.Class<T> controller)
Shortcut for
|
<T> T |
onErrorRedirectTo(T controller)
Shortcut for
|
void |
onErrorSendBadRequest()
Shortcut for
|
<T> T |
onErrorUsePageOf(java.lang.Class<T> controller)
Shortcut for
|
<T> T |
onErrorUsePageOf(T controller)
Shortcut for
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
add, addAll, checking, getErrors, hasErrors, onErrorUse, validate, validateProperties
public <T> T onErrorForwardTo(java.lang.Class<T> controller)
Validator
onErrorUse(logic()).forwardTo(controller);
onErrorForwardTo
in interface Validator
public <T> T onErrorForwardTo(T controller)
Validator
onErrorUse(logic()).forwardTo(controller.getClass());For usage in the same controller:
validator.onErrorForwardTo(this).someLogic();
onErrorForwardTo
in interface Validator
public <T> T onErrorRedirectTo(java.lang.Class<T> controller)
Validator
onErrorUse(logic()).redirectTo(controller);
onErrorRedirectTo
in interface Validator
public <T> T onErrorRedirectTo(T controller)
Validator
onErrorUse(logic()).redirectTo(controller.getClass());For usage in the same controller:
validator.onErrorRedirectTo(this).someLogic();
onErrorRedirectTo
in interface Validator
public <T> T onErrorUsePageOf(java.lang.Class<T> controller)
Validator
onErrorUse(page()).of(controller);
onErrorUsePageOf
in interface Validator
public <T> T onErrorUsePageOf(T controller)
Validator
onErrorUse(page()).of(controller.getClass());For usage in the same controller:
validator.onErrorUsePageOf(this).someLogic();
onErrorUsePageOf
in interface Validator
public void onErrorSendBadRequest()
Validator
onErrorUse(status()).badRequest(errors);the actual validation errors list will be used.
onErrorSendBadRequest
in interface Validator
Copyright © 2013 Caelum. All Rights Reserved.