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:
- Interceptor, java.io.Serializable
public class OValValidationInterceptor
- extends MethodFilterInterceptor
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
VALIDATE_PREFIX
protected static final java.lang.String VALIDATE_PREFIX
- See Also:
- Constant Field Values
ALT_VALIDATE_PREFIX
protected static final java.lang.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(boolean validateJPAAnnotations)
- Enable OVal support fopr 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(java.lang.String alwaysInvokeValidate)
- Determines if
Validateable
's validate()
should always
be invoked. Default to "true".
- Parameters:
alwaysInvokeValidate
- true then validate()
is always invoked.
doIntercept
protected java.lang.String doIntercept(ActionInvocation invocation)
throws java.lang.Exception
- Specified by:
doIntercept
in class MethodFilterInterceptor
- Throws:
java.lang.Exception
performOValValidation
protected void performOValValidation(java.lang.Object action,
ValueStack valueStack,
java.lang.String methodName,
java.lang.String context)
throws java.lang.NoSuchMethodException
- Throws:
java.lang.NoSuchMethodException
buildValidationError
protected org.apache.struts2.oval.interceptor.OValValidationInterceptor.ValidationError buildValidationError(net.sf.oval.ConstraintViolation violation,
java.lang.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-2012 Apache Software Foundation. All Rights Reserved.