|
Oracle Fusion Middleware Java API Reference for Oracle WebCenter Portal 11g Release 1 (11.1.1.9.0) E15995-08 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface SubscriptionManager
Interface for creating and managing user subscriptions.
Based on these subscriptions, the notification service generates appropriate notifications for the activities occurring in the application. Notifications Service integrates with WebCenter Activity Streaming Service to generate notifications for services that contains activities supporting notifications.
Subscriptions can be created or enabled at application level, scope level and object level to control to receive notifications at the desired granularity.
In general, subscriptions can be created only for services and resources that support the specific level of subscriptions.
Subscription
, SubscriptionPreference
, NotificationServiceFactory
Method Summary | |
---|---|
void |
addSubcriptionPreference(java.lang.String serviceId) Enables the application level subscription preference for the current user for the given service. |
java.util.List<SubscriptionPreference> |
getSubscriptionPreferences() Returns the application level subscription preferences for the current user. |
java.util.List<SubscriptionPreference> |
getSubscriptionPreferences(java.lang.String scopeGuid) Returns the scope level subscription preferences for the current user. |
java.util.List<Subscription> |
getSubscriptions(SortOption sortOption, FilterOption filterOption, int startIndex, int fetchSize) Returns the list of active subscriptions for the current user based on the specified criteria. |
boolean |
isSubscribed(java.lang.String scopeGuid, java.lang.String serviceId, java.lang.String objectId) Checks if the current user has subscribed to the specific resource in the given scope. |
void |
removeSubcriptionPreference(java.lang.String serviceId) Disables the application level subscription preference for the current user for the given service, if exists. |
Subscription |
subscribe(java.lang.String scopeGuid, java.lang.String serviceId) Creates a scope level subscription for the current user for the specified service in the given scope. |
Subscription |
subscribe(java.lang.String scopeGuid, java.lang.String serviceId, java.lang.String objectType, java.lang.String objectId, java.lang.String objectName) Subscribes the current user for the given object. |
void |
unsubscribe(java.lang.String scopeGuid, java.lang.String serviceId) Removes the scope level subscription for the current user for the specified service in the given scope, if exists. |
void |
unsubscribe(java.lang.String scopeGuid, java.lang.String serviceId, java.lang.String objectId) Unsubscribes the current user from the given object. |
Method Detail |
---|
boolean isSubscribed(java.lang.String scopeGuid, java.lang.String serviceId, java.lang.String objectId) throws NotificationServiceException
scopeGuid
- - the guid of the scope in which to check subscription.serviceId
- - the service identifier for the resource.objectId
- - the unique ID of the object to check the subscription for.NotificationServiceException
- - if the notification servie encounters any error.java.util.List<SubscriptionPreference> getSubscriptionPreferences() throws NotificationServiceException
SubscriptionPreference
for the current user for services that expose application level subscriptions. This method is also useful in retrieving the list of services that support application level subscriptions.SubscriptionPreference
for the current user.NotificationServiceException
- - if the notification servie encounters any error.java.util.List<SubscriptionPreference> getSubscriptionPreferences(java.lang.String scopeGuid) throws NotificationServiceException
SubscriptionPreference
for the current user for services that expose application level subscriptions and are provisioned in a given scope.scopeGuid
- - the GUID of the scope for which to return the user's subscription preferences.SubscriptionPreference
for the current user in the given scope.NotificationServiceException
- - if the notification servie encounters any error.void addSubcriptionPreference(java.lang.String serviceId) throws NotificationServiceException
serviceId
- - the sevrice identifier for which the current user's subscription will be enabled.NotificationServiceException
- - if the notification service encounters any exception or if the specified service doesn't support application level subscriptions.void removeSubcriptionPreference(java.lang.String serviceId) throws NotificationServiceException
serviceId
- - the service identifier for which the current user's subscription will be disabled.NotificationServiceException
- - if the notification servie encounters any error.java.util.List<Subscription> getSubscriptions(SortOption sortOption, FilterOption filterOption, int startIndex, int fetchSize) throws NotificationServiceException
The list returned does not contain user's application level subscription preferences. It returns all the scope level and object level subscriptions for the current users.
filterOption
- - defines the filter criteria to fetch the subscriptions for the current user.sortOption
- - the sort criteria for the list of returned subscriptions.startIndex
- - the starting index for fetching the results.fetchSize
- - the number of rows to be returned in the single fetch.Subscription
objects for the current user matching the criteria specified.NotificationServiceException
- - if the notification servie encounters any error.Subscription subscribe(java.lang.String scopeGuid, java.lang.String serviceId) throws NotificationServiceException
scopeGuid
- - GUID of the scope in which to create the subscription.serviceId
- - the service identifier for which to create the subscription.Subscription
object.NotificationServiceException
- - if the notification service encounters any exception.Subscription subscribe(java.lang.String scopeGuid, java.lang.String serviceId, java.lang.String objectType, java.lang.String objectId, java.lang.String objectName) throws NotificationServiceException
scopeGuid
- - GUID of the scope in which the object exists.serviceId
- - indentifier of the service containing the object.objectType
- - the type of the object to be subscribed to.objectId
- - the unique identifier of the object as generated by the service.objectName
- - the name of the object.Subscription
object.NotificationServiceException
- - if the notification service encounters any exception.void unsubscribe(java.lang.String scopeGuid, java.lang.String serviceId) throws NotificationServiceException
scopeGuid
- - GUID of the scope in which to create the subscription.serviceId
- - the service identifier for which to delete the subscription.NotificationServiceException
- - if the notification service encounters any exception.void unsubscribe(java.lang.String scopeGuid, java.lang.String serviceId, java.lang.String objectId) throws NotificationServiceException
scopeGuid
- - GUID of the scope in which the object exists.serviceId
- - indentifier of the service containing the object.objectId
- - the unique identifier of the object as generated by the service.NotificationServiceException
- - if the notification service encounters any exception.
|
Oracle Fusion Middleware Java API Reference for Oracle WebCenter Portal 11g Release 1 (11.1.1.9.0) E15995-08 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |