Class NotificationCreatedEventService
java.lang.Object
es.kukenan.smartfi.microservice.communication.service.messaging.AbstractDomainEventService
es.kukenan.smartfi.microservice.communication.service.messaging.NotificationCreatedEventService
This service owns the logic of the notifications created events processing.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringTemplate variable for message field.private UsersRepositoryusers Repository.Fields inherited from class es.kukenan.smartfi.microservice.communication.service.messaging.AbstractDomainEventService
CAT_DESTINATION_PREFIX, CAT_LANG, CAT_USER, notificationService -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate UserFind user for template data.getTemplateVariables(es.kukenan.smartfi.microservice.contracts.events.created.NotificationCreatedEventBody body) Get event data to complete message template variables.voidhandleNotificationCreatedEvent(es.kukenan.smartfi.microservice.contracts.events.created.NotificationCreatedEvent notificationCreatedEvent) Handles the given notifications request delivery NotificationCreatedEvent Event.Methods inherited from class es.kukenan.smartfi.microservice.communication.service.messaging.AbstractDomainEventService
createVirtualUserForCatDestination, eventTypeDescriptor, findMessages, findRealUser, findRealUserFromOnboarding, handleGenericNotificationEvent, handleGenericNotificationEvent, toMessageSpecialProperties
-
Field Details
-
TEMPLATE_MESSAGE_FIELD
Template variable for message field.- See Also:
-
usersRepository
users Repository.
-
-
Constructor Details
-
NotificationCreatedEventService
public NotificationCreatedEventService()
-
-
Method Details
-
handleNotificationCreatedEvent
public void handleNotificationCreatedEvent(es.kukenan.smartfi.microservice.contracts.events.created.NotificationCreatedEvent notificationCreatedEvent) Handles the given notifications request delivery NotificationCreatedEvent Event.- Parameters:
notificationCreatedEvent- object holding the notifications request details.
-
findUser
Find user for template data.- Parameters:
userId- Skyline unique user identifier- Returns:
- user found by skyline identifier.
-
getTemplateVariables
private Map<String,Object> getTemplateVariables(es.kukenan.smartfi.microservice.contracts.events.created.NotificationCreatedEventBody body) Get event data to complete message template variables.- Parameters:
body- notification event body.- Returns:
- Map with variables.
-