Interface ISubscriptionController
This controller is responsible to manage the user subscriptions.
Namespace: DotNetNuke.Services.Social.Subscriptions
Assembly: DotNetNuke.dll
Syntax
public interface ISubscriptionController
Methods
| Improve this Doc View SourceAddSubscription(Subscription)
Adds a new Subscription. If the operation succeed the SubscriptionId property of the Subscription entity will be filled up.
Declaration
void AddSubscription(Subscription subscription)
Parameters
Type | Name | Description |
---|---|---|
Subscription | subscription | Subscription. |
DeleteSubscription(Subscription)
Deletes a Subscription.
Declaration
void DeleteSubscription(Subscription subscription)
Parameters
Type | Name | Description |
---|---|---|
Subscription | subscription | Subscription. |
DeleteSubscriptionsByObjectKey(Int32, String)
Deletes all subscriptions matching the specified object key.
Declaration
void DeleteSubscriptionsByObjectKey(int portalId, string objectKey)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | portalId | Portal Id. |
System.String | objectKey | Object Key. |
GetContentSubscriptions(Int32, Int32, String)
Returns the Content Subscriptions.
Declaration
IEnumerable<Subscription> GetContentSubscriptions(int portalId, int subscriptionTypeId, string objectKey)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | portalId | Portal Id. |
System.Int32 | subscriptionTypeId | Subscription Type Id. |
System.String | objectKey | Object Key. |
Returns
Type | Description |
---|---|
IEnumerable<Subscription> | Collection of subscriptions. |
GetUserSubscriptions(UserInfo, Int32, Int32)
Returns the User Subscriptions.
Declaration
IEnumerable<Subscription> GetUserSubscriptions(UserInfo user, int portalId, int subscriptionTypeId = null)
Parameters
Type | Name | Description |
---|---|---|
UserInfo | user | User Info. |
System.Int32 | portalId | Portal Id. |
System.Int32 | subscriptionTypeId | Subscription Type Id. |
Returns
Type | Description |
---|---|
IEnumerable<Subscription> | Collection of subscriptions. |
IsSubscribed(Subscription)
Returns true if a user is subscribed to a Content.
Declaration
bool IsSubscribed(Subscription subscription)
Parameters
Type | Name | Description |
---|---|---|
Subscription | subscription | Subscription. |
Returns
Type | Description |
---|---|
System.Boolean | True if the user is subscribed to the content, false otherwise. |
UpdateSubscriptionDescription(String, Int32, String)
Updates a Subscription Description.
Declaration
int UpdateSubscriptionDescription(string objectKey, int portalId, string newDescription)
Parameters
Type | Name | Description |
---|---|---|
System.String | objectKey | Subscription Object Key. |
System.Int32 | portalId | Portal Id. |
System.String | newDescription | New Subscription Description. |
Returns
Type | Description |
---|---|
System.Int32 | The number of subscription descriptions that have been updated. |