Package ubic.gemma.rest.providers
Class WebApplicationExceptionMapper
- java.lang.Object
-
- ubic.gemma.rest.providers.AbstractExceptionMapper<javax.ws.rs.WebApplicationException>
-
- ubic.gemma.rest.providers.WebApplicationExceptionMapper
-
- All Implemented Interfaces:
javax.ws.rs.ext.ExceptionMapper<javax.ws.rs.WebApplicationException>
@Provider public class WebApplicationExceptionMapper extends AbstractExceptionMapper<javax.ws.rs.WebApplicationException>
MapWebApplicationException
so that it always expose aResponseErrorObject
entity.- Author:
- poirigui
-
-
Constructor Summary
Constructors Constructor Description WebApplicationExceptionMapper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected javax.ws.rs.core.Response.ResponseBuilder
getResponseBuilder(javax.ws.rs.WebApplicationException exception)
protected javax.ws.rs.core.Response.Status
getStatus(javax.ws.rs.WebApplicationException exception)
Translate the exception to an HTTPResponse.Status
.protected boolean
logException(javax.ws.rs.WebApplicationException e)
Indicate if the given exception should be logged.-
Methods inherited from class ubic.gemma.rest.providers.AbstractExceptionMapper
getWellComposedErrorBody, toResponse
-
-
-
-
Method Detail
-
logException
protected boolean logException(javax.ws.rs.WebApplicationException e)
Description copied from class:AbstractExceptionMapper
Indicate if the given exception should be logged.- Overrides:
logException
in classAbstractExceptionMapper<javax.ws.rs.WebApplicationException>
-
getStatus
protected javax.ws.rs.core.Response.Status getStatus(javax.ws.rs.WebApplicationException exception)
Description copied from class:AbstractExceptionMapper
Translate the exception to an HTTPResponse.Status
.- Specified by:
getStatus
in classAbstractExceptionMapper<javax.ws.rs.WebApplicationException>
-
getResponseBuilder
protected javax.ws.rs.core.Response.ResponseBuilder getResponseBuilder(javax.ws.rs.WebApplicationException exception)
- Overrides:
getResponseBuilder
in classAbstractExceptionMapper<javax.ws.rs.WebApplicationException>
-
-