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
 java.util.List findAllDailyReportNotifications()
          Find all daily report notifications.
 Notification findDailyReportNotification(java.lang.String username)
          Find the specified users daily report notification.
 Notification findNotificationByUserAndPage(com.atlassian.user.User user, AbstractPage page)
           
 Notification findNotificationByUserAndSpace(com.atlassian.user.User user, java.lang.String spaceKey)
           
 java.util.List findNotificationsByPage(AbstractPage Page)
          Find the notifications linked to the specified content.
 java.util.List findNotificationsBySpace(Space space)
          Find the notifications links to the specified space.
 java.util.List findNotificationsByUser(com.atlassian.user.User user)
          Find the space and page notifications owned by the specified user.
 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(java.lang.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

java.util.List findNotificationsByUser(com.atlassian.user.User user)
Find the space and page notifications owned by the specified user.

Parameters:
user -
Returns:
a list of Notifcation objects.

findNotificationsByPage

java.util.List findNotificationsByPage(AbstractPage Page)
Find the notifications linked to the specified content.

Parameters:
Page -
Returns:
a list of Notification objects.

findNotificationsBySpace

java.util.List findNotificationsBySpace(Space space)
Find the notifications links to the specified space.

Parameters:
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,
                                            java.lang.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(java.lang.String username)
Deprecated. since 2.10 - Use findDailyReportNotification(String) and ObjectDao.remove(com.atlassian.core.bean.EntityObject) instead


findDailyReportNotification

Notification findDailyReportNotification(java.lang.String username)
Find the specified users daily report notification.

Parameters:
username -
Returns:
a notification object or null if no daily report notification exists for the specified user.

findAllDailyReportNotifications

java.util.List findAllDailyReportNotifications()
Find all daily report notifications. These notifications are not associated with a page OR a space.

Returns:
a list of notifications.


Copyright © 2003-2009 Atlassian Pty Ltd. All Rights Reserved.