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>
-
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.commons.logging.Log
log
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractExceptionMapper(String hostUrl, io.swagger.v3.oas.models.OpenAPI spec, ubic.gemma.core.util.BuildInfo buildInfo)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected javax.ws.rs.core.Response.ResponseBuilder
getResponseBuilder(org.glassfish.jersey.server.ContainerRequest request, E exception)
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(E exception)
Indicate if the given exception should be logged.javax.ws.rs.core.Response
toResponse(E exception)
-
-
-
Constructor Detail
-
AbstractExceptionMapper
protected AbstractExceptionMapper(String hostUrl, io.swagger.v3.oas.models.OpenAPI spec, ubic.gemma.core.util.BuildInfo buildInfo)
-
-
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(E exception)
Indicate if the given exception should be logged.
-
getResponseBuilder
protected javax.ws.rs.core.Response.ResponseBuilder getResponseBuilder(org.glassfish.jersey.server.ContainerRequest request, E exception)
-
-