org.deepamehta.plugins.subscriptions.service
Interface SubscriptionService

Show UML class diagram
All Superinterfaces:
PluginService
All Known Implementing Classes:
SubscriptionsPlugin

public interface SubscriptionService
extends PluginService


Method Summary
 void createNotifications(String title, String message, long actionAccountId, DeepaMehtaObject item)
          Creates new notifications for all users with a direct or indirect (tags) subscription to the given item.
 ResultList<RelatedTopic> getAllNotifications()
          Gets all notifications for the logged-in user.
 ArrayList<RelatedTopic> getAllUnseenNotifications()
          Gets all unread notifications for the logged-in user.
 ResultList<RelatedTopic> getSubscriptions()
          Gets all subscribed topics for the logged-in user.
 void subscribe(long accountId, long itemId, ClientState clientState)
          Create a subscription edge for useraccount to item.
 void unsubscribe(long accountId, long itemId)
          Remove subscription (edge) for given user account and item.
 

Method Detail

subscribe

void subscribe(long accountId,
               long itemId,
               ClientState clientState)
Create a subscription edge for useraccount to item.

Parameters:
accountId - topic-id of user account
itemId - topic-id of user account

unsubscribe

void unsubscribe(long accountId,
                 long itemId)
Remove subscription (edge) for given user account and item.

Parameters:
userAccount - topic-id of user account
item - topic-id of subscribed item

createNotifications

void createNotifications(String title,
                         String message,
                         long actionAccountId,
                         DeepaMehtaObject item)
Creates new notifications for all users with a direct or indirect (tags) subscription to the given item. Notifications are created if the (given) item is either of TopicType "User Account" or of any other TopicType which has the TopicType=Tag as a child-type. In the latter case, all subscribers of the _Tag_ are notified.

Parameters:
title - title of the notification
message - text part of the notification
actionAccountId - topic-id of user account performing the action which leads to the notification of all others
item - item users can have subscribed (either "User Account" or any TopicType with "Tags" as child)

getSubscriptions

ResultList<RelatedTopic> getSubscriptions()
Gets all subscribed topics for the logged-in user.


getAllNotifications

ResultList<RelatedTopic> getAllNotifications()
Gets all notifications for the logged-in user.


getAllUnseenNotifications

ArrayList<RelatedTopic> getAllUnseenNotifications()
Gets all unread notifications for the logged-in user.



Copyright © 2014. All Rights Reserved.