Interface NotificationManager

    • Method Detail

      • getSubscribers

        List<String> getSubscribers​(String notification,
                                    DocumentModel doc)
        Gets the users that subscribed to a notification on a certain document.
      • getSubscriptionsForUserOnDocument

        List<String> getSubscriptionsForUserOnDocument​(String username,
                                                       DocumentModel doc)
        Gets the notifications for which a user subscribed for a certain document.
      • getUsersSubscribedToNotificationOnDocument

        List<String> getUsersSubscribedToNotificationOnDocument​(String notification,
                                                                DocumentModel doc)
        Gets all users and groups that subscribed to a notification on a document This is used in management of subscritptions.
      • addSubscriptions

        void addSubscriptions​(String username,
                              DocumentModel doc,
                              Boolean sendConfirmationEmail,
                              NuxeoPrincipal principal)
        Since:
        5.6 Called when a user subscribes to all notifications.
      • removeSubscriptions

        void removeSubscriptions​(String username,
                                 List<String> notifications,
                                 DocumentModel doc)
        Since:
        5.6 Called when a user unsubscribes to all notifications.
      • removeSubscription

        void removeSubscription​(String username,
                                String notification,
                                DocumentModel doc)
        Called when a user cancels his notification.
      • getNotificationByName

        Notification getNotificationByName​(String selectedNotification)
        Returns a notification with all data loaded (label, etc).
      • sendNotification

        void sendNotification​(String notificationName,
                              Map<String,​Object> infoMap,
                              String userPrincipal)
        Directly sends a notification to the principal, using the data provided in the map

        The map should contain at least the userName of the user calling the method stored under the key "author".

        infoMap should also contain all the variables that should be used to make-up the body of the notifications message.

        Parameters:
        notificationName - name of notification
        infoMap - data used to compose the notification body
        userPrincipal - recipient used to get the adress(es) to send emails
      • getNotificationsForSubscriptions

        List<Notification> getNotificationsForSubscriptions​(String parentType)
      • getNotificationEventNames

        Set<String> getNotificationEventNames()
        Gets the list of event names used by notifications.
        Since:
        5.4.2
      • getSubscribedDocuments

        List<DocumentModel> getSubscribedDocuments​(String prefixedPrincipalName,
                                                   String respositoryName)
        Returns the list of live docs the user is subscribed to in the given repository .
        Since:
        9.1