Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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

Field Summary
`protected static String` | `ALT_VALIDATE_PREFIX`
`protected boolean` | `alwaysInvokeValidate`
`protected boolean` | `programmatic`
`protected static String` | `VALIDATE_PREFIX`
`protected OValValidationManager` | `validationManager`

Fields inherited from class com.opensymphony.xwork2.interceptor.MethodFilterInterceptor
`excludeMethods, includeMethods, log`

Constructor Summary
`OValValidationInterceptor()`

Method Summary
`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)`

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`

Field Detail

### 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

Constructor Detail

### OValValidationInterceptor

    public OValValidationInterceptor()

Method Detail

### 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

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000–2018 Apache Software Foundation. All rights reserved.