Package ubic.gemma.rest.providers
Class NotFoundExceptionMapper
- java.lang.Object
-
- ubic.gemma.rest.providers.AbstractExceptionMapper<javax.ws.rs.NotFoundException>
-
- ubic.gemma.rest.providers.NotFoundExceptionMapper
-
- All Implemented Interfaces:
javax.ws.rs.ext.ExceptionMapper<javax.ws.rs.NotFoundException>
@Provider public class NotFoundExceptionMapper extends AbstractExceptionMapper<javax.ws.rs.NotFoundException>
This mapper ensures that raisedNotFoundException
throughout the API contain well-formedResponseErrorObject
entity. Normally, this would be handled byWebApplicationExceptionMapper
, but we also want to expose the stack trace in the case of a missing entity.- Author:
- poirigui
-
-
Constructor Summary
Constructors Constructor Description NotFoundExceptionMapper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected javax.ws.rs.core.Response.Status
getStatus(javax.ws.rs.NotFoundException exception)
Translate the exception to an HTTPResponse.Status
.protected WellComposedErrorBody
getWellComposedErrorBody(javax.ws.rs.NotFoundException exception)
Obtain aWellComposedErrorBody
for the exception.-
Methods inherited from class ubic.gemma.rest.providers.AbstractExceptionMapper
logException, toResponse
-
-
-
-
Method Detail
-
getStatus
protected javax.ws.rs.core.Response.Status getStatus(javax.ws.rs.NotFoundException exception)
Description copied from class:AbstractExceptionMapper
Translate the exception to an HTTPResponse.Status
.- Specified by:
getStatus
in classAbstractExceptionMapper<javax.ws.rs.NotFoundException>
-
getWellComposedErrorBody
protected WellComposedErrorBody getWellComposedErrorBody(javax.ws.rs.NotFoundException exception)
Description copied from class:AbstractExceptionMapper
Obtain aWellComposedErrorBody
for the exception.- Overrides:
getWellComposedErrorBody
in classAbstractExceptionMapper<javax.ws.rs.NotFoundException>
-
-