Class CachedWebNotificationStorage

java.lang.Object
org.exoplatform.commons.notification.impl.service.storage.cache.CachedWebNotificationStorage
All Implemented Interfaces:
org.exoplatform.commons.api.notification.service.storage.WebNotificationStorage

public class CachedWebNotificationStorage extends Object implements org.exoplatform.commons.api.notification.service.storage.WebNotificationStorage
  • Constructor Details

    • CachedWebNotificationStorage

      public CachedWebNotificationStorage(JPAWebNotificationStorage storage, org.exoplatform.services.cache.CacheService cacheService)
  • Method Details

    • save

      public void save(org.exoplatform.commons.api.notification.model.NotificationInfo notification)
      Specified by:
      save in interface org.exoplatform.commons.api.notification.service.storage.WebNotificationStorage
    • update

      public void update(org.exoplatform.commons.api.notification.model.NotificationInfo notification, boolean moveTop)
      Specified by:
      update in interface org.exoplatform.commons.api.notification.service.storage.WebNotificationStorage
    • markRead

      public void markRead(String notificationId)
      Specified by:
      markRead in interface org.exoplatform.commons.api.notification.service.storage.WebNotificationStorage
    • markAllRead

      public void markAllRead(String userId)
      Specified by:
      markAllRead in interface org.exoplatform.commons.api.notification.service.storage.WebNotificationStorage
    • markAllRead

      public void markAllRead(List<String> plugins, String username)
      Specified by:
      markAllRead in interface org.exoplatform.commons.api.notification.service.storage.WebNotificationStorage
    • hidePopover

      public void hidePopover(String notificationId)
      Specified by:
      hidePopover in interface org.exoplatform.commons.api.notification.service.storage.WebNotificationStorage
    • get

      public List<org.exoplatform.commons.api.notification.model.NotificationInfo> get(org.exoplatform.commons.api.notification.model.WebNotificationFilter filter, int offset, int limit)
      Specified by:
      get in interface org.exoplatform.commons.api.notification.service.storage.WebNotificationStorage
    • remove

      public boolean remove(String notificationId)
      Specified by:
      remove in interface org.exoplatform.commons.api.notification.service.storage.WebNotificationStorage
    • get

      public org.exoplatform.commons.api.notification.model.NotificationInfo get(String notificationId)
      Specified by:
      get in interface org.exoplatform.commons.api.notification.service.storage.WebNotificationStorage
    • getUnreadNotification

      public org.exoplatform.commons.api.notification.model.NotificationInfo getUnreadNotification(String pluginId, String activityId, String owner)
      Specified by:
      getUnreadNotification in interface org.exoplatform.commons.api.notification.service.storage.WebNotificationStorage
    • remove

      public boolean remove(String userId, long seconds)
      Specified by:
      remove in interface org.exoplatform.commons.api.notification.service.storage.WebNotificationStorage
    • remove

      public boolean remove(long seconds)
      Specified by:
      remove in interface org.exoplatform.commons.api.notification.service.storage.WebNotificationStorage
    • getNumberOnBadge

      public int getNumberOnBadge(String userId)
      Specified by:
      getNumberOnBadge in interface org.exoplatform.commons.api.notification.service.storage.WebNotificationStorage
    • countUnreadByPlugin

      public Map<String,Integer> countUnreadByPlugin(String userId)
      Specified by:
      countUnreadByPlugin in interface org.exoplatform.commons.api.notification.service.storage.WebNotificationStorage
    • resetNumberOnBadge

      public void resetNumberOnBadge(String userId)
      Specified by:
      resetNumberOnBadge in interface org.exoplatform.commons.api.notification.service.storage.WebNotificationStorage
    • resetNumberOnBadge

      public void resetNumberOnBadge(List<String> plugins, String username)
      Specified by:
      resetNumberOnBadge in interface org.exoplatform.commons.api.notification.service.storage.WebNotificationStorage
    • setStorage

      public void setStorage(org.exoplatform.commons.api.notification.service.storage.WebNotificationStorage storage)
    • updateAllRead

      public void updateAllRead(String userId)
    • clearWebNotificationCache

      public void clearWebNotificationCache(String notificationId)
      Clear the notification from the cache.
      Parameters:
      notificationId -