Class DataService
Implements
Inherited Members
Namespace: DotNetNuke.Services.Social.Subscriptions.Data
Assembly: DotNetNuke.dll
Syntax
public class DataService : ServiceLocator<IDataService, DataService>, IDataService
Constructors
| Improve this Doc View SourceDataService()
Initializes a new instance of the DataService class.
Declaration
public DataService()
Methods
| Improve this Doc View SourceAddSubscription(Int32, Int32, Int32, String, String, Int32, Int32, String)
Adds a Subscription.
Declaration
public 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
public 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
public 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
public 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
public 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. |
GetFactory()
Gets the service locator factory.
Declaration
protected override Func<IDataService> GetFactory()
Returns
Type | Description |
---|---|
Func<IDataService> | A factory function. |
Overrides
GetSubscriptionsByContent(Int32, Int32, String)
Returns the Content Subscriptions.
Declaration
public 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
public 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
public 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
public 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
public 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. |