org.outerj.daisy.emailnotifier
Interface EmailSubscriptionManager


public interface EmailSubscriptionManager


Method Summary
 void addDocumentSubscription(long userId, org.outerj.daisy.repository.VariantKey variantKey)
           
 void addDocumentSubscription(org.outerj.daisy.repository.VariantKey variantKey)
           
 void deleteAllSubscriptionsForCollection(long collectionId)
           
 void deleteAllSubscriptionsForDocument(long documentId)
          Deletes subscriptions for the specified document for all users (useful if eg the document variant has been deleted).
 void deleteAllSubscriptionsForDocumentVariant(org.outerj.daisy.repository.VariantKey variantKey)
          Deletes subscriptions for the specified document variant for all users (useful if eg the document variant has been deleted).
 void deleteDocumentSubscription(long userId, org.outerj.daisy.repository.VariantKey variantKey)
           
 void deleteDocumentSubscription(org.outerj.daisy.repository.VariantKey variantKey)
           
 void deleteSubscription()
          Removes the subscription for the current user.
 void deleteSubscription(long userId)
          Deletes the subscription of another user.
 Subscribers getAllAclEventSubscribers()
           
 Subscribers getAllCollectionEventSubscribers()
           
 Subscribers getAllCommentEventSubscribers(long documentId, long branchId, long languageId, long[] collections)
           
 Subscribers getAllDocumentEventSubscribers(long documentId, long branchId, long languageId, long[] collections)
          Returns the users subscribed to changes for documents.
 Subscribers getAllSchemaEventSubscribers()
           
 Subscribers getAllUserEventSubscribers()
           
 Subscription getSubscription()
          Gets subscription information for the current user.
 Subscription getSubscription(long userId)
          Retrieves the subscription of another user.
 Subscriptions getSubscriptions()
          Get all available subscriptions.
 boolean isSubsribed(long userId, org.outerj.daisy.repository.VariantKey variantKey)
           
 boolean isSubsribed(org.outerj.daisy.repository.VariantKey variantKey)
          Checks if the user is subscribed to the specified document variant.
 

Method Detail

getSubscription

Subscription getSubscription()
                             throws org.outerj.daisy.repository.RepositoryException
Gets subscription information for the current user. If the user doesn't have a subscription yet, this also returns a Subscription object.

Throws:
org.outerj.daisy.repository.RepositoryException

getSubscription

Subscription getSubscription(long userId)
                             throws org.outerj.daisy.repository.RepositoryException
Retrieves the subscription of another user. Only users acting as administrator can do this.

Throws:
org.outerj.daisy.repository.RepositoryException

deleteSubscription

void deleteSubscription()
                        throws org.outerj.daisy.repository.RepositoryException
Removes the subscription for the current user. If the user does not have a subscription, this method should silently return.

Throws:
org.outerj.daisy.repository.RepositoryException

deleteSubscription

void deleteSubscription(long userId)
                        throws org.outerj.daisy.repository.RepositoryException
Deletes the subscription of another user. Only users acting as administrator can do this. If the user does not have a subscription, this method should silently return.

Throws:
org.outerj.daisy.repository.RepositoryException

getSubscriptions

Subscriptions getSubscriptions()
                               throws org.outerj.daisy.repository.RepositoryException
Get all available subscriptions. Only users acting as administrator can do this.

Throws:
org.outerj.daisy.repository.RepositoryException

addDocumentSubscription

void addDocumentSubscription(org.outerj.daisy.repository.VariantKey variantKey)
                             throws org.outerj.daisy.repository.RepositoryException
Parameters:
variantKey - documentId, branchId and languageId components can be -1 to indicate "any document/branch/language".
Throws:
org.outerj.daisy.repository.RepositoryException

addDocumentSubscription

void addDocumentSubscription(long userId,
                             org.outerj.daisy.repository.VariantKey variantKey)
                             throws org.outerj.daisy.repository.RepositoryException
