public interface NotificationsService
Modifier and Type | Field and Description |
---|---|
static String |
EMAIL_SUBSCRIPTION |
static String |
IN_APP_SUBSCRIPTION |
static String |
INVOLVED_ITEM_ID |
static String |
NOTIFICATION |
static String |
NOTIFICATION_BODY |
static String |
NOTIFICATION_RECIPIENT_EDGE |
static String |
NOTIFICATION_SEEN |
static String |
NOTIFICATION_TITLE |
static String |
SUBSCRIBED_ITEM_ID |
static String |
SUBSCRIPTION_EDGE |
static String |
SUBSCRIPTION_TYPE |
Modifier and Type | Method and Description |
---|---|
List<de.deepamehta.core.RelatedTopic> |
getNotifications()
Gets all notifications for the logged-in user.
|
List<de.deepamehta.core.RelatedTopic> |
getSubscriptions()
Gets all subscribed topics for the logged-in user.
|
List<de.deepamehta.core.RelatedTopic> |
getUnseenNotifications()
Gets all unread notifications for the logged-in user.
|
void |
notifySubscribers(String title,
String message,
long actionAccountId,
de.deepamehta.core.DeepaMehtaObject item)
Creates new notifications for all users with a direct or indirect (tags) subscription to the given item.
|
void |
subscribeInApp(long itemId)
Create a subscription edge to an item.
|
void |
unsubscribe(long itemId)
Remove subscription (edge) for given user account and item.
|
static final String NOTIFICATION
static final String NOTIFICATION_TITLE
static final String NOTIFICATION_BODY
static final String INVOLVED_ITEM_ID
static final String SUBSCRIBED_ITEM_ID
static final String NOTIFICATION_SEEN
static final String SUBSCRIPTION_EDGE
static final String NOTIFICATION_RECIPIENT_EDGE
static final String SUBSCRIPTION_TYPE
static final String IN_APP_SUBSCRIPTION
static final String EMAIL_SUBSCRIPTION
void subscribeInApp(long itemId)
itemId
- topic-id of user accountvoid unsubscribe(long itemId)
itemId
- topic-id of subscribed itemvoid notifySubscribers(String title, String message, long actionAccountId, de.deepamehta.core.DeepaMehtaObject item)
title
- title of the notificationmessage
- text part of the notificationactionAccountId
- topic-id of user account performing the action which leads to the notification of all othersitem
- item users can have subscribed (either "User Account" or any TopicType with "Tags" as child)List<de.deepamehta.core.RelatedTopic> getSubscriptions()
List<de.deepamehta.core.RelatedTopic> getNotifications()
List<de.deepamehta.core.RelatedTopic> getUnseenNotifications()
Copyright © 2017. All rights reserved.