Caplin Trader 4.0.3

Interface: module:caplin/alerts/NotificationService



The NotificationService provides access to the user's module:caplin/alerts/Notifications.

This service can be accessed from the module:br/ServiceRegistry, using the alias caplin.alerts.notification-service. There is no default implementation for this service.

This interface uses emitr allowing services implementing this interface to trigger events.

The service will emit events defined in module:caplin/alerts/NotificationServiceEvents.


dismiss(notification, erroropt, successopt)

A request to dismiss the given notification, removing it from the user's list of notifications.

If the request is successful, a REMOVED event will be raised (see module:caplin/alerts/NotificationServiceEvents).

Name Type Attributes Description
notification module:caplin/alerts/Notification The notification to dismiss.
error function <optional>
A callback that will be invoked if the request fails.
success function <optional>
A callback that will be invoked when the request succeeds.