public interface SubscriptionDao
Subscription getSubscription(Integer subId)
List<Subscription> getSubscriptionList()
List<Subscription> getSubscriptionListBySubscriber(Subscriber subscriber)
subscriber
- either a user or a group.List<Subscription> getSubscriptionListBySubscriberAndProject(Subscriber subscriber, Integer projectId)
List<Subscription> getSubscriptionListBySubscriber(Subscriber subscriber, boolean includeReviewSubscription)
subscriber
- either a user or a group.includeReviewSubscription
- whether to include the review item subscriptions.List<Subscription> getSubscribersSubscribedTo(Map<Integer,Integer> scopeMap, boolean directSubscriptionsOnly)
List<Integer> getSubscriptionIdsForScopeAndRef(Integer scopeId, Integer refId)
boolean isSubscribedTo(Subscriber subscriber, Integer scope, Integer refId, boolean directSubscriptionsOnly)
boolean isSubscribedTo(Subscriber subscriber, Integer scope, Integer refId, Integer contextScopeId, Integer contextId, boolean directSubscriptionsOnly)
boolean isSubscribedTo(Subscriber subscriber, Integer projectId, Integer scope, Integer refId)
List<User_JobSchedule> getUserJobSchedulesByJob(Integer jobId)
List<User_JobSchedule> getUserJobSchedulesByUser(Integer userId)
void saveSubscription(Subscription sub)
void deleteSubscription(Subscription sub)
List<Subscription> getSubscriptionBasedOnMeta(Subscriber subscriber, Integer scope, Integer refId, boolean directSubscriptionsOnly)
List<Subscription> getSubscriptionBasedOnMeta(Subscriber subscriber, Integer scope, Integer refId, Integer contextScope, Integer contextId, boolean directSubscriptionsOnly)
List<User> getSubscribedUsersToNotify(Integer docId, Integer parentDocId, Integer projectId)
List<Role> getSubscribedGroupsToNotify(Integer docId, Integer parentDocId, Integer docProjectId)
List<User> getDirectlySubscribedUsers(Integer scopeId, Integer refId, Boolean selfSubscribed)
List<Integer> getSubscribedRevisionItemIds(Integer revisionId, Integer userId)
Revision_Item
s that the given user is following for the given revision. Note that
subscriptions are based on current Document
ids and are scoped at the Review
level, so this dao
method traverses the object graph (in an efficient way) to obtain revision items that point to origin documents
that are what the Subscription
ref ids point to, in the review context scope for the review associated
with the given revision id, and only for subscriptions associated with the given user id.revisionId
- The id of a Revision
userId
- The id of a User
Revision_Item
ids that this User
is following for the given Revision
List<User> getUsersSubscribedToRevisionItem(Integer revisionItemId)
List<Subscription> getSubscriptionsForItemsInContext(Integer contextScopeId, Integer contextId, Integer userId)
List<Subscription> getSubscriptionsForScopeIds(Integer scope, List<Integer> ids)
List<Subscription> getSubscriptionsForScopeIdsAndSubscriber(Integer scope, List<Integer> ids, Subscriber subscriber, Integer contextScope, Integer contextId)
List<Integer> getSubscriptionIdsBySubscribers(List<Integer> roleIds, List<Integer> userIds, boolean isUser)
void activateAllReviewSubscriptions(Integer reviewId, Integer userId)
Copyright (c) 2013-2014 Jama Software, Inc. All Rights Reserved.