Interface IDataService
Namespace: DotNetNuke.Services.Social.Notifications.Data
Assembly: DotNetNuke.dll
Syntax
public interface IDataService
Methods
| Improve this Doc View SourceAddNotificationTypeAction(Int32, String, String, String, String, Int32)
Creates a new Notification Type Action.
Declaration
int AddNotificationTypeAction(int notificationTypeId, string nameResourceKey, string descriptionResourceKey, string confirmResourceKey, string apiCall, int createdByUserId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | notificationTypeId | Id of the Notification Type to which the Notification Type Action is associated. |
System.String | nameResourceKey | Resource key used to get the localized name of the Notification Type Action. |
System.String | descriptionResourceKey | Resource key used to get the localized description of the Notification Type Action. |
System.String | confirmResourceKey | Resource key used to get the localized confirm text of the Notification Type Action. |
System.String | apiCall | Relative url to the api that has to be call when selection the Notification Type Action. |
System.Int32 | createdByUserId | Id of the user that created the Notification Type Action. |
Returns
Type | Description |
---|---|
System.Int32 | The created Notification Type Action. |
CountNotifications(Int32, Int32)
Gets the amount of Notifications of a user.
Declaration
int CountNotifications(int userId, int portalId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | userId | Id of the user from who count the Notifications. |
System.Int32 | portalId | Portal Id of the user. |
Returns
Type | Description |
---|---|
System.Int32 | The amount of Notifications of a user. |
CreateNotificationType(String, String, Int32, Int32, Int32, Boolean)
Creates a new Notification Type.
Declaration
int CreateNotificationType(string name, string description, int timeToLive, int desktopModuleId, int createUpdateUserId, bool isTask)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Name of the Notification Type. |
System.String | description | Description of the Notification Type. |
System.Int32 | timeToLive | Time to live of the Notification Type. |
System.Int32 | desktopModuleId | Id of the desktop module to which the Notification Type is associated. |
System.Int32 | createUpdateUserId | Id of the user that creates and updates the Notification Type. |
System.Boolean | isTask | Whether this Notification Type is task or not. |
Returns
Type | Description |
---|---|
System.Int32 | Id of the created Notification Type. |
DeleteNotification(Int32)
Delete a Notification.
Declaration
void DeleteNotification(int notificationId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | notificationId | Id of the Notification to delete. |
DeleteNotificationType(Int32)
Deletes an existing Notification Type.
Declaration
void DeleteNotificationType(int notificationTypeId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | notificationTypeId | Id of the Notification Type to delete. |
DeleteNotificationTypeAction(Int32)
Deletes a Notification Type Action.
Declaration
void DeleteNotificationTypeAction(int notificationTypeActionId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | notificationTypeActionId | Id of the Notification Type Action to deleted. |
DeleteUserNotifications(Int32, Int32)
Deletes all the Notifications of a user.
Declaration
int DeleteUserNotifications(int portalID, int userID)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | portalID | Portal Id of the user. |
System.Int32 | userID | User from who delete all the Notifications. |
Returns
Type | Description |
---|---|
System.Int32 | Amount of deleted Notifications. |
GetNotification(Int32)
Gets a Notification.
Declaration
IDataReader GetNotification(int notificationId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | notificationId | Id of the Notification to get. |
Returns
Type | Description |
---|---|
IDataReader | DataReader with the retrieved data. |
GetNotificationByContext(Int32, String)
Gets a Notification.
Declaration
IDataReader GetNotificationByContext(int notificationTypeId, string context)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | notificationTypeId | Id of the Noticationb type of the Notification. |
System.String | context | Context of the Notification to get. |
Returns
Type | Description |
---|---|
IDataReader | DataReader with the retrieved data. |
GetNotifications(Int32, Int32, Int32, Int32)
Gets a paginated list of Notifications.
Declaration
IDataReader GetNotifications(int userId, int portalId, int afterNotificationId, int numberOfRecords)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | userId | Id of the user from get the Notifications. |
System.Int32 | portalId | Portal Id of the user. |
System.Int32 | afterNotificationId | Id of the Notification after which get the list of Notificationss. |
System.Int32 | numberOfRecords | Maximum amount of retrieved Notifications. |
Returns
Type | Description |
---|---|
IDataReader | DataReader with the retrieved data. |
GetNotificationType(Int32)
Gets a Notification Type.
Declaration
IDataReader GetNotificationType(int notificationTypeId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | notificationTypeId | If of the Notification Type to get. |
Returns
Type | Description |
---|---|
IDataReader | IDataReader with the retrieved data. |
GetNotificationTypeAction(Int32)
Gets a Notification Type Action.
Declaration
IDataReader GetNotificationTypeAction(int notificationTypeActionId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | notificationTypeActionId | Id of the Notification Type Action to get. |
Returns
Type | Description |
---|---|
IDataReader | DataReader with the retrieved data. |
GetNotificationTypeActionByName(Int32, String)
Gets a Notification Type Action.
Declaration
IDataReader GetNotificationTypeActionByName(int notificationTypeId, string name)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | notificationTypeId | Id of the Notification Type to which the Notification Type Action is associated. |
System.String | name | Name of the Notification Type Action. |
Returns
Type | Description |
---|---|
IDataReader | DataReader with the retrieved data. |
GetNotificationTypeActions(Int32)
Gets all the Notification Type Action of a Notification Type.
Declaration
IDataReader GetNotificationTypeActions(int notificationTypeId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | notificationTypeId | Id of the Notification Type from which we want to get the associated Notification Type Actions. |
Returns
Type | Description |
---|---|
IDataReader | DataReader with the retrieved data. |
GetNotificationTypeByName(String)
Gets a Notification Type.
Declaration
IDataReader GetNotificationTypeByName(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Name of the Notification Type to get. |
Returns
Type | Description |
---|---|
IDataReader | IDataReader with the retrieved data. |
GetToasts(Int32, Int32)
Get a list of Toast Notifications that have not been delivered yet.
Declaration
IDataReader GetToasts(int userId, int portalId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | userId | Id of the user from who we want to know which Toast Notifications have not been delivered yet. |
System.Int32 | portalId | Portal Id of the user. |
Returns
Type | Description |
---|---|
IDataReader | DataReader with the retrieved data. |
IsToastPending(Int32)
Whether a Toast Notification is pending or not.
Declaration
bool IsToastPending(int notificationId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | notificationId | Id of the Notification to check. |
Returns
Type | Description |
---|---|
System.Boolean | True if the Toast Notification is pending, False if it is not. |
MarkReadyForToast(Int32, Int32)
Mark a Toast ready for sending.
Declaration
void MarkReadyForToast(int notificationId, int userId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | notificationId | The notification Id. |
System.Int32 | userId | The Recipient User Id. |
MarkToastSent(Int32, Int32)
Mark Toast being already sent.
Declaration
void MarkToastSent(int notificationId, int userId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | notificationId | The notification Id. |
System.Int32 | userId | The Recipient User Id. |
SendNotification(Notification, Int32)
Send a notification to its receivers.
Declaration
int SendNotification(Notification notification, int portalId)
Parameters
Type | Name | Description |
---|---|---|
Notification | notification | Notification to send. |
System.Int32 | portalId | Portal id of the Notification. |
Returns
Type | Description |
---|---|
System.Int32 | Id of the new message. |