public class OValValidationInterceptor extends MethodFilterInterceptor
ConditionalInterceptor.LegacyAdapter
Modifier and Type | Field and Description |
---|---|
protected static String |
ALT_VALIDATE_PREFIX |
protected boolean |
alwaysInvokeValidate |
protected boolean |
programmatic |
static String |
STRUTS_OVAL_VALIDATE_JPAANNOTATIONS |
protected TextProviderFactory |
textProviderFactory |
protected static String |
VALIDATE_PREFIX |
protected boolean |
validateJPAAnnotations |
protected OValValidationManager |
validationManager |
excludeMethods, includeMethods
Constructor and Description |
---|
OValValidationInterceptor() |
Modifier and Type | Method and Description |
---|---|
protected org.apache.struts2.oval.interceptor.OValValidationInterceptor.ValidationError |
buildValidationError(List<net.sf.oval.context.OValContext> contextPath,
String message)
Get field name and message, used to add the validation error to fieldErrors
|
protected String |
doIntercept(ActionInvocation invocation) |
default String |
extractName(Method method) |
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,
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 |
setTextProviderFactory(TextProviderFactory textProviderFactory) |
void |
setValidateJPAAnnotations(String validateJPAAnnotations)
Enable OVal support for JPA
|
void |
setValidationManager(OValValidationManager validationManager) |
applyInterceptor, getExcludeMethodsSet, getIncludeMethodsSet, intercept, setExcludeMethods, setIncludeMethods
intercept, shouldIntercept, shouldIntercept
destroy, init, setDisabled
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
adapt
adapt
destroy, init
public static final String STRUTS_OVAL_VALIDATE_JPAANNOTATIONS
protected static final String VALIDATE_PREFIX
protected static final String ALT_VALIDATE_PREFIX
protected boolean alwaysInvokeValidate
protected boolean programmatic
protected OValValidationManager validationManager
protected boolean validateJPAAnnotations
protected TextProviderFactory textProviderFactory
public void setValidationManager(OValValidationManager validationManager)
public void setTextProviderFactory(TextProviderFactory textProviderFactory)
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(ActionInvocation invocation) throws Exception
doIntercept
in class MethodFilterInterceptor
Exception
protected void performOValValidation(Object action, ValueStack valueStack, String methodName, String context) throws NoSuchMethodException
NoSuchMethodException
protected org.apache.struts2.oval.interceptor.OValValidationInterceptor.ValidationError buildValidationError(List<net.sf.oval.context.OValContext> contextPath, String message)
protected boolean isActionError(net.sf.oval.ConstraintViolation violation)
Copyright © 2000–2024 Apache Software Foundation. All rights reserved.