org.jboss.seam.rest.validation
Class ValidationInterceptor

java.lang.Object
  extended by org.jboss.seam.rest.validation.ValidationInterceptor
All Implemented Interfaces:
Serializable

@Interceptor
@ValidateRequest
public class ValidationInterceptor
extends Object
implements Serializable

See Also:
Serialized Form

Constructor Summary
ValidationInterceptor()
           
 
Method Summary
 Object intercept(javax.interceptor.InvocationContext ctx)
          Intercepts method invocations to @ValidateRequest annotated methods.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValidationInterceptor

public ValidationInterceptor()
Method Detail

intercept

public Object intercept(javax.interceptor.InvocationContext ctx)
                 throws Exception
Intercepts method invocations to @ValidateRequest annotated methods.

On the first run, the method is scanned for message body parameters and parameter object parameters and the metadata is stored within ValidationMetadata.

On subsequent runs, method parameters and the declaring instance are validated using Validator. ValidationException is thrown if validation fails.

Throws:
ValidationException
Exception


Copyright © 2011 Seam Framework. All Rights Reserved.