Interface ISubscriptionService
Encapsulates the operations supported by a subscription service in a social system.
Namespace: EPiServer.Social.ActivityStreams.Core
Assembly: EPiServer.Social.ActivityStreams.Core.dll
Version: 1.5.4Syntax
public interface ISubscriptionService
Methods
Add(Subscription)
Adds a subscription, which registers the subscribing user to receive feed items in their activity stream regarding the activities on the followed resource.
Declaration
Subscription Add(Subscription subscription)
Parameters
| Type | Name | Description |
|---|---|---|
| Subscription | subscription | The subscription information. |
Returns
| Type | Description |
|---|---|
| Subscription | Newly added subscription |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | Thrown when any of the parameters passed in are null. |
| System.ArgumentException | Thrown when any of the parameters passed in are invalid. |
| DuplicateSubscriptionException | Thrown when subscription for the specified target and subscriber combination already exists. |
| SocialException | Thrown when an error occurs while processing the request. |
| SocialAuthenticationException | Thrown when an authentication error occurs while processing the request. |
| MaximumDataSizeExceededException | Thrown when a Social object is submitted, which exceeds the size restrictions of the system. |
| SocialCommunicationException | Thrown when errors occur communicating with the cloud services. |
AddAsync(Subscription)
Asynchronously adds a subscription, which registers the subscribing user to receive feed items in their activity stream regarding the activities on the followed resource.
Declaration
Task<Subscription> AddAsync(Subscription subscription)
Parameters
| Type | Name | Description |
|---|---|---|
| Subscription | subscription | The subscription information. |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<Subscription> | Newly added subscription |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | Thrown when any of the parameters passed in are null. |
| System.ArgumentException | Thrown when any of the parameters passed in are invalid. |
| DuplicateSubscriptionException | Thrown when subscription for the specified target and subscriber combination already exists. |
| SocialException | Thrown when an error occurs while processing the request. |
| SocialAuthenticationException | Thrown when an authentication error occurs while processing the request. |
| MaximumDataSizeExceededException | Thrown when a Social object is submitted, which exceeds the size restrictions of the system. |
| SocialCommunicationException | Thrown when errors occur communicating with the cloud services. |
Get(Criteria<SubscriptionFilter>)
Get a page of existing subscriptions by the specified criteria.
Declaration
ResultPage<Subscription> Get(Criteria<SubscriptionFilter> criteria)
Parameters
| Type | Name | Description |
|---|---|---|
| Criteria<SubscriptionFilter> | criteria | The criteria for retrieving subscriptions. |
Returns
| Type | Description |
|---|---|
| ResultPage<Subscription> | A page of existing subscriptions. |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | Thrown when any of the parameters passed in are null. |
| System.ArgumentException | Thrown when any of the parameters passed in are invalid. |
| InvalidPageInfoException | Thrown when the page info is invalid. |
| SocialException | Thrown when an error occurs while processing the request. |
| SocialAuthenticationException | Thrown when an authentication error occurs while processing the request. |
| MaximumDataSizeExceededException | Thrown when a Social object is submitted, which exceeds the size restrictions of the system. |
| SocialCommunicationException | Thrown when errors occur communicating with the cloud services. |
GetAsync(Criteria<SubscriptionFilter>)
Asynchronously get a page of existing subscriptions by the specified criteria.
Declaration
Task<ResultPage<Subscription>> GetAsync(Criteria<SubscriptionFilter> criteria)
Parameters
| Type | Name | Description |
|---|---|---|
| Criteria<SubscriptionFilter> | criteria | The criteria for retrieving subscriptions. |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<ResultPage<Subscription>> | A page of existing subscriptions. |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | Thrown when any of the parameters passed in are null. |
| System.ArgumentException | Thrown when any of the parameters passed in are invalid. |
| InvalidPageInfoException | Thrown when the page info is invalid. |
| SocialException | Thrown when an error occurs while processing the request. |
| SocialAuthenticationException | Thrown when an authentication error occurs while processing the request. |
| MaximumDataSizeExceededException | Thrown when a Social object is submitted, which exceeds the size restrictions of the system. |
| SocialCommunicationException | Thrown when errors occur communicating with the cloud services. |
Remove(SubscriptionId)
Removes subscriptions from the social system using the specified subscription Id .
Declaration
void Remove(SubscriptionId id)
Parameters
| Type | Name | Description |
|---|---|---|
| SubscriptionId | id | Id of subscription to remove. |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | Thrown when the subscription id passed in is null. |
| System.ArgumentException | Thrown when the subscription id passed in is empty. |
| SocialException | Thrown when an error occurs while processing the request. |
| SocialAuthenticationException | Thrown when an authentication error occurs while processing the request. |
| MaximumDataSizeExceededException | Thrown when a Social object is submitted, which exceeds the size restrictions of the system. |
| SocialCommunicationException | Thrown when errors occur communicating with the cloud services. |
Remove(Criteria<SubscriptionFilter>)
Removes subscriptions from the social system using the specified criteria.
Declaration
void Remove(Criteria<SubscriptionFilter> criteria)
Parameters
| Type | Name | Description |
|---|---|---|
| Criteria<SubscriptionFilter> | criteria | The criteria for removing subscriptions. |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | Thrown when any of the parameters passed in are null. |
| System.ArgumentException | Thrown when any of the parameters passed in are invalid. |
| InvalidPageInfoException | Thrown when the page info is invalid. |
| SocialException | Thrown when an error occurs while processing the request. |
| SocialAuthenticationException | Thrown when an authentication error occurs while processing the request. |
| MaximumDataSizeExceededException | Thrown when a Social object is submitted, which exceeds the size restrictions of the system. |
| SocialCommunicationException | Thrown when errors occur communicating with the cloud services. |
RemoveAsync(SubscriptionId)
Asynchronously removes subscriptions from the social system using the specified subscription Id .
Declaration
Task RemoveAsync(SubscriptionId id)
Parameters
| Type | Name | Description |
|---|---|---|
| SubscriptionId | id | Id of subscription to remove. |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | Thrown when the subscription id passed in is null. |
| System.ArgumentException | Thrown when the subscription id passed in is empty. |
| SocialException | Thrown when an error occurs while processing the request. |
| SocialAuthenticationException | Thrown when an authentication error occurs while processing the request. |
| MaximumDataSizeExceededException | Thrown when a Social object is submitted, which exceeds the size restrictions of the system. |
| SocialCommunicationException | Thrown when errors occur communicating with the cloud services. |
RemoveAsync(Criteria<SubscriptionFilter>)
Asynchronously removes subscriptions from the social system using the specified criteria.
Declaration
Task RemoveAsync(Criteria<SubscriptionFilter> criteria)
Parameters
| Type | Name | Description |
|---|---|---|
| Criteria<SubscriptionFilter> | criteria | The criteria for removing subscriptions. |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException | Thrown when any of the parameters passed in are null. |
| System.ArgumentException | Thrown when any of the parameters passed in are invalid. |
| InvalidPageInfoException | Thrown when the page info is invalid. |
| SocialException | Thrown when an error occurs while processing the request. |
| SocialAuthenticationException | Thrown when an authentication error occurs while processing the request. |
| MaximumDataSizeExceededException | Thrown when a Social object is submitted, which exceeds the size restrictions of the system. |
| SocialCommunicationException | Thrown when errors occur communicating with the cloud services. |