|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.atlassian.confluence.mail.notification.DefaultNotificationManager
public class DefaultNotificationManager
Constructor Summary | |
---|---|
DefaultNotificationManager()
|
Method Summary | |
---|---|
Notification |
addContentNotification(com.atlassian.user.User user,
ContentEntityObject content)
|
Notification |
addDailyReportNotfication(com.atlassian.user.User user)
|
boolean |
addLabelNotification(com.atlassian.user.User user,
Label label)
|
protected Notification |
addNotification(com.atlassian.user.User user,
Space space,
AbstractPage page)
Adds a page or space notification for a user. |
protected Notification |
addNotification(com.atlassian.user.User user,
Space space,
AbstractPage page,
ContentTypeEnum type)
|
Notification |
addPageNotification(com.atlassian.user.User user,
AbstractPage page)
Deprecated. since 5.3. Use addContentNotification(com.atlassian.user.User, com.atlassian.confluence.core.ContentEntityObject) instead. |
Notification |
addSpaceNotification(com.atlassian.user.User user,
Space space)
|
Notification |
addSpaceNotification(com.atlassian.user.User user,
Space space,
ContentTypeEnum type)
Add a space notification for a particular content type. |
java.util.List<Notification> |
findNotificationsByFollowing(com.atlassian.user.User modifier)
Retrieves the list of Network Notification s for User s who are
following the given User . |
java.lang.Iterable<java.lang.Long> |
findPageAndSpaceNotificationIdsFromSpace(Space space)
Retrieves ids of all notifications in a space. |
Notification |
getDailyReportNotificationForUser(com.atlassian.user.User user)
|
java.util.List<Notification> |
getDailyReportNotifications()
|
Notification |
getNetworkNotificationForUser(com.atlassian.user.User user)
|
Notification |
getNotificationByUserAndContent(com.atlassian.user.User user,
ContentEntityObject content)
|
Notification |
getNotificationByUserAndPage(com.atlassian.user.User user,
AbstractPage page)
Deprecated. since 5.3. Use getNotificationByUserAndContent(com.atlassian.user.User, com.atlassian.confluence.core.ContentEntityObject) instead. |
Notification |
getNotificationByUserAndSpace(com.atlassian.user.User user,
Space space)
Return a notification if the user is watching the entire space. |
Notification |
getNotificationByUserAndSpace(com.atlassian.user.User user,
java.lang.String spaceKey)
Return a notification if the user is watching the entire space with the given spaceKey. |
Notification |
getNotificationByUserAndSpaceAndType(com.atlassian.user.User user,
Space space,
ContentTypeEnum type)
|
NotificationDao |
getNotificationDao()
|
java.util.List<Notification> |
getNotificationsByContent(ContentEntityObject content)
|
java.util.List<Notification> |
getNotificationsByLabel(Label label)
|
java.util.List<Notification> |
getNotificationsByPage(AbstractPage page)
Deprecated. since 5.3. Use getNotificationsByContent(com.atlassian.confluence.core.ContentEntityObject) instead. |
java.util.List<Notification> |
getNotificationsBySpace(Space space)
Deprecated. since 5.3. Use getNotificationsByContent(com.atlassian.confluence.core.ContentEntityObject) instead. |
java.util.List<Notification> |
getNotificationsBySpaceAndType(Space space,
ContentTypeEnum type)
|
java.util.List<Notification> |
getNotificationsByUser(com.atlassian.user.User user)
|
Notification |
getSiteBlogNotificationForUser(com.atlassian.user.User user)
|
java.util.List<Notification> |
getSiteBlogNotifications()
|
boolean |
isUserWatchingPageOrSpace(com.atlassian.user.User user,
Space space,
AbstractPage page)
Returns true if: a) the user is watching the AbstractPage b) the user is watching the space, or c) the user is watching the contentType of the AbstractPage for the Space This method can be used to check if a user is watching a page directly or indirectly. |
boolean |
isWatchingContent(com.atlassian.user.User user,
ContentEntityObject content)
|
boolean |
isWatchingLabel(com.atlassian.user.User user,
Label label)
|
void |
removeAllNotificationsForSpace(Space space)
Remove all of the notifications set up for this space. |
void |
removeAllNotificationsForUser(com.atlassian.user.User user)
Remove all of the notifications setup for this user. |
void |
removeContentNotification(com.atlassian.user.User user,
ContentEntityObject content)
|
void |
removeDailyReportNotification(com.atlassian.user.User user)
|
void |
removeLabelNotification(com.atlassian.user.User user,
Label label)
|
void |
removeNotification(Notification notification)
|
void |
setEventManager(com.atlassian.event.EventManager eventManager)
|
void |
setNetworkNotificationForUser(com.atlassian.user.User user,
boolean watchingNetwork)
|
void |
setNotificationDao(NotificationDao notificationDao)
|
void |
setSiteBlogNotificationForUser(com.atlassian.user.User user,
boolean globalBlogWatchForUser)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultNotificationManager()
Method Detail |
---|
public void setEventManager(com.atlassian.event.EventManager eventManager)
public NotificationDao getNotificationDao()
public void setNotificationDao(NotificationDao notificationDao)
public java.util.List<Notification> getNotificationsByUser(com.atlassian.user.User user)
getNotificationsByUser
in interface NotificationManager
@Deprecated public Notification getNotificationByUserAndPage(com.atlassian.user.User user, AbstractPage page)
getNotificationByUserAndContent(com.atlassian.user.User, com.atlassian.confluence.core.ContentEntityObject)
instead.
getNotificationByUserAndPage
in interface NotificationManager
public Notification getNotificationByUserAndSpace(com.atlassian.user.User user, java.lang.String spaceKey)
NotificationManager
NotificationManager.getNotificationByUserAndSpaceAndType(com.atlassian.user.User, com.atlassian.confluence.spaces.Space, com.atlassian.confluence.search.service.ContentTypeEnum)
instead.
getNotificationByUserAndSpace
in interface NotificationManager
public Notification getNotificationByUserAndSpace(com.atlassian.user.User user, Space space)
NotificationManager
NotificationManager.getNotificationByUserAndSpaceAndType(com.atlassian.user.User, com.atlassian.confluence.spaces.Space, com.atlassian.confluence.search.service.ContentTypeEnum)
instead.
getNotificationByUserAndSpace
in interface NotificationManager
public Notification getNotificationByUserAndSpaceAndType(com.atlassian.user.User user, Space space, ContentTypeEnum type)
getNotificationByUserAndSpaceAndType
in interface NotificationManager
@Deprecated public Notification addPageNotification(com.atlassian.user.User user, AbstractPage page)
addContentNotification(com.atlassian.user.User, com.atlassian.confluence.core.ContentEntityObject)
instead.
addPageNotification
in interface NotificationManager
public Notification addSpaceNotification(com.atlassian.user.User user, Space space)
addSpaceNotification
in interface NotificationManager
public Notification addContentNotification(com.atlassian.user.User user, ContentEntityObject content)
addContentNotification
in interface NotificationManager
public void removeContentNotification(com.atlassian.user.User user, ContentEntityObject content)
removeContentNotification
in interface NotificationManager
public java.util.List<Notification> getNotificationsByContent(ContentEntityObject content)
getNotificationsByContent
in interface NotificationManager
public Notification getNotificationByUserAndContent(com.atlassian.user.User user, ContentEntityObject content)
getNotificationByUserAndContent
in interface NotificationManager
public boolean isWatchingContent(com.atlassian.user.User user, ContentEntityObject content)
isWatchingContent
in interface NotificationManager
public boolean addLabelNotification(com.atlassian.user.User user, Label label)
addLabelNotification
in interface NotificationManager
public void removeLabelNotification(com.atlassian.user.User user, Label label)
removeLabelNotification
in interface NotificationManager
public boolean isWatchingLabel(com.atlassian.user.User user, Label label)
isWatchingLabel
in interface NotificationManager
public java.util.List<Notification> getNotificationsByLabel(Label label)
getNotificationsByLabel
in interface NotificationManager
public Notification addSpaceNotification(com.atlassian.user.User user, Space space, ContentTypeEnum type)
NotificationManager
addSpaceNotification
in interface NotificationManager
protected Notification addNotification(com.atlassian.user.User user, Space space, AbstractPage page)
user
- The user to add the notification for, should not be nullspace
- The space to add a watch for or that the page belongs to, can be null if user requests a page that doesn't existpage
- Page to be watched, null if trying to add a Space watch or if user requests a page that doesn't exist
protected Notification addNotification(com.atlassian.user.User user, Space space, AbstractPage page, ContentTypeEnum type)
public void removeNotification(Notification notification)
removeNotification
in interface NotificationManager
public boolean isUserWatchingPageOrSpace(com.atlassian.user.User user, Space space, AbstractPage page)
NotificationManager
isUserWatchingPageOrSpace
in interface NotificationManager
@Deprecated public java.util.List<Notification> getNotificationsByPage(AbstractPage page)
getNotificationsByContent(com.atlassian.confluence.core.ContentEntityObject)
instead.
getNotificationsByPage
in interface NotificationManager
@Deprecated public java.util.List<Notification> getNotificationsBySpace(Space space)
getNotificationsByContent(com.atlassian.confluence.core.ContentEntityObject)
instead.
NotificationManager
getNotificationsBySpace
in interface NotificationManager
public java.util.List<Notification> getNotificationsBySpaceAndType(Space space, ContentTypeEnum type)
getNotificationsBySpaceAndType
in interface NotificationManager
public void removeAllNotificationsForUser(com.atlassian.user.User user)
NotificationManager
removeAllNotificationsForUser
in interface NotificationManager
public void removeAllNotificationsForSpace(Space space)
NotificationManager
removeAllNotificationsForSpace
in interface NotificationManager
public java.util.List<Notification> getDailyReportNotifications()
getDailyReportNotifications
in interface NotificationManager
public Notification getDailyReportNotificationForUser(com.atlassian.user.User user)
getDailyReportNotificationForUser
in interface NotificationManager
public java.util.List<Notification> getSiteBlogNotifications()
getSiteBlogNotifications
in interface NotificationManager
public java.util.List<Notification> findNotificationsByFollowing(com.atlassian.user.User modifier)
NotificationManager
Notification
s for User
s who are
following the given User
. That is, all Notification
s that
return true
from Notification.isNetwork()
and belong to somebody
who is following modifier
via a Connection
.
findNotificationsByFollowing
in interface NotificationManager
modifier
- usually a user who has modified a piece of content.
modifier
.Connection
public java.lang.Iterable<java.lang.Long> findPageAndSpaceNotificationIdsFromSpace(Space space)
NotificationManager
findPageAndSpaceNotificationIdsFromSpace
in interface NotificationManager
space
- a space to find the notifications for
public Notification getSiteBlogNotificationForUser(com.atlassian.user.User user)
getSiteBlogNotificationForUser
in interface NotificationManager
public Notification getNetworkNotificationForUser(com.atlassian.user.User user)
getNetworkNotificationForUser
in interface NotificationManager
public void setSiteBlogNotificationForUser(com.atlassian.user.User user, boolean globalBlogWatchForUser)
setSiteBlogNotificationForUser
in interface NotificationManager
public void setNetworkNotificationForUser(com.atlassian.user.User user, boolean watchingNetwork)
setNetworkNotificationForUser
in interface NotificationManager
public Notification addDailyReportNotfication(com.atlassian.user.User user)
addDailyReportNotfication
in interface NotificationManager
public void removeDailyReportNotification(com.atlassian.user.User user)
removeDailyReportNotification
in interface NotificationManager
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |