Caplin Trader 4.7.1

Class: module:caplin/alerts/Notification

module:caplin/alerts/Notification

A notification for the user's attention. This could either have been generated by a server side component (e.g. a DataSource), or by a module:caplin/alerts/Trigger being triggered.

Each notification provides its source ("Triggered" for notifications created by a Trigger), the time it was created, and any other data to be displayed.

Constructor

new module:caplin/alerts/Notification()

Methods

getAdditionalFields() → {Map}

Returns all additional fields associated with this notification.
Returns:
Additional fields for this notification.
Type
Map

getSource() → {String}

Returns the source of the notification. This will be "Triggered" for notifications created by a module:caplin/alerts/Trigger, or a value defined by the DataSource that the notification originated from (typically the name of the DataSource).
Returns:
The source of the notification.
Type
String

getTimeCreated() → {Number}

Returns the time that the notification was generated.
Returns:
Seconds since epoch that this notification was generated.
Type
Number