Package ubic.gemma.rest.providers
Class AbstractExceptionMapper<E extends Throwable>
- java.lang.Object
-
- ubic.gemma.rest.providers.AbstractExceptionMapper<E>
-
- All Implemented Interfaces:
javax.ws.rs.ext.ExceptionMapper<E>
- Direct Known Subclasses:
AccessDeniedExceptionMapper
,AuthenticationExceptionMapper
,EntityNotFoundExceptionMapper
,MalformedArgExceptionMapper
,NotFoundExceptionMapper
,UnhandledExceptionMapper
,WebApplicationExceptionMapper
public abstract class AbstractExceptionMapper<E extends Throwable> extends Object implements javax.ws.rs.ext.ExceptionMapper<E>
-
-
Constructor Summary
Constructors Constructor Description AbstractExceptionMapper()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract javax.ws.rs.core.Response.Status
getStatus(E exception)
Translate the exception to an HTTPResponse.Status
.protected WellComposedErrorBody
getWellComposedErrorBody(E exception)
Obtain aWellComposedErrorBody
for the exception.protected boolean
logException()
Indicate if the exception should be logged.javax.ws.rs.core.Response
toResponse(E exception)
-
-
-
Method Detail
-
getStatus
protected abstract javax.ws.rs.core.Response.Status getStatus(E exception)
Translate the exception to an HTTPResponse.Status
.
-
getWellComposedErrorBody
protected WellComposedErrorBody getWellComposedErrorBody(E exception)
Obtain aWellComposedErrorBody
for the exception.
-
logException
protected boolean logException()
Indicate if the exception should be logged.
-
-