Class DelegatingNotificationDaoInternal
- java.lang.Object
-
- com.atlassian.confluence.internal.persistence.DelegatingObjectDaoInternal<Notification>
-
- com.atlassian.confluence.internal.notification.persistence.DelegatingNotificationDaoInternal
-
- All Implemented Interfaces:
ObjectDao
,NotificationDaoInternal
,ObjectDaoInternal<Notification>
,NotificationDao
- Direct Known Subclasses:
CachingNotificationDao
public class DelegatingNotificationDaoInternal extends DelegatingObjectDaoInternal<Notification> implements NotificationDaoInternal
Delegating Dao for Notifications.- Since:
- 6.10.0
-
-
Field Summary
Fields Modifier and Type Field Description protected NotificationDaoInternal
delegate
-
Constructor Summary
Constructors Constructor Description DelegatingNotificationDaoInternal(NotificationDaoInternal delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<Notification>
findAllDailyReportNotifications()
Find all daily report notifications.List<Notification>
findAllNotificationsBySpace(Space space)
Find all notifications linked to the specified space regardless of type specified.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
findNotificationById(long id)
Find a notification by its IDNotification
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
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, 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.List<Notification>
findNotificationsByContent(ContentEntityObject content)
List<Notification>
findNotificationsByContents(List<ContentEntityObject> contents)
List<Notification>
findNotificationsByFollowing(com.atlassian.user.User user)
List<Notification>
findNotificationsByLabel(Label label)
List<Notification>
findNotificationsBySpaceAndType(Space space, ContentTypeEnum type)
Find all notifications linked to the specified space for a certain type.List<Notification>
findNotificationsBySpacesAndType(List<Space> spaces, ContentTypeEnum type)
Find all notifications linked to the specified spaces for a certain type.List<Notification>
findNotificationsByUser(com.atlassian.user.User user)
Find the space and page notifications owned by the specified user.Iterable<Long>
findPageAndSpaceNotificationIdsFromSpace(Space space)
Retrieves ids for all notifications in a space.List<Notification>
findSiteBlogNotifications()
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.-
Methods inherited from class com.atlassian.confluence.internal.persistence.DelegatingObjectDaoInternal
findAll, findAllSorted, findAllSorted, findByClassIds, findByClassIdsFiltered, getPersistentClass, refresh, refreshEntity, remove, removeEntity, replicate, replicateEntity, save, saveEntity, saveRaw, saveRawEntity
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.atlassian.confluence.internal.persistence.ObjectDaoInternal
findAll, findAllSorted, findAllSorted, findByClassIds, findByClassIdsFiltered, getPersistentClass, refresh, refreshEntity, remove, removeEntity, replicate, replicateEntity, save, saveEntity, saveRaw, saveRawEntity
-
-
-
-
Field Detail
-
delegate
protected final NotificationDaoInternal delegate
-
-
Constructor Detail
-
DelegatingNotificationDaoInternal
public DelegatingNotificationDaoInternal(NotificationDaoInternal delegate)
-
-
Method Detail
-
findNotificationsByUser
public List<Notification> findNotificationsByUser(com.atlassian.user.User user)
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
public List<Notification> findAllNotificationsByUser(com.atlassian.user.User user)
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
public List<Notification> findAllNotificationsBySpace(Space space)
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
public Iterable<Long> findPageAndSpaceNotificationIdsFromSpace(Space space)
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
public List<Notification> findNotificationsBySpaceAndType(Space space, ContentTypeEnum type)
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
public Notification findNotificationByUserAndSpace(com.atlassian.user.User user, String spaceKey)
Description copied from interface:NotificationDao
Find any user notification linked to the specified space regardless of type.- Specified by:
findNotificationByUserAndSpace
in interfaceNotificationDao
-
findNotificationByUserAndSpace
public Notification findNotificationByUserAndSpace(com.atlassian.user.User user, Space space)
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
public List<Notification> findNotificationsByContent(ContentEntityObject content)
- Specified by:
findNotificationsByContent
in interfaceNotificationDao
-
findNotificationsByContents
public List<Notification> findNotificationsByContents(List<ContentEntityObject> contents)
- Specified by:
findNotificationsByContents
in interfaceNotificationDao
-
findNotificationByUserAndLabel
public Notification findNotificationByUserAndLabel(com.atlassian.user.User user, Label label)
Description copied from interface:NotificationDao
Find any user notification linked to the specified label.- Specified by:
findNotificationByUserAndLabel
in interfaceNotificationDao
-
findNotificationsByLabel
public List<Notification> findNotificationsByLabel(Label label)
- 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
public Notification findDailyReportNotification(String username)
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
public List<Notification> 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
public Notification findGlobalBlogWatchForUser(com.atlassian.user.User user)
Description copied from interface:NotificationDao
Find the global blog notification for this user if they have one.- Specified by:
findGlobalBlogWatchForUser
in interfaceNotificationDao
-
findNetworkNotificationByUser
public Notification findNetworkNotificationByUser(com.atlassian.user.User user)
Description copied from interface:NotificationDao
Find the Network notification for this user if they have one.- Specified by:
findNetworkNotificationByUser
in interfaceNotificationDao
-
findSiteBlogNotifications
public List<Notification> findSiteBlogNotifications()
Description copied from interface:NotificationDao
Find the global blog notification for all users.- Specified by:
findSiteBlogNotifications
in interfaceNotificationDao
-
findNotificationsByFollowing
public List<Notification> findNotificationsByFollowing(com.atlassian.user.User user)
- Specified by:
findNotificationsByFollowing
in interfaceNotificationDao
-
findNotificationById
public Notification findNotificationById(long id)
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
-
-