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
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from interface org.exoplatform.chat.services.NotificationDataStorage
M_NOTIFICATIONS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddNotification(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 voidintintList<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) intintgetUnreadNotificationsTotal(String user, String type, String category, String categoryId) voidsetNotificationsAsRead(String user, String type, String category, String categoryId)
-
Field Details
-
TIMESTAMP
- See Also:
-
USER
- See Also:
-
FROM
- See Also:
-
TYPE
- See Also:
-
CATEGORY
- See Also:
-
CATEGORY_ID
- See Also:
-
CONTENT
- See Also:
-
OPTIONS
- See Also:
-
-
Constructor Details
-
NotificationMongoDataStorage
public NotificationMongoDataStorage()
-
-
Method Details
-
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
- 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
- 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
-