public class WatchedUserReference extends Object implements WatchedEntityReference
Constructor and Description |
---|
WatchedUserReference(String userId,
org.xwiki.notifications.filters.internal.user.EventUserFilterPreferencesGetter preferencesGetter,
NotificationFilterPreferenceManager notificationFilterPreferenceManager)
Construct a WatchedUserReference.
|
Modifier and Type | Method and Description |
---|---|
NotificationFilterPreference |
createExclusiveFilterPreference()
Create a notification filter preference to watch this entity.
|
NotificationFilterPreference |
createInclusiveFilterPreference()
Create a notification filter preference to watch this entity.
|
boolean |
isWatched(org.xwiki.model.reference.DocumentReference userReference) |
boolean |
matchExactly(NotificationFilterPreference notificationFilterPreference) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isWatchedWithAllEventTypes
public WatchedUserReference(String userId, org.xwiki.notifications.filters.internal.user.EventUserFilterPreferencesGetter preferencesGetter, NotificationFilterPreferenceManager notificationFilterPreferenceManager)
userId
- id of the user to watch.preferencesGetter
- the instance of EventUserFilterPreferencesGetternotificationFilterPreferenceManager
- the notification filter managerpublic boolean isWatched(org.xwiki.model.reference.DocumentReference userReference) throws org.xwiki.notifications.NotificationException
isWatched
in interface WatchedEntityReference
userReference
- a usertrue
if the given user watch the current entity reference for any event type or format.org.xwiki.notifications.NotificationException
- if an error happenspublic boolean matchExactly(NotificationFilterPreference notificationFilterPreference)
matchExactly
in interface WatchedEntityReference
notificationFilterPreference
- a filter preferencepublic NotificationFilterPreference createInclusiveFilterPreference()
WatchedEntityReference
createInclusiveFilterPreference
in interface WatchedEntityReference
public NotificationFilterPreference createExclusiveFilterPreference()
WatchedEntityReference
createExclusiveFilterPreference
in interface WatchedEntityReference
Copyright © 2004–2022 XWiki. All rights reserved.