DynamicDataProvider class

The Dynamic Data Provider allows components to consume Dynamic Data. It allows components to request Dynamic Data sources and register/unregister to those.

Properties

isDisposed

Returns true if the Dynamic Data Provider is disposed.

Methods

dispose()

Disposes the Dynamic Data Provider.

getAvailableSources()

Returns a list with all available Dynamic Data Sources.

registerAvailableSourcesChanged(callback)

Registers a callback to an event that raises when the list of available Dynamic Data Sources is updated.

registerPropertyChanged(sourceId, propertyId, callback)

Registers a callback for updates when a property is changed in a Dynamic Data source.

registerSourceChanged(sourceId, callback)

Registers a callback for updates when a Dynamic Data source is changed. This happens when any property is updated within the source.

tryGetSource(id)

Returns a Dynamic Data Source, by its id. If the source is not present, it returns undefined.

unregisterAvailableSourcesChanged(callback)

Unregisters a callback to an event that raises when the list of available Dynamic Data Sources is updated.

unregisterPropertyChanged(sourceId, propertyId, callback)

Unregisters a callback for updates when a property is changed in a Dynamic Data source.

unregisterSourceChanged(sourceId, callback)

Unregisters a callback for updates when a Dynamic Data source is changed.

Property Details

isDisposed

Returns true if the Dynamic Data Provider is disposed.

get isDisposed(): boolean;

Property Value

boolean

Method Details

dispose()

Disposes the Dynamic Data Provider.

dispose(): void;

Returns

void

getAvailableSources()

Returns a list with all available Dynamic Data Sources.

getAvailableSources(): ReadonlyArray<IDynamicDataSource>;

Returns

ReadonlyArray<IDynamicDataSource>

Read-only array with all available sources.

registerAvailableSourcesChanged(callback)

Registers a callback to an event that raises when the list of available Dynamic Data Sources is updated.

registerAvailableSourcesChanged(callback: () => void): void;

Parameters

callback

() => void

Function to execute when the sources are updated.

Returns

void

registerPropertyChanged(sourceId, propertyId, callback)

Registers a callback for updates when a property is changed in a Dynamic Data source.

registerPropertyChanged(sourceId: string, propertyId: string, callback: () => void): void;

Parameters

sourceId

string

Id of the Dynamic Data Source.

propertyId

string

Id of the property of the source.

callback

() => void

Function to execute when the source updates its data.

Returns

void

registerSourceChanged(sourceId, callback)

Registers a callback for updates when a Dynamic Data source is changed. This happens when any property is updated within the source.

registerSourceChanged(sourceId: string, callback: () => void): void;

Parameters

sourceId

string

Id of the Dynamic Data Source.

callback

() => void

Function to execute when the source updates its data.

Returns

void

tryGetSource(id)

Returns a Dynamic Data Source, by its id. If the source is not present, it returns undefined.

tryGetSource(id: string): IDynamicDataSource | undefined;

Parameters

id

string

Id of the Dynamic Data Source.

Returns

IDynamicDataSource | undefined

unregisterAvailableSourcesChanged(callback)

Unregisters a callback to an event that raises when the list of available Dynamic Data Sources is updated.

unregisterAvailableSourcesChanged(callback: () => void): void;

Parameters

callback

() => void

Function to remove from the registration. Must be the same it was registered with.

Returns

void

unregisterPropertyChanged(sourceId, propertyId, callback)

Unregisters a callback for updates when a property is changed in a Dynamic Data source.

unregisterPropertyChanged(sourceId: string, propertyId: string, callback: () => void): void;

Parameters

sourceId

string

Id of the Dynamic Data Source.

propertyId

string

Id of the property of the source.

callback

() => void

Function to remove from the registration. Must be the same it was registered with.

Returns

void

unregisterSourceChanged(sourceId, callback)

Unregisters a callback for updates when a Dynamic Data source is changed.

unregisterSourceChanged(sourceId: string, callback: () => void): void;

Parameters

sourceId

string

Id of the Dynamic Data Source.

callback

() => void

Function to remove from the registration. Must be the same it was registered with.

Returns

void