IDataProviderEngine for more information on extending this class.
A collection of decorators to be used with the data provider service
Decorator function that marks a data provider engine set<data_type>
method not to automatically
emit an update and notify subscribers of a change to the data. papi will still consider the
set<data_type>
method to be a data type method, but it will not layer over it to emit updates.
class MyDataProviderEngine {
@papi.dataProviders.decorators.doNotNotify
async setVerse() {}
}
WARNING: Do not copy and paste this example. The @
symbol does not render correctly in JSDoc
code blocks, so a different unicode character was used. Please use a normal @
when using a
decorator.
OR
Decorator function that marks a data provider engine set<data_type>
method not to automatically
emit an update and notify subscribers of a change to the data. papi will still consider the
set<data_type>
method to be a data type method, but it will not layer over it to emit updates.
The method not to layer over to send an automatic update
class MyDataProviderEngine {
@papi.dataProviders.decorators.doNotNotify
async setVerse() {}
}
WARNING: Do not copy and paste this example. The @
symbol does not render correctly in JSDoc
code blocks, so a different unicode character was used. Please use a normal @
when using a
decorator.
OR
Decorator function that marks a data provider engine set<data_type>
method not to automatically
emit an update and notify subscribers of a change to the data. papi will still consider the
set<data_type>
method to be a data type method, but it will not layer over it to emit updates.
The class that has the method not to layer over to send an automatic update
The name of the method not to layer over to send an automatic update
Note: this is the signature that provides the actual decorator functionality. However, since users will not be using this signature, the example usage is provided in the signature above.
Decorator function that marks a data provider engine set___
or get___
method to be ignored.
papi will not layer over these methods or consider them to be data type methods
class MyDataProviderEngine {
@papi.dataProviders.decorators.ignore
async getInternal() {}
}
WARNING: Do not copy and paste this example. The @
symbol does not render correctly in JSDoc
code blocks, so a different unicode character was used. Please use a normal @
when using a
decorator.
OR
Decorator function that marks a data provider engine set___
or get___
method to be ignored.
papi will not layer over these methods or consider them to be data type methods
The method to ignore
class MyDataProviderEngine {
@papi.dataProviders.decorators.ignore
async getInternal() {}
}
WARNING: Do not copy and paste this example. The @
symbol does not render correctly in JSDoc
code blocks, so a different unicode character was used. Please use a normal @
when using a
decorator.
OR
Decorator function that marks a data provider engine set___
or get___
method to be ignored.
papi will not layer over these methods or consider them to be data type methods
The class that has the method to ignore
The name of the method to ignore
Note: this is the signature that provides the actual decorator functionality. However, since users will not be using this signature, the example usage is provided in the signature above.
class MyDataProviderEngine {
@papi.dataProviders.decorators.ignore
async getInternal() {}
}
WARNING: Do not copy and paste this example. The @
symbol does not render correctly in JSDoc
code blocks, so a different unicode character was used. Please use a normal @
when using a
decorator.
Get a data provider that has previously been set up
Get a data provider that has previously been set up
Name of the desired data provider
The data provider with the given name if one exists, undefined otherwise
Indicate if we are aware of an existing data provider with the given name. If a data provider with the given name is somewhere else on the network, this function won't tell you about it unless something else in the existing process is subscribed to it.
Indicate if we are aware of an existing data provider with the given name. If a data provider with the given name is somewhere else on the network, this function won't tell you about it unless something else in the existing process is subscribed to it.
Creates a data provider to be shared on the network layering over the provided data provider engine.
Creates a data provider to be shared on the network layering over the provided data provider engine.
Name this data provider should be called on the network
The object to layer over with a new data provider object
Optional
dataProviderType: stringString to send in a network event to clarify what type of data provider
is represented by this engine. For generic data providers, the default value of dataProvider
can be used. For data provider types that have multiple instances (e.g., project data
providers), a unique type name should be used to distinguish from generic data providers.
Optional
dataProviderAttributes: { Optional object that will be sent in a network event to provide additional metadata about the data provider represented by this engine.
WARNING: registering a dataProviderEngine mutates the provided object. Its notifyUpdate
and
set
methods are layered over to facilitate data provider subscriptions.
The data provider including control over disposing of it. Note that this data provider is a new object distinct from the data provider engine passed in.
String to send in a network event to clarify what type of data provider
is represented by this engine. For generic data providers, the default value of dataProvider
can be used. For data provider types that have multiple instances (e.g., project data
providers), a unique type name should be used to distinguish from generic data providers.
Optional object that will be sent in a network event to provide additional metadata about the data provider represented by this engine.
WARNING: registering a dataProviderEngine mutates the provided object. Its notifyUpdate
and
set
methods are layered over to facilitate data provider subscriptions.
Abstract class that provides a placeholder
notifyUpdate
for data provider engine classes. If a data provider engine class extends this class, it doesn't have to specify its ownnotifyUpdate
function in order to usenotifyUpdate
.