org.glassfish.jersey.server.internal.inject
Interface ConfiguredValidator

All Superinterfaces:
javax.validation.Validator

@Contract
public interface ConfiguredValidator
extends javax.validation.Validator

Configured validator for Jersey validation purposes.

Author:
Michal Gajdos (michal.gajdos at oracle.com)

Method Summary
 void validateResourceAndInputParams(Object resource, Invocable resourceMethod, Object[] args)
          Validates resource class instance and input parameters of the method.
 void validateResult(Object resource, Invocable resourceMethod, Object result)
          Validates response instance / response entity of the method.
 
Methods inherited from interface javax.validation.Validator
forExecutables, getConstraintsForClass, unwrap, validate, validateProperty, validateValue
 

Method Detail

validateResourceAndInputParams

void validateResourceAndInputParams(Object resource,
                                    Invocable resourceMethod,
                                    Object[] args)
                                    throws javax.validation.ConstraintViolationException
Validates resource class instance and input parameters of the method. ConstraintViolationException raised from this method should be mapped to HTTP 400 status.

Parameters:
resource - resource class instance.
resourceMethod - invocable containing handling and validation methods.
args - input method parameters.
Throws:
javax.validation.ConstraintViolationException - if ConstraintViolation occurs (should be mapped to HTTP 400 status).

validateResult

void validateResult(Object resource,
                    Invocable resourceMethod,
                    Object result)
                    throws javax.validation.ConstraintViolationException
Validates response instance / response entity of the method. ConstraintViolationException raised from this method should be mapped to HTTP 500 status.

Parameters:
resource - resource class instance.
resourceMethod - invocable containing handling and validation methods.
result - response entity.
Throws:
javax.validation.ConstraintViolationException - if ConstraintViolation occurs (should be mapped to HTTP 500 status).


Copyright © 2007-2014, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.