Interface BaseNotificationResponseService<T>

Type Parameters:
T - Type of response with notification i.e. NotificationDataResponse
All Known Subinterfaces:
NotificationResponseService

public interface BaseNotificationResponseService<T>
Helper service for creation of response with notification.
  • Method Details

    • responseWithValidationFailureNotification

      T responseWithValidationFailureNotification(org.springframework.validation.Errors errors, Class<?> validationFailedOwningType, AdditionalNotificationData additionalNotificationData)
      Returns response with ValidationFailureNotification instance.
      Parameters:
      errors - Spring's Errors that will be used to resolve validation notification messages.
      validationFailedOwningType - class on which validation errors were found
      additionalNotificationData - additional notification data to add to notification
      Returns:
      response with validation failure notification
    • responseWithValidationFailureNotification

      T responseWithValidationFailureNotification(jakarta.validation.ConstraintViolationException exception, AdditionalNotificationData additionalNotificationData)
      Returns response with ValidationFailureNotification instance.
      Parameters:
      exception - validation exception that will be used to resolve validation notification messages.
      additionalNotificationData - additional notification data to add to notification
      Returns:
      response with validation failure notification
    • responseWithExceptionNotification

      T responseWithExceptionNotification(Throwable throwable, AdditionalNotificationData additionalNotificationData)
      Returns response with Notification instance.
      Parameters:
      throwable - exception for which to resolve notification
      additionalNotificationData - additional notification data to add to notification
      Returns:
      response with notification
    • responseWithNotification

      T responseWithNotification(String actionName, AdditionalNotificationData additionalNotificationData)
      Returns response with Notification instance.
      Parameters:
      actionName - name of the action for which to resolve notification
      additionalNotificationData - additional notification data to add to notification
      Returns:
      response with notification
    • responseWithNotificationActionResolvedFromRequest

      T responseWithNotificationActionResolvedFromRequest(AdditionalNotificationData additionalNotificationData)
      Returns response with Notification instance.
      Parameters:
      additionalNotificationData - additional notification data to add to notification
      Returns:
      response with notification
    • notificationResolverService

      NotificationResolverService notificationResolverService()
    • responseWithValidationFailureNotification

      default T responseWithValidationFailureNotification(org.springframework.validation.Errors errors, Class<?> validationFailedOwningType)
    • responseWithValidationFailureNotification

      default T responseWithValidationFailureNotification(jakarta.validation.ConstraintViolationException exception)
    • responseWithExceptionNotification

      default T responseWithExceptionNotification(Throwable throwable)
    • responseWithNotificationActionResolvedFromRequest

      default T responseWithNotificationActionResolvedFromRequest()
    • responseWithNotification

      default T responseWithNotification(String actionName)