ContentEntitlementsProvider class exist for short term work around while TM APIs do not have support for passing in nativeObjects from native side of TM into JS callback. Eventually will not need JS implementation of IContentEntitlementsProvider since a reference to a native ContentEntitlementsProvider will be provided instead.
Each new JS
ContentEntitlementsProvider has a providerId that is given from native side for TM that maps this
JS ContentEntitlementsProvider to a native ContentEntitlementsProvider.
JS ContentEntitlementsProvider uses TM to pass calls through to the associated native ContentEntitlementsProvider.
Implements
Constructors
new ContentEntitlementsProvider()
new ContentEntitlementsProvider(providerId): ContentEntitlementsProvider
Parameters
providerId
number
Returns
ContentEntitlementsProvider
Properties
providerId
providerId:number
Methods
addContentEntitlementChunk()
addContentEntitlementChunk(entitlements): void
Adds content entitlement data to response.
Use repeated calls to addContentEntitlementChunk to paginate data to prevent loading large lists into memory.
Must eventually be followed by a call to commit() after all entitlements have been sent.
Parameters
entitlements
IContentEntitlement[]
A list of entitlements.
Returns
void
Implementation of
IContentEntitlementsProvider.addContentEntitlementChunk
commit()
commit():void
Indicates the end of responses.
Must be called after the final call of addContentEntitlementChunk.
Returns
void
Implementation of
IContentEntitlementsProvider.commit

