NotificationsListServiceImpl

@Service
class NotificationsListServiceImpl(userService: UserService, queueRepository: QueueRepository, notificationRepository: NotificationRepository) : NotificationsListService

Service for working with notification messages list

Constructors

Link copied to clipboard
constructor(userService: UserService, queueRepository: QueueRepository, notificationRepository: NotificationRepository)

Functions

Link copied to clipboard
@Transactional
open override fun anyNewNotification(token: String): NewNotificationDto

Returns boolean whether there is any unread notification

Link copied to clipboard
@Transactional
open override fun clearOldNotifications(): EmptyDto

Delete notifications older than 2 weeks

Link copied to clipboard
@Transactional
open override fun deleteNotificationById(token: String, notificationId: Long)

Delete notification by id

Link copied to clipboard
@Transactional
open override fun deleteNotifications(token: String, notificationIds: List<Long>?)

Delete specified by id notifications

Link copied to clipboard
@Transactional
open override fun getNotifications(token: String, pageable: Pageable): Page<NotificationDto>

Lists all notifications

Link copied to clipboard
@Transactional
open override fun readNotifications(token: String, notificationIds: List<Long>?)

Marks notifications as read