org.apache.struts2.oval.interceptor
Class OValValidationInterceptor
java.lang.Object
com.opensymphony.xwork2.interceptor.AbstractInterceptor
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor
org.apache.struts2.oval.interceptor.OValValidationInterceptor
- All Implemented Interfaces:
- com.opensymphony.xwork2.interceptor.Interceptor, Serializable
public class OValValidationInterceptor
- extends com.opensymphony.xwork2.interceptor.MethodFilterInterceptor
- See Also:
- Serialized Form
Fields inherited from class com.opensymphony.xwork2.interceptor.MethodFilterInterceptor |
excludeMethods, includeMethods, log |
Methods inherited from class com.opensymphony.xwork2.interceptor.MethodFilterInterceptor |
applyInterceptor, getExcludeMethodsSet, getIncludeMethodsSet, intercept, setExcludeMethods, setIncludeMethods |
Methods inherited from class com.opensymphony.xwork2.interceptor.AbstractInterceptor |
destroy, init |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
VALIDATE_PREFIX
protected static final String VALIDATE_PREFIX
- See Also:
- Constant Field Values
ALT_VALIDATE_PREFIX
protected static final String ALT_VALIDATE_PREFIX
- See Also:
- Constant Field Values
alwaysInvokeValidate
protected boolean alwaysInvokeValidate
programmatic
protected boolean programmatic
validationManager
protected OValValidationManager validationManager
OValValidationInterceptor
public OValValidationInterceptor()
setValidationManager
public void setValidationManager(OValValidationManager validationManager)
setValidateJPAAnnotations
public void setValidateJPAAnnotations(String validateJPAAnnotations)
- Enable OVal support for JPA
setProgrammatic
public void setProgrammatic(boolean programmatic)
- Determines if
Validateable
's validate()
should be called,
as well as methods whose name that start with "validate". Defaults to "true".
- Parameters:
programmatic
- true then validate()
is invoked.
setAlwaysInvokeValidate
public void setAlwaysInvokeValidate(String alwaysInvokeValidate)
- Determines if
Validateable
's validate()
should always
be invoked. Default to "true".
- Parameters:
alwaysInvokeValidate
- true then validate()
is always invoked.
doIntercept
protected String doIntercept(com.opensymphony.xwork2.ActionInvocation invocation)
throws Exception
- Specified by:
doIntercept
in class com.opensymphony.xwork2.interceptor.MethodFilterInterceptor
- Throws:
Exception
performOValValidation
protected void performOValValidation(Object action,
com.opensymphony.xwork2.util.ValueStack valueStack,
String methodName,
String context)
throws NoSuchMethodException
- Throws:
NoSuchMethodException
buildValidationError
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
isActionError
protected boolean isActionError(net.sf.oval.ConstraintViolation violation)
- Decide if a violation should be added to the fieldErrors or actionErrors
Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.