Classes in JET are generally final and do not support subclassing. At the moment, final is not enforced. However, this will likely change in an upcoming JET release.
Function callback to retrieve nodes and links for the specified parent.
Function will return a Promise that resolves into an object with the following structure:
Number of child nodes if child count is available.
The method returns 0 for leaf nodes.
The method returns -1 if the child count is unknown
(e.g. if the children have not been fetched).
Type
number
getData(parentData) : {Promise}
Returns child data for the given parent.
The data include all immediate child nodes along with links whose endpoints
both descend from the current parent node.
If all the links are available upfront, they can be returned as part of the
top-level data (since all nodes descend from the diagram root).
If lazy-fetching links is desirable, the most
optimal way to return links is as part of the data of the
nearest common ancestor of the link's endpoints.
Parameters:
Name
Type
Description
parentData
Object
|
null
An object that contains data for the parent node.
See DiagramDataSource.NodeObject section.
If parentData is null, the method retrieves data for top level nodes.
Returns:
Promise resolves to a component object with the following structure: