Interface NotificationApi


public interface NotificationApi
  • Method Details

    • getNotification

      Notification getNotification(UUID notificationId)
      Gets notification by given id.
      Parameters:
      notificationId - the notification id
      Returns:
      the Notification
      Throws:
      com.dzidzi.exception.EntityNotFoundException - when notification is not found
    • readNotification

      Notification readNotification(UUID notificationId)
      Gets notification by given id. This changes the status to NotificationStatus.READ if it is unread.
      Parameters:
      notificationId - the notification id
      Returns:
      the Notification
      Throws:
      com.dzidzi.exception.EntityNotFoundException - when notification is not found
    • getNotificationsByRecipientId

      List<Notification> getNotificationsByRecipientId(UUID recipientId)
      Gets all notifications by the given recipient id.
      Parameters:
      recipientId - the recipient id. This can be admin id, courier id, restaurant id, service id or user id.
      Returns:
      list of notifications
    • getNotificationsByRecipientIdAndStatus

      List<Notification> getNotificationsByRecipientIdAndStatus(UUID recipientId, NotificationStatus status)
      Gets all notifications by the given recipient id and the status
      Parameters:
      recipientId - the recipient id. This can be admin id, courier id, restaurant id, service id or user id.
      status - the NotificationStatus
      Returns:
      list of notifications
    • getAllNotifications

      List<Notification> getAllNotifications()
    • findPaginatedNotifications

      DzidziPaginationDTO<Notification> findPaginatedNotifications(FindNotificationRequest findNotificationRequest)
      The paged results of the provided request.
      Parameters:
      findNotificationRequest - the requests used for filtering notifications
      Returns:
      the DzidziPaginationDTO
    • removeNotification

      void removeNotification(UUID notificationId)
      Removes notification by the given id.
      Parameters:
      notificationId - the notification id