new GraphNotification(id, data)
Creates an instance of a GraphNotification.
Parameters:
| Name | Type | Description |
|---|---|---|
id |
string | The id for this notification. |
data |
olympe.dc.db.GraphPatch | The updates being reported. |
Methods
-
addBlock(id, instancesToAdd, instancesToRemove)
-
Add a new block in this notification with the list of instances to add, to remove and the new children of this block.
Parameters:
Name Type Description idstring The block id.
instancesToAddArray.<string> List of instances to add.
instancesToRemoveArray.<string> List of instances to remove.
-
applyTo(notification)
-
Apply all the operations and metadata of this notification on the specified one.
Parameters:
Name Type Description notificationolympe.dc.query.GraphNotification -
forEachBlock(callback)
-
Run the specified function for each block of contained in this notification.
Parameters:
Name Type Description callbackolympe.dc.query.GraphNotification.BlockNotificationHandler The function to perform.
-
getId()
-
Gets the id of the graphdef which this notification is associated to.
Returns:
The graphdef id.
- Type
- string
-
getPatch()
-
Gets the data as a Graph patch.
Returns:
The graph patch of this notification.
Type Definitions
-
BlockNotificationHandler(id, add, remove)
-
Parameters:
Name Type Description idstring the block id
addArray.<string> removeArray.<string>
Olympe SDK