Interface WebNotificationStorage


  • public interface WebNotificationStorage
    • Method Detail

      • save

        void save​(NotificationInfo notification)
        Creates the new notification message to the specified user. The userId gets from the notification#getTo().
        Parameters:
        notification - the notification
        Since:
        PLF 4.2
        eXo level API
        Platform
      • update

        void update​(NotificationInfo notification,
                    boolean moveTop)
        Update an existing notification message.
        Parameters:
        notification - the notification
        moveTop - After updating, MUST move the notification to top of list
        Since:
        PLF 4.2
        eXo level API
        Platform
      • markRead

        void markRead​(String notificationId)
        Marks the notification to be read by the userId
        Parameters:
        notificationId - the Notification Id
        Since:
        PLF 4.2
        eXo level API
        Platform
      • markAllRead

        void markAllRead​(String userId)
        Marks all notifications what belong to the user to be read.
        Parameters:
        userId - the userId
        Since:
        PLF 4.2
        eXo level API
        Platform
      • hidePopover

        void hidePopover​(String notificationId)
        Updates the notification's popover status to be FALSE value However it's still showing on View All page.
        Parameters:
        notificationId - the Notification Id
        Since:
        PLF 4.2
        eXo level API
        Platform
      • get

        List<NotificationInfo> get​(WebNotificationFilter filter,
                                   int offset,
                                   int limit)
        Gets the notification list by the given filter. The filter consist of these criteria: + UserId + isPopover TRUE/FALSE + Read TRUE/FALSE
        Parameters:
        filter - the filter condition
        offset -
        limit -
        Returns:
        The notification list matched the given filter
        Since:
        PLF 4.2
        eXo level API
        Platform
      • get

        NotificationInfo get​(String notificationId)
        Gets the notification by the Id
        Parameters:
        notificationId -
        Returns:
        the Notification matched the given Id
        Since:
        PLF 4.2
        eXo level API
        Platform
      • remove

        boolean remove​(String notificationId)
        Removes the notification by given Id
        Parameters:
        notificationId - the Id of the notification
        Since:
        PLF 4.2
        eXo level API
        Platform
      • remove

        boolean remove​(String userId,
                       long seconds)
        Remove the NotificationInfo live after X days
        Parameters:
        userId -
        seconds -
        Returns:
        Returns TRUE if removing successfully Otherwise FALSE
        Since:
        PLF 4.2
        eXo level API
        Platform
      • getUnreadNotification

        NotificationInfo getUnreadNotification​(String pluginId,
                                               String activityId,
                                               String owner)
        Gets the notification by the given conditions
        Parameters:
        pluginId -
        activityId -
        owner -
        Returns:
        Since:
        PLF 4.2
        eXo level API
        Platform
      • getNumberOnBadge

        int getNumberOnBadge​(String userId)
        Gets the number on the badge by the specified user
        Parameters:
        userId - the userId
        Returns:
        Since:
        PLF 4.2
        eXo level API
        Platform
      • resetNumberOnBadge

        void resetNumberOnBadge​(String userId)
        Reset the number on badge of the specified user
        Parameters:
        userId - the userId
        Since:
        PLF 4.2
        eXo level API
        Platform
      • remove

        boolean remove​(long seconds)
        Remove the NotificationInfo live after X days
        Parameters:
        seconds -
        Returns:
        Returns TRUE if removing successfully Otherwise FALSE
        Since:
        PLF 4.2
        eXo level API
        Platform