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<Notification> findAllDailyReportNotifications()
          Find all daily report notifications.
 java.util.List<Notification> findAllNotificationsBySpace(Space space)
          Find all notifications linked to the specified space regardless of type specified.
 java.util.List<Notification> findAllNotificationsByUser(com.atlassian.user.User user)
          Find all notifications owned by the specified user, including digest etc.
 Notification findDailyReportNotification(java.lang.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, Space space)
          Find any user notification linked to the specified space regardless of type.
 Notification findNotificationByUserAndSpace(com.atlassian.user.User user, java.lang.String spaceKey)
          Find any user notification linked to the specified space regardless of type.
 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.
 java.util.List<Notification> findNotificationsByFollowing(com.atlassian.user.User user)
           
 java.util.List<Notification> findNotificationsByPage(AbstractPage Page)
          Find the notifications linked to the specified content.
 java.util.List<Notification> findNotificationsBySpace(Space space)
          Deprecated. Since 3.5 - This method name is ambiguous. Use findNotificationsBySpaceAndType(Space, ContentTypeEnum) or findAllNotificationsBySpace(Space).
 java.util.List<Notification> findNotificationsBySpaceAndType(Space space, ContentTypeEnum type)
          Find all notifications linked to the specified space for a certain type.
 java.util.List<Notification> findNotificationsByUser(com.atlassian.user.User user)
          Find the space and page notifications owned by the specified user.
 java.util.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(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<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

java.util.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

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

Returns:
a list of Notification objects.

findNotificationsBySpace

java.util.List<Notification> findNotificationsBySpace(Space space)
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.

findAllNotificationsBySpace

java.util.List<Notification> findAllNotificationsBySpace(Space space)
Find all notifications linked to the specified space regardless of type specified.

Returns:
a list of Notification objects.

findNotificationsBySpaceAndType

java.util.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.

findNotificationByUserAndPage

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

findNotificationByUserAndSpace

Notification findNotificationByUserAndSpace(com.atlassian.user.User user,
                                            java.lang.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.


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.


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 user's 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<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

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


findNotificationsByFollowing

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


Copyright © 2003-2011 Atlassian. All Rights Reserved.