public class OValValidationInterceptor
extends com.opensymphony.xwork2.interceptor.MethodFilterInterceptor
Modifier and Type | Field and Description |
---|---|
protected static String |
ALT_VALIDATE_PREFIX |
protected boolean |
alwaysInvokeValidate |
protected boolean |
programmatic |
protected static String |
VALIDATE_PREFIX |
protected OValValidationManager |
validationManager |
Constructor and Description |
---|
OValValidationInterceptor() |
Modifier and Type | Method and Description |
---|---|
protected org.apache.struts2.oval.interceptor.OValValidationInterceptor.ValidationError |
buildValidationError(net.sf.oval.ConstraintViolation violation,
String message)
Get field name and message, used to add the validation error to fieldErrors
|
protected String |
doIntercept(com.opensymphony.xwork2.ActionInvocation invocation) |
protected boolean |
isActionError(net.sf.oval.ConstraintViolation violation)
Decide if a violation should be added to the fieldErrors or actionErrors
|
protected void |
performOValValidation(Object action,
com.opensymphony.xwork2.util.ValueStack valueStack,
String methodName,
String context) |
void |
setAlwaysInvokeValidate(String alwaysInvokeValidate)
Determines if
Validateable 's validate() should always
be invoked. |
void |
setProgrammatic(boolean programmatic)
Determines if
Validateable 's validate() should be called,
as well as methods whose name that start with "validate". |
void |
setValidateJPAAnnotations(String validateJPAAnnotations)
Enable OVal support for JPA
|
void |
setValidationManager(OValValidationManager validationManager) |
protected static final String VALIDATE_PREFIX
protected static final String ALT_VALIDATE_PREFIX
protected boolean alwaysInvokeValidate
protected boolean programmatic
protected OValValidationManager validationManager
public void setValidationManager(OValValidationManager validationManager)
public void setValidateJPAAnnotations(String validateJPAAnnotations)
public void setProgrammatic(boolean programmatic)
Validateable
's validate()
should be called,
as well as methods whose name that start with "validate". Defaults to "true".programmatic
- true then validate()
is invoked.public void setAlwaysInvokeValidate(String alwaysInvokeValidate)
Validateable
's validate()
should always
be invoked. Default to "true".alwaysInvokeValidate
- true then validate()
is always invoked.protected String doIntercept(com.opensymphony.xwork2.ActionInvocation invocation) throws Exception
doIntercept
in class com.opensymphony.xwork2.interceptor.MethodFilterInterceptor
Exception
protected void performOValValidation(Object action, com.opensymphony.xwork2.util.ValueStack valueStack, String methodName, String context) throws NoSuchMethodException
NoSuchMethodException
protected org.apache.struts2.oval.interceptor.OValValidationInterceptor.ValidationError buildValidationError(net.sf.oval.ConstraintViolation violation, String message)
protected boolean isActionError(net.sf.oval.ConstraintViolation violation)
Copyright © 2000-2015 Apache Software Foundation. All Rights Reserved.