Interface WatchedEntityReference

  • All Known Implementing Classes:
    WatchedLocationReference, WatchedUserReference

    public interface WatchedEntityReference
    Reference to an entity (a location, a user, etc...) to watch.
    Since:
    9.8RC1
    Version:
    $Id: 11559ce8af3c0051c2a7350bfb4e505aa1eb03c2 $
    • Method Detail

      • isWatched

        boolean isWatched​(org.xwiki.model.reference.DocumentReference userReference)
                   throws org.xwiki.notifications.NotificationException
        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
        Since:
        9.9RC1
      • isWatchedWithAllEventTypes

        default boolean isWatchedWithAllEventTypes​(org.xwiki.model.reference.DocumentReference userReference)
                                            throws org.xwiki.notifications.NotificationException
        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
        Since:
        12.8RC1
      • matchExactly

        boolean matchExactly​(NotificationFilterPreference notificationFilterPreference)
        Parameters:
        notificationFilterPreference - a filter preference
        Returns:
        either or not the filter preference concerns this exact entity
      • createInclusiveFilterPreference

        NotificationFilterPreference createInclusiveFilterPreference()
        Create a notification filter preference to watch this entity.
        Returns:
        a NotificationFilterPreference to save in order to watch this entity
        Since:
        9.9RC1
      • createExclusiveFilterPreference

        NotificationFilterPreference createExclusiveFilterPreference()
        Create a notification filter preference to watch this entity.
        Returns:
        a NotificationFilterPreference to save in order to watch this entity
        Since:
        9.9RC1