Interface WatchedEntitiesManager


  • @Role
    public interface WatchedEntitiesManager
    Manage the watched entities. We call `Watched Entities` the locations or the users for that we receive all events.
    Since:
    9.8RC1
    Version:
    $Id: e4fa0fbad9e16c010bec588920f2c3a6687c7730 $
    • Method Detail

      • watchEntity

        void watchEntity​(WatchedEntityReference entity,
                         org.xwiki.model.reference.DocumentReference user)
                  throws org.xwiki.notifications.NotificationException
        Add a filter to watch the specified entity.
        Parameters:
        entity - the entity to watch
        user - user that will watch the entity
        Throws:
        org.xwiki.notifications.NotificationException - if an error happens
      • unwatchEntity

        void unwatchEntity​(WatchedEntityReference entity,
                           org.xwiki.model.reference.DocumentReference user)
                    throws org.xwiki.notifications.NotificationException
        Remove a filter to stop watching the specified entity.
        Parameters:
        entity - the entity to watch
        user - user that will watch the entity
        Throws:
        org.xwiki.notifications.NotificationException - if an error happens
      • getWatchedUsers

        Collection<String> getWatchedUsers​(org.xwiki.model.reference.DocumentReference user)
                                    throws org.xwiki.notifications.NotificationException
        Parameters:
        user - user for who we want to know the watched users
        Returns:
        the users watched by the given user
        Throws:
        org.xwiki.notifications.NotificationException - if an error happens
        Since:
        10.4RC1