Interface NotificationSubscriptionApi
- All Known Implementing Classes:
NotificationSubscriptionApiImpl
public interface NotificationSubscriptionApi
Manage notification subscriptions
-
Method Summary
Modifier and TypeMethodDescriptionvoiddelete(NotificationSubscriptionRepresentation subscription) Delete by object.voidDeprecated.voiddeleteById(String subscriptionId) Delete by ID.voiddeleteBySource(String source) Deletes all subscriptions to a source in managed object context.voidDeletes all subscriptions of the current tenant.Gets all the subscriptions.Gets all the subscriptions matching a filter.subscribe(NotificationSubscriptionRepresentation representation) Creates a subscription to a source.
-
Method Details
-
subscribe
NotificationSubscriptionRepresentation subscribe(NotificationSubscriptionRepresentation representation) throws SDKException Creates a subscription to a source.- Parameters:
representation- initial values for subscription- Returns:
- subscription populated with an id
- Throws:
SDKException
-
getSubscriptions
Gets all the subscriptions.- Returns:
- all the subscriptions
- Throws:
SDKException
-
getSubscriptionsByFilter
NotificationSubscriptionCollection getSubscriptionsByFilter(NotificationSubscriptionFilter filter) throws SDKException Gets all the subscriptions matching a filter. If the filter is null, return all subscriptions.- Parameters:
filter- values to be matched on- Returns:
- subscriptions matching values
- Throws:
SDKException
-
delete
Delete by object.- Parameters:
subscription- to delete- Throws:
SDKException
-
deleteById
Delete by ID.- Parameters:
subscriptionId- of subscription to delete- Throws:
SDKException
-
deleteByFilter
Deprecated.This method is deprecated and will throw an exception if the filter includessubscription,typeFilteror both. Usedelete(NotificationSubscriptionRepresentation),deleteById(String), ordeleteBySource(String)instead.Deletes all subscriptions matching a given filter.- Parameters:
filter- the filter criteria for deleting matching subscriptions- Throws:
SDKException- if the request fails or if disallowed filters are present
-
deleteBySource
Deletes all subscriptions to a source in managed object context.- Parameters:
source-
-
deleteTenantSubscriptions
void deleteTenantSubscriptions()Deletes all subscriptions of the current tenant.
-
subscription,typeFilteror both.