Package com.castlabs.sdk.nielsen
Class NielsenPlugin.MetadataBuilder
java.lang.Object
com.castlabs.sdk.nielsen.NielsenPlugin.MetadataBuilder
- Enclosing class:
NielsenPlugin
A helper class to build
AnalyticsMetaData objects for the Nielsen plugin.-
Constructor Summary
ConstructorsConstructorDescriptionMetadataBuilder(boolean live, String assetId) Creates a new builder.MetadataBuilder(AnalyticsMetaData analyticsMetaData) Creates a new builder starting from an existingAnalyticsMetaDataobject. -
Method Summary
Modifier and TypeMethodDescriptionadMetadata(JSONObject adMetadata) Sets the ad metadata passed to the NielsenloadMetadata()call for each ad.channelInfo(JSONObject channelInfo) Sets the channel information passed to the Nielsenplay()call.contentMetadata(JSONObject contentMetadata) Sets the content metadata passed to the NielsenloadMetadata()call.get()Returns the finalAnalyticsMetaDataobject.
-
Constructor Details
-
MetadataBuilder
Creates a new builder.- Parameters:
live- true if the current content is a live stream and false otherwiseassetId- The asset ID uniquely identifies the content
-
MetadataBuilder
Creates a new builder starting from an existingAnalyticsMetaDataobject.- Parameters:
analyticsMetaData- The base metadata.
-
-
Method Details
-
channelInfo
Sets the channel information passed to the Nielsenplay()call.- Parameters:
channelInfo- The channel information, or null to remove it.- Returns:
- this builder.
-
contentMetadata
Sets the content metadata passed to the NielsenloadMetadata()call.- Parameters:
contentMetadata- The content metadata, or null to remove it.- Returns:
- this builder.
-
adMetadata
Sets the ad metadata passed to the NielsenloadMetadata()call for each ad.- Parameters:
adMetadata- The ad metadata, or null to remove it.- Returns:
- this builder.
-
get
Returns the finalAnalyticsMetaDataobject.- Returns:
- The analytics metadata.
-