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
-
Field Summary
Fields inherited from interface org.exoplatform.commons.api.notification.service.storage.WebNotificationStorage
NOTIFICATION_WEB_DELETED_EVENT, NOTIFICATION_WEB_READ_ALL_EVENT, NOTIFICATION_WEB_READ_EVENT, NOTIFICATION_WEB_SAVED_EVENT -
Constructor Summary
ConstructorsConstructorDescriptionCachedWebNotificationStorage(JPAWebNotificationStorage storage, org.exoplatform.services.cache.CacheService cacheService) -
Method Summary
Modifier and TypeMethodDescriptionvoidclearWebNotificationCache(String notificationId) Clear the notification from the cache.countUnreadByPlugin(String userId) org.exoplatform.commons.api.notification.model.NotificationInfoList<org.exoplatform.commons.api.notification.model.NotificationInfo> get(org.exoplatform.commons.api.notification.model.WebNotificationFilter filter, int offset, int limit) intgetNumberOnBadge(String userId) org.exoplatform.commons.api.notification.model.NotificationInfogetUnreadNotification(String pluginId, String activityId, String owner) voidhidePopover(String notificationId) voidmarkAllRead(String userId) voidmarkAllRead(List<String> plugins, String username) voidbooleanremove(long seconds) booleanbooleanvoidresetNumberOnBadge(String userId) voidresetNumberOnBadge(List<String> plugins, String username) voidsave(org.exoplatform.commons.api.notification.model.NotificationInfo notification) voidsetStorage(org.exoplatform.commons.api.notification.service.storage.WebNotificationStorage storage) voidupdate(org.exoplatform.commons.api.notification.model.NotificationInfo notification, boolean moveTop) voidupdateAllRead(String userId)
-
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:
savein interfaceorg.exoplatform.commons.api.notification.service.storage.WebNotificationStorage
-
update
public void update(org.exoplatform.commons.api.notification.model.NotificationInfo notification, boolean moveTop) - Specified by:
updatein interfaceorg.exoplatform.commons.api.notification.service.storage.WebNotificationStorage
-
markRead
- Specified by:
markReadin interfaceorg.exoplatform.commons.api.notification.service.storage.WebNotificationStorage
-
markAllRead
- Specified by:
markAllReadin interfaceorg.exoplatform.commons.api.notification.service.storage.WebNotificationStorage
-
markAllRead
- Specified by:
markAllReadin interfaceorg.exoplatform.commons.api.notification.service.storage.WebNotificationStorage
-
hidePopover
- Specified by:
hidePopoverin interfaceorg.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:
getin interfaceorg.exoplatform.commons.api.notification.service.storage.WebNotificationStorage
-
remove
- Specified by:
removein interfaceorg.exoplatform.commons.api.notification.service.storage.WebNotificationStorage
-
get
- Specified by:
getin interfaceorg.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:
getUnreadNotificationin interfaceorg.exoplatform.commons.api.notification.service.storage.WebNotificationStorage
-
remove
- Specified by:
removein interfaceorg.exoplatform.commons.api.notification.service.storage.WebNotificationStorage
-
remove
public boolean remove(long seconds) - Specified by:
removein interfaceorg.exoplatform.commons.api.notification.service.storage.WebNotificationStorage
-
getNumberOnBadge
- Specified by:
getNumberOnBadgein interfaceorg.exoplatform.commons.api.notification.service.storage.WebNotificationStorage
-
countUnreadByPlugin
- Specified by:
countUnreadByPluginin interfaceorg.exoplatform.commons.api.notification.service.storage.WebNotificationStorage
-
resetNumberOnBadge
- Specified by:
resetNumberOnBadgein interfaceorg.exoplatform.commons.api.notification.service.storage.WebNotificationStorage
-
resetNumberOnBadge
- Specified by:
resetNumberOnBadgein interfaceorg.exoplatform.commons.api.notification.service.storage.WebNotificationStorage
-
setStorage
public void setStorage(org.exoplatform.commons.api.notification.service.storage.WebNotificationStorage storage) -
updateAllRead
-
clearWebNotificationCache
Clear the notification from the cache.- Parameters:
notificationId-
-