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 -
Method Summary
Modifier and TypeMethodDescriptionprotected ResponsebuildResponse(Object entity, String mediaType, Response.Status status) protected ResponsebuildViolationReportResponse(ResteasyViolationException exception, Response.Status status) toResponse(ValidationException exception) Map an exception to aResponse.protected String
-
Constructor Details
-
ResteasyViolationExceptionMapper
public ResteasyViolationExceptionMapper()
-
-
Method Details
-
toResponse
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
-
buildViolationReportResponse
protected Response buildViolationReportResponse(ResteasyViolationException exception, Response.Status status) -
unwrapException
-