com.sas.hls.messaging.subscription
Interface SubscriptionService


public interface SubscriptionService

Service that provides a way to create and retrieve Subscriptions for subscribable events in the repository.


Method Summary
 Subscription createSubscription(String path, SubscribableEvent event, Principal principal, boolean cascade)
          Create a subscription to the specified event on the object represented by the specified path, for the given principal.
 Set<Subscription> createSubscriptions(String path, SubscribableEvent event, Set<Principal> principals, boolean cascade)
          Create a subscription to the specified event on the object represented by the specified path, for the given principals.
 Set<SubscribableEvent> getSubscribableEvents(String objectType)
          Get the subscribable events available for the specified object type.
 Set<Subscription> getSubscriptionsByPathAndEvent(String path, SubscribableEvent event)
          Get the subscriptions for the specified path and specified event.
 Set<Subscription> getSubscriptionsByPrincipal(Principal principal)
          Get the subscriptions for the specified principal.
 

Method Detail

createSubscription

Subscription createSubscription(String path,
                                SubscribableEvent event,
                                Principal principal,
                                boolean cascade)
                                throws RepositoryResourceNotFoundException,
                                       SubscriptionExistsException
Create a subscription to the specified event on the object represented by the specified path, for the given principal. If the specified event supports cascade, you can set the cascade option to true.

Parameters:
path -
event -
principal -
cascade -
Returns:
Subscription created
Throws:
RepositoryResourceNotFoundException
SubscriptionExistsException

createSubscriptions

Set<Subscription> createSubscriptions(String path,
                                      SubscribableEvent event,
                                      Set<Principal> principals,
                                      boolean cascade)
                                      throws RepositoryResourceNotFoundException,
                                             SubscriptionExistsException
Create a subscription to the specified event on the object represented by the specified path, for the given principals. If the specified event supports cascade, you can set the cascade option to true.

Parameters:
path -
event -
principals -
cascade -
Returns:
A set of created Subscriptions.
Throws:
RepositoryResourceNotFoundException
SubscriptionExistsException

getSubscribableEvents

Set<SubscribableEvent> getSubscribableEvents(String objectType)
Get the subscribable events available for the specified object type. Available types can be found in TypeConstants.

Parameters:
objectType -
Returns:
SubscribableEvents for the specified object type

getSubscriptionsByPrincipal

Set<Subscription> getSubscriptionsByPrincipal(Principal principal)
Get the subscriptions for the specified principal. This will include explicit and inherited subscriptions.

Parameters:
principal -
Returns:
Subscriptions for the specified principal

getSubscriptionsByPathAndEvent

Set<Subscription> getSubscriptionsByPathAndEvent(String path,
                                                 SubscribableEvent event)
                                                 throws RepositoryResourceNotFoundException
Get the subscriptions for the specified path and specified event. This will include explicit and inherited subscriptions.

Parameters:
path -
event -
Returns:
Subscriptions for the specified path and event
Throws:
RepositoryResourceNotFoundException


Copyright (c) 2013, SAS Institute Inc., Cary, NC, USA