• Share
    • Twitter
    • LinkedIn
    • Facebook
    • Email
  • Feedback
  • Improve this Doc

Interface IDataService

Namespace: DotNetNuke.Services.Social.Notifications.Data
Assembly: DotNetNuke.dll
Syntax
public interface IDataService

Methods

| Improve this Doc View Source

AddNotificationTypeAction(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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

DeleteNotification(Int32)

Delete a Notification.

Declaration
void DeleteNotification(int notificationId)
Parameters
Type Name Description
System.Int32 notificationId

Id of the Notification to delete.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

Extension Methods

JsonExtensionsWeb.ToJson(Object)
  • View Source
Back to top by the community, for the community... #DNNCMS