Interface WebNotificationService


public interface WebNotificationService
  • Field Details

  • Method Details

    • 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
    • getNotificationInfo

      NotificationInfo getNotificationInfo(String notificationId)
      Get the notificationInfo for the provided id
      Parameters:
      notificationId - the notification id
      Since:
      PLF 6.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
    • markAllRead

      void markAllRead(List<String> plugins, String username)
      Marks all notifications of the user as read for the designated notification types.
      Parameters:
      username - the user name
      plugins - List of PluginKey ids
    • hidePopover

      void hidePopover(String notificationId)
      Updates the notification's popover list 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<String> 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 bodies list matched the given filter
      Since:
      PLF 4.2
      eXo level API
      Platform
    • getNotificationInfos

      List<NotificationInfo> getNotificationInfos(WebNotificationFilter filter, int offset, int limit)
      Gets the NotificationInfo list by the given filter.

      The filter consist of these criteria: + UserId + isPopover TRUE/FALSE + Read TRUE/FALSE + parameter key,value

      Parameters:
      filter - the filter condition
      offset -
      limit -
      Returns:
      The notification list matched the given filter
      Since:
      PLF 5.1
      eXo level API
      Platform
    • getNotificationMessage

      @Deprecated(forRemoval=true, since="1.5.0") String getNotificationMessage(NotificationInfo notification, boolean isOnPopover)
      Deprecated, for removal: This API element is subject to removal in a future version.
      replaced by Frontend UI building instead of Server end message building
      Retrieve Built Message using Groovy Template engine.
    • remove

      boolean remove(String notificationId)
      Removes the notification by the notificationId
      Parameters:
      notificationId -
      Returns:
      Returns TRUE if removing successfully Otherwise FALSE
      Since:
      PLF 4.2
      eXo level API
      Platform
    • getNumberOnBadge

      int getNumberOnBadge(String username)
      Gets the number on the badge by the specified user
      Parameters:
      username - user to retrieve its badges
      Returns:
      Since:
      PLF 4.2
      eXo level API
      Platform
    • countUnreadByPlugin

      Map<String,Integer> countUnreadByPlugin(String username)
      Parameters:
      username - user to retrieve its badges
      Returns:
      Map of Badges per plugin
    • resetNumberOnBadge

      void resetNumberOnBadge(String userId)
      Parameters:
      userId -
      Since:
      PLF 4.2
      eXo level API
      Platform
    • resetNumberOnBadge

      void resetNumberOnBadge(List<String> plugins, String username)
      Reset badge on notifications of the user for the designated notification types.
      Parameters:
      username - the user name
      plugins - List of PluginKey ids