Class ServiceExceptionMapper
- java.lang.Object
-
- com.atlassian.confluence.rest.api.exception.ServiceExceptionMapper
-
- All Implemented Interfaces:
javax.ws.rs.ext.ExceptionMapper<Exception>
- Direct Known Subclasses:
LegacyLoggingExceptionMapper
,RestExceptionMapper
,RestExceptionMapper
,RestExceptionMapper
,RestExceptionMapper
,RestExceptionMapper
,RestExceptionMapper
,RestExceptionMapper
public abstract class ServiceExceptionMapper extends Object implements javax.ws.rs.ext.ExceptionMapper<Exception>
ConvertsServiceException
s intoResponse
s containingRestError
s.The conversion will be done automatically for any REST Resource that throws a ServiceException.
To get the benefit of this mapping in your plugin, currently you need to implement this class in the package with your rest resources and annotate the implementing class with javax.ws.rs.ext.Provider- Since:
- 5.9
-
-
Constructor Summary
Constructors Constructor Description ServiceExceptionMapper()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract void
_annotateThisClassWithProvider()
This method exists to remind developers that they need to annotate the implementing class with jersey's javax.ws.rs.ext.Provider annotation.javax.ws.rs.core.Response
toResponse(Exception exception)
-
-
-
Method Detail
-
toResponse
public final javax.ws.rs.core.Response toResponse(Exception exception)
- Specified by:
toResponse
in interfacejavax.ws.rs.ext.ExceptionMapper<Exception>
-
_annotateThisClassWithProvider
protected abstract void _annotateThisClassWithProvider()
This method exists to remind developers that they need to annotate the implementing class with jersey's javax.ws.rs.ext.Provider annotation. The implementing class will also need to be placed in the package that is scanned by the atlassian-rest for rest modules.
-
-