Class IntegrationApiExceptionTranslationHandler
- java.lang.Object
-
- de.hybris.platform.integrationbackoffice.exceptionhandlers.IntegrationApiExceptionTranslationHandler
-
- All Implemented Interfaces:
com.hybris.cockpitng.service.ExceptionTranslationHandler,org.springframework.core.Ordered
- Direct Known Subclasses:
IntegrationBackofficeExceptionTranslationHandler,WebhookExceptionTranslationHandler
public abstract class IntegrationApiExceptionTranslationHandler extends java.lang.Object implements com.hybris.cockpitng.service.ExceptionTranslationHandler, org.springframework.core.OrderedAn abstract class for translating target exceptions to localized error messages. Its subclass needs to overwrite methods in order to specify the target exceptions and how to acquire localized messages.
-
-
Constructor Summary
Constructors Constructor Description IntegrationApiExceptionTranslationHandler()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description booleancanHandle(java.lang.Throwable throwable)protected abstract java.lang.StringconvertExceptionToResourceMsg(java.lang.Throwable exception)Try to get bundle resource with the information of the exception that is being handled.intgetOrder()protected abstract java.util.List<java.lang.String>getTargetedException()java.lang.StringtoString(java.lang.Throwable throwable)
-
-
-
Method Detail
-
canHandle
public boolean canHandle(java.lang.Throwable throwable)
- Specified by:
canHandlein interfacecom.hybris.cockpitng.service.ExceptionTranslationHandler
-
toString
public java.lang.String toString(java.lang.Throwable throwable)
- Specified by:
toStringin interfacecom.hybris.cockpitng.service.ExceptionTranslationHandler
-
getOrder
public int getOrder()
- Specified by:
getOrderin interfaceorg.springframework.core.Ordered
-
getTargetedException
protected abstract java.util.List<java.lang.String> getTargetedException()
- Returns:
- The list of exceptions that this handler is able to handle.
-
convertExceptionToResourceMsg
protected abstract java.lang.String convertExceptionToResourceMsg(java.lang.Throwable exception)
Try to get bundle resource with the information of the exception that is being handled.- Parameters:
exception- The exception that is being translated. Use its class name or other information as key to get bundle resource
-
-