Class JPAWebNotificationStorage
- java.lang.Object
-
- org.exoplatform.commons.notification.impl.jpa.web.JPAWebNotificationStorage
-
- All Implemented Interfaces:
org.exoplatform.commons.api.notification.service.storage.WebNotificationStorage
public class JPAWebNotificationStorage extends Object implements org.exoplatform.commons.api.notification.service.storage.WebNotificationStorage
-
-
Constructor Summary
Constructors Constructor Description JPAWebNotificationStorage(WebNotifDAO webNotifDAO, WebParamsDAO webParamsDAO, WebUsersDAO webUsersDAO, org.exoplatform.commons.api.notification.service.setting.UserSettingService userSettingService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.exoplatform.commons.api.notification.model.NotificationInfoconvertWebNotifEntityToNotificationInfo(WebUsersEntity webUsersEntity)Convert user web notification entity to notification DTOorg.exoplatform.commons.api.notification.model.NotificationInfoget(String id)List<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 userId)voidhidePopover(String notificationId)voidmarkAllRead(String userId)voidmarkRead(String notificationId)booleanremove(long seconds)booleanremove(String notificationId)booleanremove(String userId, long seconds)voidresetNumberOnBadge(String userId)voidsave(org.exoplatform.commons.api.notification.model.NotificationInfo notification)voidupdate(org.exoplatform.commons.api.notification.model.NotificationInfo notification, boolean moveTop)
-
-
-
Constructor Detail
-
JPAWebNotificationStorage
public JPAWebNotificationStorage(WebNotifDAO webNotifDAO, WebParamsDAO webParamsDAO, WebUsersDAO webUsersDAO, org.exoplatform.commons.api.notification.service.setting.UserSettingService userSettingService)
-
-
Method Detail
-
save
public void save(org.exoplatform.commons.api.notification.model.NotificationInfo notification)
- Specified by:
savein 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
-
get
public org.exoplatform.commons.api.notification.model.NotificationInfo get(String id)
- Specified by:
getin interfaceorg.exoplatform.commons.api.notification.service.storage.WebNotificationStorage
-
remove
public boolean remove(String notificationId)
- 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
-
remove
public boolean remove(String userId, long seconds)
- Specified by:
removein interfaceorg.exoplatform.commons.api.notification.service.storage.WebNotificationStorage
-
markRead
public void markRead(String notificationId)
- Specified by:
markReadin interfaceorg.exoplatform.commons.api.notification.service.storage.WebNotificationStorage
-
hidePopover
public void hidePopover(String notificationId)
- Specified by:
hidePopoverin interfaceorg.exoplatform.commons.api.notification.service.storage.WebNotificationStorage
-
markAllRead
public void markAllRead(String userId)
- Specified by:
markAllReadin interfaceorg.exoplatform.commons.api.notification.service.storage.WebNotificationStorage
-
getUnreadNotification
public org.exoplatform.commons.api.notification.model.NotificationInfo getUnreadNotification(String pluginId, String activityId, String userId)
- Specified by:
getUnreadNotificationin 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
-
getNumberOnBadge
public int getNumberOnBadge(String userId)
- Specified by:
getNumberOnBadgein interfaceorg.exoplatform.commons.api.notification.service.storage.WebNotificationStorage
-
resetNumberOnBadge
public void resetNumberOnBadge(String userId)
- Specified by:
resetNumberOnBadgein interfaceorg.exoplatform.commons.api.notification.service.storage.WebNotificationStorage
-
convertWebNotifEntityToNotificationInfo
public org.exoplatform.commons.api.notification.model.NotificationInfo convertWebNotifEntityToNotificationInfo(WebUsersEntity webUsersEntity)
Convert user web notification entity to notification DTO- Parameters:
webUsersEntity- user web notification- Returns:
- notification DTO
-
-