Package io.jmix.notificationsflowui
Class InAppNotificationsService
java.lang.Object
io.jmix.notificationsflowui.InAppNotificationsService
The class to perform business operations with
InAppNotification
entity.-
Field Summary
Modifier and TypeFieldDescriptionprotected final CurrentUserSubstitution
protected jakarta.persistence.EntityManager
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Marks all notifications for current user as read.void
updateReadStatus
(Collection<InAppNotification> notifications, NotificationReadStatus newStatus) Changes read status for provided notifications.
-
Field Details
-
currentUserSubstitution
-
entityManager
protected jakarta.persistence.EntityManager entityManager
-
-
Constructor Details
-
InAppNotificationsService
-
-
Method Details
-
getUnreadCount
- Returns:
- the amount of unread notifications
-
markAllAsRead
@Transactional public void markAllAsRead()Marks all notifications for current user as read. -
updateReadStatus
@Transactional public void updateReadStatus(Collection<InAppNotification> notifications, NotificationReadStatus newStatus) Changes read status for provided notifications.- Parameters:
notifications
- notifications to change read statusnewStatus
- new status
-