Class ContentExceptionMapper
java.lang.Object
io.goobi.viewer.api.rest.exceptions.ContentExceptionMapper
- All Implemented Interfaces:
ExceptionMapper<de.unigoettingen.sub.commons.contentlib.exceptions.ContentLibException>
@Provider
public class ContentExceptionMapper
extends Object
implements ExceptionMapper<de.unigoettingen.sub.commons.contentlib.exceptions.ContentLibException>
JAX-RS exception mapper that converts
ContentLibException instances to HTTP error
responses with appropriate status codes. Copied from ContentServer to catch ContentServer exceptions.- Author:
- Florian Alpers
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionContentExceptionMapper(HttpServletRequest request, HttpServletResponse response) -
Method Summary
Modifier and TypeMethodDescriptiontoResponse(de.unigoettingen.sub.commons.contentlib.exceptions.ContentLibException e)
-
Constructor Details
-
ContentExceptionMapper
public ContentExceptionMapper() -
ContentExceptionMapper
-
-
Method Details
-
toResponse
public Response toResponse(de.unigoettingen.sub.commons.contentlib.exceptions.ContentLibException e) - Specified by:
toResponsein interfaceExceptionMapper<de.unigoettingen.sub.commons.contentlib.exceptions.ContentLibException>
-