Class WatchedLocationReference

    • 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 watch
        serializedReference - the serialized reference of the location to watch
        resolver - the default entity reference resolver
        stateComputer - the default ScopeNotificationFilterLocationStateComputer
        notificationFilterPreferenceManager - 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:
        isWatched in interface WatchedEntityReference
        Parameters:
        userReference - a user
        Returns:
        true if 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:
        isWatchedWithAllEventTypes in interface WatchedEntityReference
        Parameters:
        userReference - a user
        Returns:
        true if the given user watch the current entity reference for all events.
        Throws:
        org.xwiki.notifications.NotificationException - if an error happens