Class NotificationMongoDataStorage
- java.lang.Object
-
- org.exoplatform.chat.services.mongodb.NotificationMongoDataStorage
-
- All Implemented Interfaces:
NotificationDataStorage
@Named("notificationStorage") @ApplicationScoped @Singleton public class NotificationMongoDataStorage extends Object implements NotificationDataStorage
-
-
Field Summary
-
Fields inherited from interface org.exoplatform.chat.services.NotificationDataStorage
M_NOTIFICATIONS
-
-
Constructor Summary
Constructors Constructor Description NotificationMongoDataStorage()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddNotification(String receiver, String sender, String type, String category, String categoryId, String content, String link)voidaddNotification(String receiver, String sender, String type, String category, String categoryId, String content, String link, String options)static voidcleanupNotifications()intgetNumberOfNotifications()intgetNumberOfUnreadNotifications()List<org.exoplatform.chat.model.NotificationBean>getUnreadNotifications(String user, org.exoplatform.chat.services.UserService userService)List<org.exoplatform.chat.model.NotificationBean>getUnreadNotifications(String user, org.exoplatform.chat.services.UserService userService, String type, String category, String categoryId)intgetUnreadNotificationsTotal(String user)intgetUnreadNotificationsTotal(String user, String type, String category, String categoryId)voidsetNotificationsAsRead(String user, String type, String category, String categoryId)
-
-
-
Method Detail
-
cleanupNotifications
public static void cleanupNotifications()
-
addNotification
public void addNotification(String receiver, String sender, String type, String category, String categoryId, String content, String link)
- Specified by:
addNotificationin interfaceNotificationDataStorage
-
addNotification
public void addNotification(String receiver, String sender, String type, String category, String categoryId, String content, String link, String options)
- Specified by:
addNotificationin interfaceNotificationDataStorage
-
setNotificationsAsRead
public void setNotificationsAsRead(String user, String type, String category, String categoryId)
- Specified by:
setNotificationsAsReadin interfaceNotificationDataStorage
-
getUnreadNotifications
public List<org.exoplatform.chat.model.NotificationBean> getUnreadNotifications(String user, org.exoplatform.chat.services.UserService userService)
- Specified by:
getUnreadNotificationsin interfaceNotificationDataStorage
-
getUnreadNotifications
public List<org.exoplatform.chat.model.NotificationBean> getUnreadNotifications(String user, org.exoplatform.chat.services.UserService userService, String type, String category, String categoryId)
- Specified by:
getUnreadNotificationsin interfaceNotificationDataStorage
-
getUnreadNotificationsTotal
public int getUnreadNotificationsTotal(String user)
- Specified by:
getUnreadNotificationsTotalin interfaceNotificationDataStorage
-
getUnreadNotificationsTotal
public int getUnreadNotificationsTotal(String user, String type, String category, String categoryId)
- Specified by:
getUnreadNotificationsTotalin interfaceNotificationDataStorage
-
getNumberOfNotifications
public int getNumberOfNotifications()
- Specified by:
getNumberOfNotificationsin interfaceNotificationDataStorage
-
getNumberOfUnreadNotifications
public int getNumberOfUnreadNotifications()
- Specified by:
getNumberOfUnreadNotificationsin interfaceNotificationDataStorage
-
-