Class NotificationSubscriptionApiImpl
java.lang.Object
com.cumulocity.sdk.client.messaging.notifications.NotificationSubscriptionApiImpl
- All Implemented Interfaces:
NotificationSubscriptionApi
-
Field Summary
-
Constructor Summary
ConstructorDescriptionNotificationSubscriptionApiImpl
(RestConnector restConnector, UrlProcessor urlProcessor, int pageSize) -
Method Summary
Modifier and TypeMethodDescriptionvoid
delete
(NotificationSubscriptionRepresentation subscription) Delete by object.void
Deletes all subscriptions matching a filter.void
deleteById
(String subscriptionId) Delete by ID.void
deleteBySource
(String source) Deletes all subscriptions to a source in managed object context.void
Deletes 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.
-
Field Details
-
MEDIA_TYPE
-
SUBSCRIPTION_REQUEST_URI
- See Also:
-
-
Constructor Details
-
NotificationSubscriptionApiImpl
public NotificationSubscriptionApiImpl(RestConnector restConnector, UrlProcessor urlProcessor, int pageSize)
-
-
Method Details
-
subscribe
public NotificationSubscriptionRepresentation subscribe(NotificationSubscriptionRepresentation representation) throws SDKException Description copied from interface:NotificationSubscriptionApi
Creates a subscription to a source.- Specified by:
subscribe
in interfaceNotificationSubscriptionApi
- Parameters:
representation
- initial values for subscription- Returns:
- subscription populated with an id
- Throws:
SDKException
-
getSubscriptions
Description copied from interface:NotificationSubscriptionApi
Gets all the subscriptions.- Specified by:
getSubscriptions
in interfaceNotificationSubscriptionApi
- Returns:
- all the subscriptions
- Throws:
SDKException
-
getSubscriptionsByFilter
public NotificationSubscriptionCollection getSubscriptionsByFilter(NotificationSubscriptionFilter filter) throws SDKException Description copied from interface:NotificationSubscriptionApi
Gets all the subscriptions matching a filter. If the filter is null, return all subscriptions.- Specified by:
getSubscriptionsByFilter
in interfaceNotificationSubscriptionApi
- Parameters:
filter
- values to be matched on- Returns:
- subscriptions matching values
- Throws:
SDKException
-
delete
Description copied from interface:NotificationSubscriptionApi
Delete by object.- Specified by:
delete
in interfaceNotificationSubscriptionApi
- Parameters:
subscription
- to delete- Throws:
SDKException
-
deleteById
Description copied from interface:NotificationSubscriptionApi
Delete by ID.- Specified by:
deleteById
in interfaceNotificationSubscriptionApi
- Parameters:
subscriptionId
- of subscription to delete
-
deleteByFilter
Description copied from interface:NotificationSubscriptionApi
Deletes all subscriptions matching a filter.- Specified by:
deleteByFilter
in interfaceNotificationSubscriptionApi
-
deleteBySource
Description copied from interface:NotificationSubscriptionApi
Deletes all subscriptions to a source in managed object context.- Specified by:
deleteBySource
in interfaceNotificationSubscriptionApi
-
deleteTenantSubscriptions
public void deleteTenantSubscriptions()Description copied from interface:NotificationSubscriptionApi
Deletes all subscriptions of the current tenant.- Specified by:
deleteTenantSubscriptions
in interfaceNotificationSubscriptionApi
-