SCION Workbench Client - v1.0.0-beta.35
    Preparing search index...

    Class WorkbenchNotificationServiceAbstract

    Allows displaying a notification to the user.

    A notification is a closable message that appears in the upper-right corner and disappears automatically after a few seconds. It informs the user of a system event, e.g., that a task has been completed or an error has occurred.

    Multiple notifications are stacked vertically. Notifications can be grouped. For each group, only the last notification is displayed at any given time.

    The built-in notification supports the display of a plain text message and is available as 'notification' capability without a qualifier. Other notification capabilities can be contributed in the host app, e.g., to display structured content or to provide out-of-the-box notification templates. The use of a qualifier distinguishes different notification providers.

    Applications need to declare an intention in their application manifest for displaying a notification to the user, as illustrated below:

    {
    "intentions": [
    { "type": "notification" }
    ]
    }

    WorkbenchNotificationCapability

    Index

    Constructors

    Methods

    Constructors

    Methods

    • Presents the user with a notification that is displayed in the upper-right corner based on the given qualifier.

      The qualifier identifies the provider to display the notification. The build-in notification to display a plain text message requires no qualifier.

      Parameters

      • notification: string | WorkbenchNotificationConfig

        Configures the content and appearance of the notification.

      • Optionalqualifier: Qualifier

        Identifies the notification provider.

      Returns Promise<void>

      Promise that resolves when displaying the notification, or that rejects if displaying the notification failed, e.g., if missing the notification intention, or because no notification provider could be found that provides a notification under the specified qualifier.