Package fr.gouv.vitam.security.internal.rest.mapper

# Class PersonalCertificateExceptionMapper

java.lang.Object
fr.gouv.vitam.security.internal.rest.mapper.PersonalCertificateExceptionMapper

All Implemented Interfaces:
  `jakarta.ws.rs.ext.ExceptionMapper<PersonalCertificateException>`

public class PersonalCertificateExceptionMapper extends Object implements jakarta.ws.rs.ext.ExceptionMapper<PersonalCertificateException>
Mapper for PersonalCertificateException

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `PersonalCertificateExceptionMapper()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `jakarta.ws.rs.core.Response`
  `toResponse(PersonalCertificateException exception)`
  Map an exception to a `Response`.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### PersonalCertificateExceptionMapper

    public PersonalCertificateExceptionMapper()

- ## Method Details

  - ### toResponse

    public jakarta.ws.rs.core.Response toResponse(PersonalCertificateException exception)
    Map an exception to a `Response`. Returning `null` results in a `Response.Status.NO_CONTENT` response. Throwing a runtime exception results in a `Response.Status.INTERNAL_SERVER_ERROR` response.
    Specified by:
      `toResponse` in interface `jakarta.ws.rs.ext.ExceptionMapper<PersonalCertificateException>`
    Parameters:
      `exception` - the exception to map to a response.
    Returns:
      a response mapped from the supplied exception.