Class NotificationActionEvent
java.lang.Object
com.openfin.desktop.JsonBean
com.openfin.desktop.notifications.events.NotificationEvent
com.openfin.desktop.notifications.events.NotificationActionEvent
public class NotificationActionEvent extends NotificationEvent
Event fired when an action is raised for a notification due to a specified
trigger.
- Author:
- Anthony
-
Field Summary
-
Constructor Summary
Constructors Constructor Description NotificationActionEvent(org.json.JSONObject eventPayload)
-
Method Summary
Modifier and Type Method Description NotificationActionResult
getResult()
Get application-defined metadata that this event is passing back to the application.NotificationSource
getSource()
Notifications can be created by both desktop applications and as push notifications from a notification feed.java.lang.String
getTrigger()
Indicates what triggered this action.Methods inherited from class com.openfin.desktop.notifications.events.NotificationEvent
getNotificationOptions, getType
Methods inherited from class com.openfin.desktop.JsonBean
get, getArray, getBoolean, getBooleanValue, getBooleanValue, getDoubleValue, getDoubleValue, getInteger, getIntegerValue, getJson, getJsonBean, getJsonBean, getJsonBeanList, getJsonCopy, getJsonValue, getList, getRectangle, getString, put, setArray, setBoolean, setInteger, setJsonArray, setJsonBean, setLong, setRectangle, setString, toString
-
Constructor Details
-
NotificationActionEvent
public NotificationActionEvent(org.json.JSONObject eventPayload)
-
-
Method Details
-
getTrigger
public java.lang.String getTrigger()Indicates what triggered this action. Trigger can be one of the following:"close": The notification was closed, either by user interaction, programmatically by an application, or by the notification expiring.
"control": The user interacted with one of the controls within the notification. This currently means a button click, but other control types will be added in future releases.
"expire": The notification expired.
"programmatic": The action was triggered programmatically by an application. Not currently supported - will be implemented in a future release.
"select": The user clicked the body of the notification itself. Any clicks of the notification that don't hit a control or the close button will fire an event with the 'select' action trigger.
- Returns:
- The trigger of this action.
-
getSource
Notifications can be created by both desktop applications and as push notifications from a notification feed. This method allows the application handling the action to identify where this notification originated.- Returns:
- The source of the notification.
-
getResult
Get application-defined metadata that this event is passing back to the application.- Returns:
- Application-defined metadata.
-