org.jboss.seam.validation
Class ValidationInterceptor
java.lang.Object
org.jboss.seam.validation.ValidationInterceptor
- All Implemented Interfaces:
- Serializable
@Interceptor
public class ValidationInterceptor
- extends Object
- implements Serializable
An interceptor which performs a validation of the Bean Validation constraints specified at the parameters and/or return
values of intercepted methods using the method validation functionality provided by Hibernate Validator.
- Author:
- Gunnar Morling
- See Also:
- Serialized Form
|
Method Summary |
Object |
validateMethodInvocation(javax.interceptor.InvocationContext ctx)
Validates the Bean Validation constraints specified at the parameters and/or return value of the intercepted method. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ValidationInterceptor
public ValidationInterceptor()
validateMethodInvocation
public Object validateMethodInvocation(javax.interceptor.InvocationContext ctx)
throws Exception
- Validates the Bean Validation constraints specified at the parameters and/or return value of the intercepted method.
- Parameters:
ctx - The context of the intercepted method invocation.
- Returns:
- The result of the method invocation.
- Throws:
Exception - Any exception caused by the intercepted method invocation. A MethodConstraintViolationException
in case at least one constraint violation occurred either during parameter or return value validation.
Copyright © 2011 Seam Framework & Gunnar Morling. All Rights Reserved.