Class ResteasyViolationExceptionMapper
- java.lang.Object
-
- org.jboss.resteasy.plugins.validation.ResteasyViolationExceptionMapper
-
- All Implemented Interfaces:
ExceptionMapper<ValidationException>
@Provider public class ResteasyViolationExceptionMapper extends Object implements ExceptionMapper<ValidationException>
- Version:
- $Revision: 1.1 $ Created Mar 31, 2012
- Author:
- Ron Sigal
-
-
Constructor Summary
Constructors Constructor Description ResteasyViolationExceptionMapper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ResponsebuildResponse(Object entity, String mediaType, Response.Status status)protected ResponsebuildViolationReportResponse(ResteasyViolationException exception, Response.Status status)ResponsetoResponse(ValidationException exception)Map an exception to aResponse.protected StringunwrapException(Throwable t)
-
-
-
Method Detail
-
toResponse
public Response toResponse(ValidationException exception)
Description copied from interface:ExceptionMapperMap an exception to aResponse. Returningnullresults in aResponse.Status.NO_CONTENTresponse. Throwing a runtime exception results in aResponse.Status.INTERNAL_SERVER_ERRORresponse.- Specified by:
toResponsein interfaceExceptionMapper<ValidationException>- Parameters:
exception- the exception to map to a response.- Returns:
- a response mapped from the supplied exception.
-
buildResponse
protected Response buildResponse(Object entity, String mediaType, Response.Status status)
-
buildViolationReportResponse
protected Response buildViolationReportResponse(ResteasyViolationException exception, Response.Status status)
-
-