Class WatchedUserReference
- java.lang.Object
-
- org.xwiki.notifications.filters.watch.WatchedUserReference
-
- All Implemented Interfaces:
WatchedEntityReference
public class WatchedUserReference extends Object implements WatchedEntityReference
Reference to a user to watch.- Since:
- 9.8RC1
- Version:
- $Id: b74f622a9262e6dc07cb878addfb6c40e54e4874 $
-
-
Constructor Summary
Constructors Constructor Description WatchedUserReference(String userId, org.xwiki.notifications.filters.internal.user.EventUserFilterPreferencesGetter preferencesGetter, NotificationFilterPreferenceManager notificationFilterPreferenceManager)Construct a WatchedUserReference.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NotificationFilterPreferencecreateExclusiveFilterPreference()Create a notification filter preference to watch this entity.NotificationFilterPreferencecreateInclusiveFilterPreference()Create a notification filter preference to watch this entity.booleanisWatched(org.xwiki.model.reference.DocumentReference userReference)booleanmatchExactly(NotificationFilterPreference notificationFilterPreference)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.xwiki.notifications.filters.watch.WatchedEntityReference
isWatchedWithAllEventTypes
-
-
-
-
Constructor Detail
-
WatchedUserReference
public WatchedUserReference(String userId, org.xwiki.notifications.filters.internal.user.EventUserFilterPreferencesGetter preferencesGetter, NotificationFilterPreferenceManager notificationFilterPreferenceManager)
Construct a WatchedUserReference.- Parameters:
userId- id of the user to watch.preferencesGetter- the instance of EventUserFilterPreferencesGetternotificationFilterPreferenceManager- the notification filter manager- Since:
- 10.9
-
-
Method Detail
-
isWatched
public boolean isWatched(org.xwiki.model.reference.DocumentReference userReference) throws org.xwiki.notifications.NotificationException- Specified by:
isWatchedin interfaceWatchedEntityReference- Parameters:
userReference- a user- Returns:
trueif the given user watch the current entity reference for any event type or format.- Throws:
org.xwiki.notifications.NotificationException- if an error happens
-
matchExactly
public boolean matchExactly(NotificationFilterPreference notificationFilterPreference)
- Specified by:
matchExactlyin interfaceWatchedEntityReference- Parameters:
notificationFilterPreference- a filter preference- Returns:
- either or not the filter preference concerns this exact entity
-
createInclusiveFilterPreference
public NotificationFilterPreference createInclusiveFilterPreference()
Description copied from interface:WatchedEntityReferenceCreate a notification filter preference to watch this entity.- Specified by:
createInclusiveFilterPreferencein interfaceWatchedEntityReference- Returns:
- a NotificationFilterPreference to save in order to watch this entity
-
createExclusiveFilterPreference
public NotificationFilterPreference createExclusiveFilterPreference()
Description copied from interface:WatchedEntityReferenceCreate a notification filter preference to watch this entity.- Specified by:
createExclusiveFilterPreferencein interfaceWatchedEntityReference- Returns:
- a NotificationFilterPreference to save in order to watch this entity
-
-