Class WatchedLocationReference
- java.lang.Object
-
- org.xwiki.notifications.filters.watch.WatchedLocationReference
-
- All Implemented Interfaces:
WatchedEntityReference
public class WatchedLocationReference extends Object implements WatchedEntityReference
Reference of a location to watch.- Since:
- 9.8RC1
- Version:
- $Id: 0bbf1f2df0597113e37485f47f20a61189288ce8 $
-
-
Constructor Summary
Constructors Constructor Description WatchedLocationReference(org.xwiki.model.reference.EntityReference entityReference, String serializedReference, org.xwiki.model.reference.EntityReferenceResolver<String> resolver, org.xwiki.notifications.filters.internal.scope.ScopeNotificationFilterLocationStateComputer stateComputer, NotificationFilterPreferenceManager notificationFilterPreferenceManager)Construct a WatchedLocationReference.
-
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)booleanisWatchedWithAllEventTypes(org.xwiki.model.reference.DocumentReference userReference)booleanmatchExactly(NotificationFilterPreference notificationFilterPreference)StringtoString()
-
-
-
Constructor Detail
-
WatchedLocationReference
public WatchedLocationReference(org.xwiki.model.reference.EntityReference entityReference, String serializedReference, org.xwiki.model.reference.EntityReferenceResolver<String> resolver, org.xwiki.notifications.filters.internal.scope.ScopeNotificationFilterLocationStateComputer stateComputer, NotificationFilterPreferenceManager notificationFilterPreferenceManager)Construct a WatchedLocationReference.- Parameters:
entityReference- the reference of the location to watchserializedReference- the serialized reference of the location to watchresolver- the default entity reference resolverstateComputer- the default ScopeNotificationFilterLocationStateComputernotificationFilterPreferenceManager- the notification filter preference 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
-
isWatchedWithAllEventTypes
public boolean isWatchedWithAllEventTypes(org.xwiki.model.reference.DocumentReference userReference) throws org.xwiki.notifications.NotificationException- Specified by:
isWatchedWithAllEventTypesin interfaceWatchedEntityReference- Parameters:
userReference- a user- Returns:
trueif the given user watch the current entity reference for all events.- 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
-
-