public interface

NotificationDao

implements ObjectDao
com.atlassian.confluence.mail.notification.persistence.NotificationDao
Known Indirect Subclasses

Class Overview

Data Access Object interface for dealing with notifications.

Summary

Public Methods
List<Notification> findAllDailyReportNotifications()
Find all daily report notifications.
List<Notification> findAllNotificationsBySpace(Space space)
Find all notifications linked to the specified space regardless of type specified.
List<Notification> findAllNotificationsByUser(User user)
Find all notifications owned by the specified user, including digest etc.
Notification findDailyReportNotification(String username)
Find the specified user's daily report notification.
Notification findGlobalBlogWatchForUser(User user)
Find the global blog notification for this user if they have one.
Notification findNetworkNotificationByUser(User user)
Find the Network notification for this user if they have one.
Notification findNotificationByUserAndPage(User user, AbstractPage page)
Notification findNotificationByUserAndSpace(User user, String spaceKey)
Find any user notification linked to the specified space regardless of type.
Notification findNotificationByUserAndSpace(User user, Space space)
Find any user notification linked to the specified space regardless of type.
Notification findNotificationByUserAndSpaceAndType(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.
List<Notification> findNotificationsByFollowing(User user)
List<Notification> findNotificationsByPage(AbstractPage Page)
Find the notifications linked to the specified content.
@Deprecated List<Notification> findNotificationsBySpace(Space space)
This method is deprecated. Since 3.5 - This method name is ambiguous. Use findNotificationsBySpaceAndType(Space, ContentTypeEnum) or findAllNotificationsBySpace(Space).
List<Notification> findNotificationsBySpaceAndType(Space space, ContentTypeEnum type)
Find all notifications linked to the specified space for a certain type.
List<Notification> findNotificationsByUser(User user)
Find the space and page notifications owned by the specified user.
Iterable<Long> findPageAndSpaceNotificationIdsFromSpace(Space space)
Retrieves ids for all notifications in a space.
List<Notification> findSiteBlogNotifications()
Find the global blog notification for all users.
@Deprecated void removeAllNotificationsForUser(User user)
This method is deprecated. since 2.10 - Use findNotificationsByUser(User) and remove(com.atlassian.core.bean.EntityObject) instead.
@Deprecated void removeDailyReportNotificationForUser(String username)
This method is deprecated. since 2.10 - Use findDailyReportNotification(String) and remove(com.atlassian.core.bean.EntityObject) instead
[Expand]
Inherited Methods
From interface bucket.core.persistence.ObjectDao

Public Methods

public List<Notification> findAllDailyReportNotifications ()

Find all daily report notifications. These notifications are not associated with a page OR a space.

Returns
  • a list of notifications.

public 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.

public List<Notification> findAllNotificationsByUser (User user)

Find all notifications owned by the specified user, including digest etc.

Returns
  • a list of Notification objects.

public Notification findDailyReportNotification (String username)

Find the specified user's daily report notification.

Returns
  • a notification object or null if no daily report notification exists for the specified user.

public Notification findGlobalBlogWatchForUser (User user)

Find the global blog notification for this user if they have one.

public Notification findNetworkNotificationByUser (User user)

Find the Network notification for this user if they have one.

public Notification findNotificationByUserAndPage (User user, AbstractPage page)

public Notification findNotificationByUserAndSpace (User user, String spaceKey)

Find any user notification linked to the specified space regardless of type.

public Notification findNotificationByUserAndSpace (User user, Space space)

Find any user notification linked to the specified space regardless of type.

public Notification findNotificationByUserAndSpaceAndType (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.

public List<Notification> findNotificationsByFollowing (User user)

public List<Notification> findNotificationsByPage (AbstractPage Page)

Find the notifications linked to the specified content.

Returns
  • a list of Notification objects.

@Deprecated public List<Notification> findNotificationsBySpace (Space space)

This method is deprecated.
Since 3.5 - This method name is ambiguous. Use findNotificationsBySpaceAndType(Space, ContentTypeEnum) or findAllNotificationsBySpace(Space).

Find the notifications linked to the specified space regardless of type specified.

Returns
  • a list of Notification objects.

public 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.

public List<Notification> findNotificationsByUser (User user)

Find the space and page notifications owned by the specified user.

Returns
  • a list of Notification objects.

public 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.

public List<Notification> findSiteBlogNotifications ()

Find the global blog notification for all users.

@Deprecated public void removeAllNotificationsForUser (User user)

This method is deprecated.
since 2.10 - Use findNotificationsByUser(User) and remove(com.atlassian.core.bean.EntityObject) instead.

Remove all the notifications for a particular user. This will not include the daily report notifications

Parameters
user the user to remove all notifications for

@Deprecated public void removeDailyReportNotificationForUser (String username)

This method is deprecated.
since 2.10 - Use findDailyReportNotification(String) and remove(com.atlassian.core.bean.EntityObject) instead