Class NotificationTool


  • public class NotificationTool
    extends java.lang.Object
    • Constructor Detail

      • NotificationTool

        public NotificationTool()
        Default contructor (using system admin grant)
      • NotificationTool

        public NotificationTool​(Grant g,
                                Notification n)
        Constructor
        Parameters:
        g - Grant (null means using system admin grant)
      • NotificationTool

        public NotificationTool​(Notification n)
        Constructor
        Parameters:
        n -
    • Method Detail

      • push

        public void push​(ObjectDB o)
        Push notification to all configured channels and recipients
        Parameters:
        o - Object triggering notification
      • pushInternalNotification

        public void pushInternalNotification​(ObjectDB o)
        Push notification on internal canal
        Parameters:
        o - object triggering event
      • pushMailNotification

        public void pushMailNotification​(ObjectDB o)
        Push mail notification
        Parameters:
        o - object triggering event
      • sendFirebaseNotification

        public void sendFirebaseNotification​(ObjectDB o)
        Send notification via firebase channel
        Parameters:
        o - ObjectDB carrying notification
      • subscribeUser

        public void subscribeUser​(java.lang.String userId,
                                  java.lang.String configId)
        Subscribe user to a notification (Recipient channel)
        Parameters:
        userId -
        configId - id of N-N object NotiGroupChannels (link between Recipient and channel)
      • getNotificationIdsForGroup

        public static java.util.List<java.lang.String> getNotificationIdsForGroup​(java.lang.String groupName)
        Retrieves a list of notification IDs associated with a specified group.
        Parameters:
        groupName - The name of the group for which notification IDs are requested.
        Returns:
        A List containing the notification IDs for the specified group.