Class WebApplicationExceptionSilverpeasMapper
- java.lang.Object
-
- edu.psu.swe.commons.jaxrs.exceptions.mappers.WebApplicationExceptionMapper
-
- org.silverpeas.core.web.rs.mappers.WebApplicationExceptionSilverpeasMapper
-
- All Implemented Interfaces:
javax.ws.rs.ext.ExceptionMapper<javax.ws.rs.WebApplicationException>
@Provider @Priority(3000) public class WebApplicationExceptionSilverpeasMapper extends edu.psu.swe.commons.jaxrs.exceptions.mappers.WebApplicationExceptionMapper implements javax.ws.rs.ext.ExceptionMapper<javax.ws.rs.WebApplicationException>
Customizes JAX-RS behaviour so that aWebApplicationException
thrown with a cause and a response with no content is mapped to a response containing the exception message. A priority is given to the mapper in order to take precedence over the same type of mappers provided by any external libraries (id est commons-jaxrs). The priority isn't too high in order to give priority to any Silverpeas mapper of a WebApplicationException if any.
-
-
Constructor Summary
Constructors Constructor Description WebApplicationExceptionSilverpeasMapper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.ws.rs.core.Response
toResponse(javax.ws.rs.WebApplicationException exception)
-
-
-
Method Detail
-
toResponse
public javax.ws.rs.core.Response toResponse(javax.ws.rs.WebApplicationException exception)
- Specified by:
toResponse
in interfacejavax.ws.rs.ext.ExceptionMapper<javax.ws.rs.WebApplicationException>
- Overrides:
toResponse
in classedu.psu.swe.commons.jaxrs.exceptions.mappers.WebApplicationExceptionMapper
-
-