Class InAppNotificationsService

java.lang.Object
io.jmix.notificationsflowui.InAppNotificationsService

@Component("ntf_InAppNotificationsService") public class InAppNotificationsService extends Object
The class to perform business operations with InAppNotification entity.
  • Field Details

    • currentUserSubstitution

      protected final CurrentUserSubstitution currentUserSubstitution
    • entityManager

      protected jakarta.persistence.EntityManager entityManager
  • Constructor Details

  • Method Details

    • getUnreadCount

      @Transactional public Integer 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 status
      newStatus - new status