Interface NotificationDao

    • Method Detail

      • findNotificationsByUser

        List<Notification> findNotificationsByUser​(com.atlassian.user.User user)
        Find the space and page notifications owned by the specified user.
        Returns:
        a list of Notification objects.
      • findAllNotificationsByUser

        List<Notification> findAllNotificationsByUser​(com.atlassian.user.User user)
        Find all notifications owned by the specified user, including digest etc.
        Returns:
        a list of Notification objects.
      • findAllNotificationsBySpace

        List<Notification> findAllNotificationsBySpace​(Space space)
        Find all notifications linked to the specified space regardless of type specified. This does not include notifications for pages in the space.
        Returns:
        a list of Notification objects.
      • findPageAndSpaceNotificationIdsFromSpace

        Iterable<Long> findPageAndSpaceNotificationIdsFromSpace​(Space space)
        Retrieves ids for all notifications in a space. This is useful for large-scale operations such as space exports. The result includes all notifications for the space, including notifications for pages in the space.
        Parameters:
        space - a space to find the notifications for
        Returns:
        ids of all the notifications in the space.
        Since:
        4.2
      • findNotificationsBySpaceAndType

        List<Notification> findNotificationsBySpaceAndType​(Space space,
                                                           ContentTypeEnum type)
        Find all notifications linked to the specified space for a certain type.
        Returns:
        a list of Notification objects.
      • findNotificationsBySpacesAndType

        List<Notification> findNotificationsBySpacesAndType​(List<Space> spaces,
                                                            ContentTypeEnum type)
        Find all notifications linked to the specified spaces for a certain type.
        Returns:
        a list of Notification objects.
      • findNotificationByUserAndSpace

        Notification findNotificationByUserAndSpace​(com.atlassian.user.User user,
                                                    String spaceKey)
        Find any user notification linked to the specified space regardless of type.
      • findNotificationByUserAndSpace

        Notification findNotificationByUserAndSpace​(com.atlassian.user.User user,
                                                    Space space)
        Find any user notification linked to the specified space regardless of type.
      • findNotificationByUserAndContent

        Notification findNotificationByUserAndContent​(com.atlassian.user.User user,
                                                      ContentEntityObject content)
        Find any user notification linked to the specified content.
      • findNotificationByUserAndLabel

        Notification findNotificationByUserAndLabel​(com.atlassian.user.User user,
                                                    Label label)
        Find any user notification linked to the specified label.
      • findNotificationByUserAndSpaceAndType

        Notification findNotificationByUserAndSpaceAndType​(com.atlassian.user.User user,
                                                           Space space,
                                                           ContentTypeEnum type)
        Find the user notification linked to the specified space with a type specified - may be null if watching the whole space.
      • findDailyReportNotification

        Notification findDailyReportNotification​(String username)
        Find the specified user's daily report notification.
        Parameters:
        username -
        Returns:
        a notification object or null if no daily report notification exists for the specified user.
      • findAllDailyReportNotifications

        List<Notification> findAllDailyReportNotifications()
        Find all daily report notifications. These notifications are not associated with a page OR a space.
        Returns:
        a list of notifications.
      • findGlobalBlogWatchForUser

        Notification findGlobalBlogWatchForUser​(com.atlassian.user.User user)
        Find the global blog notification for this user if they have one.
      • findNetworkNotificationByUser

        Notification findNetworkNotificationByUser​(com.atlassian.user.User user)
        Find the Network notification for this user if they have one.
      • findNotificationById

        Notification findNotificationById​(long id)
        Find a notification by its ID
      • findSiteBlogNotifications

        List<Notification> findSiteBlogNotifications()
        Find the global blog notification for all users.
      • findNotificationsByFollowing

        List<Notification> findNotificationsByFollowing​(com.atlassian.user.User user)
      • isWatchingContent

        boolean isWatchingContent​(@NonNull ConfluenceUser user,
                                  @NonNull ContentEntityObject content)
        Returns true if the given user is directly watching the given content.
        Parameters:
        user - user to check
        content - content to check
        Returns:
        true if the given user is directly watching the given content
        Since:
        5.9