Class NotificationService


  • public class NotificationService
    extends Object
    • Constructor Detail

      • NotificationService

        public NotificationService()
    • Method Detail

      • clearList

        public void clearList()
      • markAllAsRead

        public void markAllAsRead​(String userId)
      • size

        public int size()
      • getUnreadNotificationSize

        public int getUnreadNotificationSize​(String userId,
                                             boolean admin,
                                             int maxSize)
      • addNotification

        public void addNotification​(String message,
                                    int type,
                                    String userId,
                                    boolean admin)
      • addSystemNotification

        public void addSystemNotification​(ContentContext ctx,
                                          String message,
                                          int type,
                                          boolean admin)
      • notifExternalService

        public static void notifExternalService​(ContentContext ctx,
                                                String message,
                                                int type,
                                                String inURL,
                                                String userId,
                                                boolean admin)
      • addNotification

        public void addNotification​(String message,
                                    String url,
                                    int type,
                                    String userId,
                                    boolean admin)
        add a notification.
        Parameters:
        message - the message of the notification
        url - a url with more information (can be null)
        type - the type of the message (same type than GenericMessage)
        userId - a notification can be specific for a user or for everybody (userId null)
      • addNotification

        public void addNotification​(String message,
                                    String url,
                                    int type,
                                    String userId,
                                    String receiver,
                                    boolean admin)