Options
All
  • Public
  • Public/Protected
  • All
Menu

A ng service interface having main responsibilities on application notification UI logics. Please note that this class does NOT directly involve with server-side push notification logics. It's only a client-side API providing the way to interact with notification UI components. A Notification can be pinned on the screen --you can do this via pinNotification method. This will make it not to be removed from the screen when display timeout is reached unless the user clicks on the close button. All unread notifications --those which automatically removed when display timeout is reached-- will be displayed as a badge notification showing the number of unread items. You can also retrieve the list of unread items by using getUnreadNotifications method.

author

shiorin, tee4cute

see

Notification

Hierarchy

  • INotificationManager

Implemented by

Index

Methods

clear

  • Remove the given notification from the UI. This also remove the notification message from unread and pinned items list.

    Parameters

    Returns void

clearAll

  • clearAll(): void
  • Clear all notifications from the UI. This also remove all notification messages from unread and pinned items list.

    Returns void

clearBy

  • clearBy(notificationType: string, name: string): void
  • Remove all notifications which matches the given notificationType and name. This method also remove the notifications from unread and pinned items list.

    Parameters

    • notificationType: string

      A notification's type (Notification.type) to be cleared. Passing null means not to apply the filter on this field.

    • name: string

      A notification's name (Notification.name) to be cleared. Passing null means not to apply the filter on this field.

    Returns void

getNotifications

  • Get all notifications in the UI.

    Returns Notification[]

getNotificationsBy

  • getNotificationsBy(notificationType: string, name: string): Notification[]
  • Get all notifications in the UI by the given notificationType and name.

    Parameters

    • notificationType: string

      A notification's type (Notification.type) to filter. Passing null means not to apply the filter on this field.

    • name: string

      A notification's name (Notification.name) to filter. Passing null means not to apply the filter on this field.

    Returns Notification[]

getShowingNotifications

  • Get all notifications being shown in the UI.

    Returns Notification[]

getShowingNotificationsBy

  • getShowingNotificationsBy(notificationType: string, name: string): Notification[]
  • Get all notifications being shown in the UI by the given notificationType and name.

    Parameters

    • notificationType: string

      A notification's type (Notification.type) to filter. Passing null means not to apply the filter on this field.

    • name: string

      A notification's name (Notification.name) to filter. Passing null means not to apply the filter on this field.

    Returns Notification[]

getUnreadNotifications

  • Get all unread notifications in the UI.

    Returns Notification[]

getUnreadNotificationsBy

  • getUnreadNotificationsBy(notificationType: string, name: string): Notification[]
  • Get all unread notifications in the UI by the given notificationType and name.

    Parameters

    • notificationType: string

      A notification's type (Notification.type) to filter. Passing null means not to apply the filter on this field.

    • name: string

      A notification's name (Notification.name) to filter. Passing null means not to apply the filter on this field.

    Returns Notification[]

markAsRead

  • Mark the given notification as read.

    Parameters

    Returns void

markAsReadAll

  • markAsReadAll(): void
  • Mark all notifications as read.

    Returns void

markAsReadBy

  • markAsReadBy(notificationType: string, name: string): void
  • Mark notifications as read by the given notificationType and name.

    Parameters

    • notificationType: string

      A notification's type (Notification.type) to filter. Passing null means not to apply the filter on this field.

    • name: string

      A notification's name (Notification.name) to filter. Passing null means not to apply the filter on this field.

    Returns void

notify

  • Notify user by displaying the given notification message on the screen.

    Parameters

    Returns void

pinNotification

  • Pin the given notification on the screen.

    Parameters

    Returns void

unpinNotification

  • Unpin the given notification off the screen.

    Parameters

    Returns void

Generated using TypeDoc