Interface IDataService
Namespace: DotNetNuke.Services.Social.Subscriptions.Data
Assembly: DotNetNuke.dll
Syntax
public interface IDataService
Methods
| Improve this Doc View SourceAddSubscription(Int32, Int32, Int32, String, String, Int32, Int32, String)
Adds a Subscription.
Declaration
int AddSubscription(int userId, int portalId, int subscriptionTypeId, string objectKey, string description, int moduleId, int tabId, string objectData)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | userId | User Id. |
System.Int32 | portalId | Portal id. |
System.Int32 | subscriptionTypeId | Subscription Type Id. |
System.String | objectKey | Object Key. |
System.String | description | Description. |
System.Int32 | moduleId | Module Id. |
System.Int32 | tabId | Tab Id. |
System.String | objectData | Object Data. |
Returns
Type | Description |
---|---|
System.Int32 | Subscription Id. |
AddSubscriptionType(String, String, Int32)
Adds a Subscription Type.
Declaration
int AddSubscriptionType(string subscriptionName, string friendlyName, int desktopModuleId)
Parameters
Type | Name | Description |
---|---|---|
System.String | subscriptionName | Subscription Type Name. |
System.String | friendlyName | Subscription Type FriendlyName. |
System.Int32 | desktopModuleId | DesktopModule Id. |
Returns
Type | Description |
---|---|
System.Int32 | Subscription Type Id. |
DeleteSubscription(Int32)
Deletes a Subscription.
Declaration
bool DeleteSubscription(int subscriptionId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | subscriptionId | Subscription Id. |
Returns
Type | Description |
---|---|
System.Boolean | True if the subscription has been deleted, false otherwise. |
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. |
DeleteSubscriptionType(Int32)
Deletes a Subscription Type.
Declaration
bool DeleteSubscriptionType(int subscriptionTypeId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | subscriptionTypeId | Subscription Type Id. |
Returns
Type | Description |
---|---|
System.Boolean | True if the subscription type has been deleted, false otherwise. |
GetSubscriptionsByContent(Int32, Int32, String)
Returns the Content Subscriptions.
Declaration
IDataReader GetSubscriptionsByContent(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 |
---|---|
IDataReader | Collection of Subscriptions. |
GetSubscriptionsByUser(Int32, Int32, Int32)
Returns the User Subscriptions.
Declaration
IDataReader GetSubscriptionsByUser(int portalId, int userId, int subscriptionTypeId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | portalId | Portal Id. |
System.Int32 | userId | User Id. |
System.Int32 | subscriptionTypeId | Subscription Type Id. |
Returns
Type | Description |
---|---|
IDataReader | Collection of Subscriptions. |
GetSubscriptionTypes()
Returns all the Subscription Types.
Declaration
IDataReader GetSubscriptionTypes()
Returns
Type | Description |
---|---|
IDataReader | Subscription types. |
IsSubscribed(Int32, Int32, Int32, String, Int32, Int32)
Checks if the user is subscribed to an ObjectKey.
Declaration
IDataReader IsSubscribed(int portalId, int userId, int subscriptionTypeId, string objectKey, int moduleId, int tabId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | portalId | Portal Id. |
System.Int32 | userId | User Id. |
System.Int32 | subscriptionTypeId | Subscription Type. |
System.String | objectKey | Object Key. |
System.Int32 | moduleId | Module Id. |
System.Int32 | tabId | Tab Id. |
Returns
Type | Description |
---|---|
IDataReader | Subscription. |
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 | Subscription Portal Id. |
System.String | newDescription | New Subscription Description. |
Returns
Type | Description |
---|---|
System.Int32 | The number of subscription descriptions that have been updated. |