Package io.jmix.notificationsflowui
Class InAppNotificationsService
java.lang.Object
io.jmix.notificationsflowui.InAppNotificationsService
The class to perform business operations with
InAppNotification entity.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final CurrentUserSubstitutionprotected jakarta.persistence.EntityManager -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidMarks all notifications for current user as read.voidupdateReadStatus(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
-