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 Summary
Modifier and TypeMethodDescriptiondefault TresponseWithExceptionNotification(Throwable throwable) responseWithExceptionNotification(Throwable throwable, AdditionalNotificationData additionalNotificationData) Returns response withNotificationinstance.default TresponseWithNotification(String actionName) responseWithNotification(String actionName, AdditionalNotificationData additionalNotificationData) Returns response withNotificationinstance.default TresponseWithNotificationActionResolvedFromRequest(AdditionalNotificationData additionalNotificationData) Returns response withNotificationinstance.default TresponseWithValidationFailureNotification(jakarta.validation.ConstraintViolationException exception) responseWithValidationFailureNotification(jakarta.validation.ConstraintViolationException exception, AdditionalNotificationData additionalNotificationData) Returns response withValidationFailureNotificationinstance.default TresponseWithValidationFailureNotification(org.springframework.validation.Errors errors, Class<?> validationFailedOwningType) responseWithValidationFailureNotification(org.springframework.validation.Errors errors, Class<?> validationFailedOwningType, AdditionalNotificationData additionalNotificationData) Returns response withValidationFailureNotificationinstance.
-
Method Details
-
responseWithValidationFailureNotification
T responseWithValidationFailureNotification(org.springframework.validation.Errors errors, Class<?> validationFailedOwningType, AdditionalNotificationData additionalNotificationData) Returns response withValidationFailureNotificationinstance.- Parameters:
errors- Spring'sErrorsthat will be used to resolve validation notification messages.validationFailedOwningType- class on which validation errors were foundadditionalNotificationData- additional notification data to add to notification- Returns:
- response with validation failure notification
-
responseWithValidationFailureNotification
T responseWithValidationFailureNotification(jakarta.validation.ConstraintViolationException exception, AdditionalNotificationData additionalNotificationData) Returns response withValidationFailureNotificationinstance.- 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 withNotificationinstance.- Parameters:
throwable- exception for which to resolve notificationadditionalNotificationData- additional notification data to add to notification- Returns:
- response with notification
-
responseWithNotification
T responseWithNotification(String actionName, AdditionalNotificationData additionalNotificationData) Returns response withNotificationinstance.- Parameters:
actionName- name of the action for which to resolve notificationadditionalNotificationData- additional notification data to add to notification- Returns:
- response with notification
-
responseWithNotificationActionResolvedFromRequest
T responseWithNotificationActionResolvedFromRequest(AdditionalNotificationData additionalNotificationData) Returns response withNotificationinstance.- Parameters:
additionalNotificationData- additional notification data to add to notification- Returns:
- response with notification
-
notificationResolverService
NotificationResolverService notificationResolverService() -
responseWithValidationFailureNotification
-
responseWithValidationFailureNotification
default T responseWithValidationFailureNotification(jakarta.validation.ConstraintViolationException exception) -
responseWithExceptionNotification
-
responseWithNotificationActionResolvedFromRequest
-
responseWithNotification
-