Class DelegatingNotificationDaoInternal
java.lang.Object
com.atlassian.confluence.internal.notification.persistence.DelegatingNotificationDaoInternal
- All Implemented Interfaces:
NotificationDaoInternal
,NotificationDao
- Direct Known Subclasses:
CachingNotificationDao
Delegating Dao for Notifications.
- Since:
- 6.10.0
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfindAll()
Find all daily report notifications.findAllNotificationsBySpace
(Space space) Find all notifications linked to the specified space regardless of type specified.findAllNotificationsByUser
(com.atlassian.user.User user) Find all notifications owned by the specified user, including digest etc.Find the specified user's daily report notification.findGlobalBlogWatchForUser
(com.atlassian.user.User user) Find the global blog notification for this user if they have one.findNetworkNotificationByUser
(com.atlassian.user.User user) Find the Network notification for this user if they have one.findNotificationById
(long id) Find a notification by its IDfindNotificationByUserAndContent
(com.atlassian.user.User user, ContentEntityObject content) Find any user notification linked to the specified content.findNotificationByUserAndLabel
(com.atlassian.user.User user, Label label) Find any user notification linked to the specified label.findNotificationByUserAndSpace
(com.atlassian.user.User user, Space space) Find any user notification linked to the specified space regardless of type.findNotificationByUserAndSpace
(com.atlassian.user.User user, String spaceKey) Find any user notification linked to the specified space regardless of type.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.findNotificationsByContentId
(long contentId) Find all user notification linked to the specified content.findNotificationsByContents
(List<ContentEntityObject> contents) findNotificationsByFollowing
(com.atlassian.user.User user) findNotificationsByLabel
(Label label) findNotificationsBySpaceAndType
(Space space, ContentTypeEnum type) Find all notifications linked to the specified space for a certain type.findNotificationsBySpacesAndType
(List<Space> spaces, ContentTypeEnum type) Find all notifications linked to the specified spaces for a certain type.findNotificationsByUser
(com.atlassian.user.User user) Find the space and page notifications owned by the specified user.Retrieves ids for all notifications in a space.Find the global blog notification for all users.boolean
isWatchingContent
(@NonNull ConfluenceUser user, @NonNull ContentEntityObject content) Returns true if the given user is directly watching the given content.void
remove
(Notification notification) void
save
(Notification notification)
-
Field Details
-
delegate
-
-
Constructor Details
-
DelegatingNotificationDaoInternal
-
-
Method Details
-
findNotificationsByUser
Description copied from interface:NotificationDao
Find the space and page notifications owned by the specified user.- Specified by:
findNotificationsByUser
in interfaceNotificationDao
- Returns:
- a list of Notification objects.
-
findAllNotificationsByUser
Description copied from interface:NotificationDao
Find all notifications owned by the specified user, including digest etc.- Specified by:
findAllNotificationsByUser
in interfaceNotificationDao
- Returns:
- a list of Notification objects.
-
findAllNotificationsBySpace
Description copied from interface:NotificationDao
Find all notifications linked to the specified space regardless of type specified. This does not include notifications for pages in the space.- Specified by:
findAllNotificationsBySpace
in interfaceNotificationDao
- Returns:
- a list of Notification objects.
-
findPageAndSpaceNotificationIdsFromSpace
Description copied from interface:NotificationDao
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.- Specified by:
findPageAndSpaceNotificationIdsFromSpace
in interfaceNotificationDao
- Parameters:
space
- a space to find the notifications for- Returns:
- ids of all the notifications in the space.
-
findNotificationsBySpaceAndType
Description copied from interface:NotificationDao
Find all notifications linked to the specified space for a certain type.- Specified by:
findNotificationsBySpaceAndType
in interfaceNotificationDao
- Returns:
- a list of Notification objects.
-
findNotificationsBySpacesAndType
public List<Notification> findNotificationsBySpacesAndType(List<Space> spaces, ContentTypeEnum type) Description copied from interface:NotificationDao
Find all notifications linked to the specified spaces for a certain type.- Specified by:
findNotificationsBySpacesAndType
in interfaceNotificationDao
- Returns:
- a list of Notification objects.
-
findNotificationByUserAndSpace
Description copied from interface:NotificationDao
Find any user notification linked to the specified space regardless of type.- Specified by:
findNotificationByUserAndSpace
in interfaceNotificationDao
-
findNotificationByUserAndSpace
Description copied from interface:NotificationDao
Find any user notification linked to the specified space regardless of type.- Specified by:
findNotificationByUserAndSpace
in interfaceNotificationDao
-
findNotificationByUserAndContent
public Notification findNotificationByUserAndContent(com.atlassian.user.User user, ContentEntityObject content) Description copied from interface:NotificationDao
Find any user notification linked to the specified content.- Specified by:
findNotificationByUserAndContent
in interfaceNotificationDao
-
findNotificationsByContent
- Specified by:
findNotificationsByContent
in interfaceNotificationDao
-
findNotificationsByContentId
Description copied from interface:NotificationDao
Find all user notification linked to the specified content.- Specified by:
findNotificationsByContentId
in interfaceNotificationDao
- Returns:
- All the notifications active for that content
-
findNotificationsByContents
- Specified by:
findNotificationsByContents
in interfaceNotificationDao
-
findNotificationByUserAndLabel
Description copied from interface:NotificationDao
Find any user notification linked to the specified label.- Specified by:
findNotificationByUserAndLabel
in interfaceNotificationDao
-
findNotificationsByLabel
- Specified by:
findNotificationsByLabel
in interfaceNotificationDao
-
findNotificationByUserAndSpaceAndType
public Notification findNotificationByUserAndSpaceAndType(com.atlassian.user.User user, Space space, ContentTypeEnum type) Description copied from interface:NotificationDao
Find the user notification linked to the specified space with a type specified - may be null if watching the whole space.- Specified by:
findNotificationByUserAndSpaceAndType
in interfaceNotificationDao
-
findDailyReportNotification
Description copied from interface:NotificationDao
Find the specified user's daily report notification.- Specified by:
findDailyReportNotification
in interfaceNotificationDao
- Returns:
- a notification object or null if no daily report notification exists for the specified user.
-
findAllDailyReportNotifications
Description copied from interface:NotificationDao
Find all daily report notifications. These notifications are not associated with a page OR a space.- Specified by:
findAllDailyReportNotifications
in interfaceNotificationDao
- Returns:
- a list of notifications.
-
findGlobalBlogWatchForUser
Description copied from interface:NotificationDao
Find the global blog notification for this user if they have one.- Specified by:
findGlobalBlogWatchForUser
in interfaceNotificationDao
-
findNetworkNotificationByUser
Description copied from interface:NotificationDao
Find the Network notification for this user if they have one.- Specified by:
findNetworkNotificationByUser
in interfaceNotificationDao
-
findSiteBlogNotifications
Description copied from interface:NotificationDao
Find the global blog notification for all users.- Specified by:
findSiteBlogNotifications
in interfaceNotificationDao
-
findNotificationsByFollowing
- Specified by:
findNotificationsByFollowing
in interfaceNotificationDao
-
findNotificationById
Description copied from interface:NotificationDao
Find a notification by its ID- Specified by:
findNotificationById
in interfaceNotificationDao
-
isWatchingContent
public boolean isWatchingContent(@NonNull ConfluenceUser user, @NonNull ContentEntityObject content) Description copied from interface:NotificationDao
Returns true if the given user is directly watching the given content.- Specified by:
isWatchingContent
in interfaceNotificationDao
- Parameters:
user
- user to checkcontent
- content to check- Returns:
- true if the given user is directly watching the given content
-
findAll
- Specified by:
findAll
in interfaceNotificationDaoInternal
-
remove
- Specified by:
remove
in interfaceNotificationDaoInternal
-
save
- Specified by:
save
in interfaceNotificationDaoInternal
-