use of de.metas.notification.UserNotification in project metasfresh-webui-api by metasfresh.
the class UserNotificationsService method forwardEventToNotificationsQueues.
private void forwardEventToNotificationsQueues(final IEventBus eventBus, final Event event) {
logger.trace("Got event from {}: {}", eventBus, event);
final UserNotification notification = UserNotificationUtils.toUserNotification(event);
final UserId recipientUserId = UserId.ofRepoId(notification.getRecipientUserId());
final UserNotificationsQueue notificationsQueue = getNotificationsQueueOrNull(recipientUserId);
if (notificationsQueue == null) {
logger.trace("No notification queue was found for recipientUserId={}", recipientUserId);
return;
}
notificationsQueue.addNotification(notification);
}
Aggregations