Throws:
org.outerj.daisy.repository.RepositoryException

isSubsribed

boolean isSubsribed(org.outerj.daisy.repository.VariantKey variantKey)
                    throws org.outerj.daisy.repository.RepositoryException
Checks if the user is subscribed to the specified document variant. This will only return true if an exact match for the subscription is found, thus -1 for branchId and/or languageId doesn't work as a wildcard.

Throws:
org.outerj.daisy.repository.RepositoryException

isSubsribed

boolean isSubsribed(long userId,
                    org.outerj.daisy.repository.VariantKey variantKey)
                    throws org.outerj.daisy.repository.RepositoryException
Throws:
org.outerj.daisy.repository.RepositoryException

deleteDocumentSubscription

void deleteDocumentSubscription(org.outerj.daisy.repository.VariantKey variantKey)
                                throws org.outerj.daisy.repository.RepositoryException
Throws:
org.outerj.daisy.repository.RepositoryException

deleteDocumentSubscription

void deleteDocumentSubscription(long userId,
                                org.outerj.daisy.repository.VariantKey variantKey)
                                throws org.outerj.daisy.repository.RepositoryException
Throws:
org.outerj.daisy.repository.RepositoryException

deleteAllSubscriptionsForDocumentVariant

void deleteAllSubscriptionsForDocumentVariant(org.outerj.daisy.repository.VariantKey variantKey)
                                              throws org.outerj.daisy.repository.RepositoryException
Deletes subscriptions for the specified document variant for all users (useful if eg the document variant has been deleted). Can only be done by users acting in the Administrator role.

Throws:
org.outerj.daisy.repository.RepositoryException

deleteAllSubscriptionsForDocument

void deleteAllSubscriptionsForDocument(long documentId)
                                       throws org.outerj.daisy.repository.RepositoryException
Deletes subscriptions for the specified document for all users (useful if eg the document variant has been deleted). Can only be done by users acting in the Administrator role.

Throws:
org.outerj.daisy.repository.RepositoryException

deleteAllSubscriptionsForCollection

void deleteAllSubscriptionsForCollection(long collectionId)
                                         throws org.outerj.daisy.repository.RepositoryException
Throws:
org.outerj.daisy.repository.RepositoryException

getAllDocumentEventSubscribers

Subscribers getAllDocumentEventSubscribers(long documentId,
                                           long branchId,
                                           long languageId,
                                           long[] collections)
                                           throws org.outerj.daisy.repository.RepositoryException
Returns the users subscribed to changes for documents.

Parameters:
documentId - the id of the document
branchId - can be -1 to specify 'whatever branch the subscription applies to'
languageId - can be -1 to specify 'whatever language the subscription applies to'
collections - the collections the document belongs to.
Throws:
org.outerj.daisy.repository.RepositoryException

getAllUserEventSubscribers

Subscribers getAllUserEventSubscribers()
                                       throws org.outerj.daisy.repository.RepositoryException
Throws:
org.outerj.daisy.repository.RepositoryException

getAllCollectionEventSubscribers

Subscribers getAllCollectionEventSubscribers()
                                             throws org.outerj.daisy.repository.RepositoryException
Throws:
org.outerj.daisy.repository.RepositoryException

getAllSchemaEventSubscribers

Subscribers getAllSchemaEventSubscribers()
                                         throws org.outerj.daisy.repository.RepositoryException
Throws:
org.outerj.daisy.repository.RepositoryException

getAllAclEventSubscribers

Subscribers getAllAclEventSubscribers()
                                      throws org.outerj.daisy.repository.RepositoryException
Throws:
org.outerj.daisy.repository.RepositoryException

getAllCommentEventSubscribers

Subscribers getAllCommentEventSubscribers(long documentId,
                                          long branchId,
                                          long languageId,
                                          long[] collections)
                                          throws org.outerj.daisy.repository.RepositoryException
Throws:
org.outerj.daisy.repository.RepositoryException


Copyright © -2012 . All Rights Reserved.