This Watchlist API consists of four interfaces, and four implementation classes for the StreamLink.
The WatchlistService object, retrieved from the Service Registry, is the object to use for:
disposing of watchlists,
monitoring the status of the data connection to the Caplin Platform, via the event WatchlistServiceEvents.STATUS_CHANGED.
Watchlist objects are never constructed directly but are retrieved via five sources:
As the first function parameter of the event handler for the WatchlistServiceEvents.ADDED event
As the first function parameter of the event handler for the WatchlistServiceEvents.REMOVED event
As the first function parameter of the success callback for the WatchlistService.create method
As the first function parameter of the error callback for the WatchlistService.dispose method
A Watchlist object allows direct access to its metadata, but working with its contents requires working, either directly or indirectly, with subscriptions:
Register a listener for the Watchlist event WatchlistEvents.PROPERTY_CHANGED to respond to a change in a watchlist’s name.
An instance of the WatchlistContentsManager class is used to manipulate the contents of a watchlist. You acquire an instance by calling Watchlist.getContentsManager. When you have finished manipulating the watchlist, call WatchlistContentsManager.destroy.
The WatchlistGridDataProvider class links a grid component to an existing Transformer-hosted watchlist. This class provides data to the grid via a subscription to the watchlist’s container on Transformer, and translates local row addition and removal events into commands to Transformer’s Watchlist Service.
You will rarely need to instantiate this class explicitly; the Webcentric layout manager will instantiate the class in the course of deserialising the XML layout configuration for a watchlist grid.