public class UserNotificationRepository extends NotificationRepository
| Constructor and Description |
|---|
UserNotificationRepository(SimpleOrmSession simpleOrmSession,
WebQueueRepository webQueueRepository) |
UserNotificationRepository(SimpleOrmSession simpleOrmSession,
WebQueueRepository webQueueRepository,
UserRepository userRepository) |
| Modifier and Type | Method and Description |
|---|---|
UserNotification |
createNotification(String userId,
String title,
String message,
String externalUrl,
ExpirationAge expirationAge,
User authUser) |
UserNotification |
createNotification(String userId,
String title,
String message,
String actionEvent,
org.json.JSONObject actionPayload,
ExpirationAge expirationAge,
User authUser) |
Stream<UserNotification> |
findAll(User user) |
Stream<UserNotification> |
getActiveNotifications(User user) |
Stream<UserNotification> |
getActiveNotificationsOlderThan(int duration,
TimeUnit timeUnit,
User user) |
UserNotification |
getNotification(String notificationId,
User user) |
UserRepository |
getUserRepository()
Avoid circular reference with UserRepository
|
void |
markNotified(Iterable<String> notificationIds,
User user) |
void |
markRead(String[] notificationIds,
User user)
This method only allows marking items read for the passed in user
|
void |
saveNotification(UserNotification notification,
User authUser) |
getSimpleOrmSession, hash@Inject public UserNotificationRepository(SimpleOrmSession simpleOrmSession, WebQueueRepository webQueueRepository)
public UserNotificationRepository(SimpleOrmSession simpleOrmSession, WebQueueRepository webQueueRepository, UserRepository userRepository)
public Stream<UserNotification> getActiveNotifications(User user)
public Stream<UserNotification> findAll(User user)
public Stream<UserNotification> getActiveNotificationsOlderThan(int duration, TimeUnit timeUnit, User user)
public UserNotification createNotification(String userId, String title, String message, String actionEvent, org.json.JSONObject actionPayload, ExpirationAge expirationAge, User authUser)
public UserNotification createNotification(String userId, String title, String message, String externalUrl, ExpirationAge expirationAge, User authUser)
public void saveNotification(UserNotification notification, User authUser)
public UserNotification getNotification(String notificationId, User user)
public void markRead(String[] notificationIds, User user)
public UserRepository getUserRepository()
Copyright © 2016–2021 MWARE SOLUTIONS. All rights reserved.