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 findNotificationByUserAndContent(com.atlassian.user.User user, ContentEntityObject content)
          Find any user notification linked to the specified content.
 Notification findNotificationByUserAndLabel(com.atlassian.user.User user, Label label)
          Find any user notification linked to the specified label.
 Notification findNotificationByUserAndPage(com.atlassian.user.User user, AbstractPage page)
          Deprecated. since 5.3. Use findNotificationByUserAndContent(com.atlassian.user.User, com.atlassian.confluence.core.ContentEntityObject) instead.
 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> findNotificationsByContent(ContentEntityObject content)
           
 java.util.List<Notification> findNotificationsByFollowing(com.atlassian.user.User user)
           
 java.util.List<Notification> findNotificationsByLabel(Label label)
           
 java.util.List<Notification> findNotificationsByPage(AbstractPage Page)
          Deprecated. since 5.3. Use findNotificationsByContent(com.atlassian.confluence.core.ContentEntityObject) instead.
 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.lang.Iterable<java.lang.Long> findPageAndSpaceNotificationIdsFromSpace(Space space)
          Retrieves ids for all notifications in a space.
 java.util.List<Notification> findSiteBlogNotifications()
          Find the global blog notification for all users.
 
Methods inherited from interface bucket.core.persistence.ObjectDao
findAll, findAllSorted, 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)
Deprecated. since 5.3. Use findNotificationsByContent(com.atlassian.confluence.core.ContentEntityObject) instead.

Find the notifications linked to the specified content.

Returns:
a list of Notification objects.

findNotificationsBySpace

@Deprecated
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. This does not include notifications for pages in the space.

Returns:
a list of Notification objects.

findPageAndSpaceNotificationIdsFromSpace

java.lang.Iterable<java.lang.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

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)
Deprecated. since 5.3. Use findNotificationByUserAndContent(com.atlassian.user.User, com.atlassian.confluence.core.ContentEntityObject) instead.


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.


findNotificationByUserAndContent

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


findNotificationsByContent

java.util.List<Notification> findNotificationsByContent(ContentEntityObject content)

findNotificationByUserAndLabel

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


findNotificationsByLabel

java.util.List<Notification> findNotificationsByLabel(Label 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(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-2014 Atlassian. All Rights Reserved.