Class ExceptionMapper

java.lang.Object
de.bund.bva.isyfact.serviceapi.common.exception.ExceptionMapper

@Deprecated public class ExceptionMapper extends Object
Deprecated.
This module is deprecated and will be removed in a future release. It is recommended to use REST according to IsyFacts REST Concept instead.
This class provides methods for transferring the contents of application exceptions to interfaces or transport exceptions.

It also provides the ability to throw an interface exception using an exception ID and a FehlertextProvider.

  • Constructor Summary

    Constructors
    Constructor
    Description
    Deprecated.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static <T extends de.bund.bva.pliscommon.exception.service.PlisToException>
    T
    createToException(String ausnahmeId, FehlertextProvider fehlertextProvider, Class<T> transportExceptionClass, String... parameter)
    Deprecated.
    creates a transport exception from the passed values.
    static <T extends de.bund.bva.pliscommon.exception.service.PlisToException>
    T
    mapException(BaseException exception, Class<T> transportExceptionClass)
    Deprecated.
    creates and populates a TransportExcpetion class of the passed type with the values from the passed ApplicationException.
    static <T extends de.bund.bva.pliscommon.exception.service.PlisToException>
    T
    mapException(TechnicalRuntimeException technicalRuntimeException, Class<T> transportExceptionClass)
    Deprecated.
    creates and populates a TransportExcpetion class of the passed type with the values from the passed ApplicationException.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ExceptionMapper

      public ExceptionMapper()
      Deprecated.
  • Method Details

    • mapException

      public static <T extends de.bund.bva.pliscommon.exception.service.PlisToException> T mapException(BaseException exception, Class<T> transportExceptionClass)
      Deprecated.
      creates and populates a TransportExcpetion class of the passed type with the values from the passed ApplicationException.
      Type Parameters:
      T - Type of the TransportExcpetion to be created
      Parameters:
      exception - The original BaseException
      transportExceptionClass - the business or technical TransportException
      Returns:
      The TransportException.
      Throws:
      IllegalArgumentException - if null was passed as value for the parameter transportExceptionClass.
    • mapException

      public static <T extends de.bund.bva.pliscommon.exception.service.PlisToException> T mapException(TechnicalRuntimeException technicalRuntimeException, Class<T> transportExceptionClass)
      Deprecated.
      creates and populates a TransportExcpetion class of the passed type with the values from the passed ApplicationException.
      Type Parameters:
      T - Type of the TransportExcpetion to be created
      Parameters:
      technicalRuntimeException - The original TechnicalRuntimeException
      transportExceptionClass - the business or technical TransportException
      Returns:
      The TransportException.
      Throws:
      IllegalArgumentException - if null was passed as value for the parameter transportExceptionClass or the transportException does not have a constructor with the parameters (String.class, String.class, String.class).
    • createToException

      public static <T extends de.bund.bva.pliscommon.exception.service.PlisToException> T createToException(String ausnahmeId, FehlertextProvider fehlertextProvider, Class<T> transportExceptionClass, String... parameter)
      Deprecated.
      creates a transport exception from the passed values.
      Type Parameters:
      T - Type of the exception to be created
      Parameters:
      ausnahmeId - The exception ID
      fehlertextProvider - The Error Text Provider
      transportExceptionClass - The business or technical TransportException
      parameter - Variable number of parameter values. Parameter value for the possible variable in an error message.
      Returns:
      The TransportException.
      Throws:
      IllegalArgumentException - In exceptional cases this exception can occur if one of the following conditions is met:
    • null was passed as the value for the parameter transportExceptionClass.
    • fehlertextProvider
    • the TransportException has no constructor with the parameters (String.class, String.class, String.class).
    • the TransportException is an interface or an abstract implementation.
    • access to the TransportException violates the Java security policy.
    • an exception occurs within the constructor of the TransportException to be created.