com.atlassian.confluence.mail.notification.persistence
Interface NotificationDao

All Superinterfaces:
ObjectDao
All Known Implementing Classes:
HibernateNotificationDao

public interface NotificationDao
extends ObjectDao

Data Access Object interface for dealing with notifications.


Method Summary
 List<Notification> findAllDailyReportNotifications()
          Find all daily report notifications.
 List<Notification> findAllNotificationsByUser(com.atlassian.user.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(com.atlassian.user.User user)
          Find the global blog notification for this user if they have one.
 Notification findNetworkNotificationByUser(com.atlassian.user.User user)
          Find the Network notification for this user if they have one.
 Notification findNotificationByUserAndPage(com.atlassian.user.User user, AbstractPage page)
           
 Notification findNotificationByUserAndSpace(com.atlassian.user.User user, String spaceKey)
           
 List<Notification> findNotificationsByFollowing(com.atlassian.user.User user)
           
 List<Notification> findNotificationsByPage(AbstractPage Page)
          Find the notifications linked to the specified content.
 List<Notification> findNotificationsBySpace(Space space)
          Find the notifications links to the specified space.
 List<Notification> findNotificationsByUser(com.atlassian.user.User user)
          Find the space and page notifications owned by the specified user.
 List<Notification> findSiteBlogNotifications()
          Find the global blog notification for all users.
 void removeAllNotificationsForUser(com.atlassian.user.User user)
          Deprecated. since 2.10 - Use findNotificationsByUser(User) and ObjectDao.remove(com.atlassian.core.bean.EntityObject) instead.
 void removeDailyReportNotificationForUser(String username)
          Deprecated. since 2.10 - Use findDailyReportNotification(String) and ObjectDao.remove(com.atlassian.core.bean.EntityObject) instead
 
Methods inherited from interface bucket.core.persistence.ObjectDao
findAll, findAllSorted, getPersistentClass, refresh, remove, replicate, save, saveRaw
 

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.

findNotificationsByPage

List<Notification> findNotificationsByPage(AbstractPage Page)
Find the notifications linked to the specified content.

Returns:
a list of Notification objects.

findNotificationsBySpace

List<Notification> findNotificationsBySpace(Space space)
Find the notifications links to the specified space.

Returns:
a list of Notification objects.

findNotificationByUserAndPage

Notification findNotificationByUserAndPage(com.atlassian.user.User user,
                                           AbstractPage page)

findNotificationByUserAndSpace

Notification findNotificationByUserAndSpace(com.atlassian.user.User user,
                                            String spaceKey)

removeAllNotificationsForUser

void removeAllNotificationsForUser(com.atlassian.user.User user)
Deprecated. since 2.10 - Use findNotificationsByUser(User) and ObjectDao.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

removeDailyReportNotificationForUser

void removeDailyReportNotificationForUser(String username)
Deprecated. since 2.10 - Use findDailyReportNotification(String) and ObjectDao.remove(com.atlassian.core.bean.EntityObject) instead


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.


findSiteBlogNotifications

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


findNotificationsByFollowing

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


Copyright © 2003-2011 Atlassian. All Rights Reserved.