Class ContentMetadata


  • public class ContentMetadata
    extends java.lang.Object
    Information about the content which a requested ad session is to be played with, as well as information targeting the desired campaign(s).
    • Constructor Detail

      • ContentMetadata

        public ContentMetadata()
    • Method Detail

      • setCategory

        public void setCategory​(@Nullable
                                java.lang.String category)
        Content category is used by Pulse to target ads and determine the ad insertion policy. The content category can be represented by either its unique id or one of its aliases set in Pulse.
        Parameters:
        category - Unique category id or alias.
      • getCategory

        public java.lang.String getCategory()
        See setCategory(String) for information.
        Returns:
        The category, or null if none is set.
      • setContentForm

        public void setContentForm​(ContentMetadata.ContentForm contentForm)
        Content form is used to determine the ad insertion policy.
        Parameters:
        contentForm - The content form of the content.
      • setIdentifier

        public void setIdentifier​(@Nullable
                                  java.lang.String identifier)
        Content identifier, used to identify the content to third parties.
        Parameters:
        identifier - Content identifier.
      • getIdentifier

        public java.lang.String getIdentifier()
        See setIdentifier(String) for information.
        Returns:
        The content identifier, or null if none is set.
      • setContentPartner

        public void setContentPartner​(@Nullable
                                      java.lang.String contentPartner)
        Content partner; used to target ads. The content partner can be represented by either its unique id or one of its aliases set in the Pulse manager.
        Parameters:
        contentPartner - Unique content partner id or alias.
      • getContentPartner

        public java.lang.String getContentPartner()
        See setContentPartner(String) for information.
        Returns:
        The content partner, or null if none is set.
      • setDuration

        public void setDuration​(float duration)
        The duration of the content.
        Parameters:
        duration - The content duration, specified in seconds. A duration of 0.0f will be treated as if the value is unset.
      • getDuration

        public float getDuration()
        See setDuration(float) for information.
        Returns:
        The content duration.
      • setFlags

        public void setFlags​(@Nullable
                             java.util.List<java.lang.String> flags)
        Flags which can alter Pulse's ad insertion behaviour. Since flags override Pulse's default, they should be used with caution. For more information please talk to your Ooyala Ad Products contact. Supported flags: nocom, noprerolls, nomidrolls, nopostrolls, nooverlays, noskins.
        Parameters:
        flags - The flags to send.
      • getFlags

        public java.util.List<java.lang.String> getFlags()
        See setFlags(List) for information.
        Returns:
        A list of the assigned flags.
      • setTags

        public void setTags​(@Nullable
                            java.util.List<java.lang.String> tags)
        Pulse content tags, used to target specific ads or campaigns.
        Parameters:
        tags - The tags to send.
      • getTags

        public java.util.List<java.lang.String> getTags()
        See setTags(List) for information.
        Returns:
        A list of the assigned tags.
      • setCustomParameters

        public void setCustomParameters​(@Nullable
                                        java.util.Map<java.lang.String,​java.lang.String> customParameters)
        Custom parameters to add to the session request. Parameters with names containing invalid characters will be omitted. These parameters are added to the ad request URL in the style of "cp.[parameter_name]=[parameter_value]".
        Parameters:
        customParameters - Custom parameters.
      • getCustomParameters

        public java.util.Map<java.lang.String,​java.lang.String> getCustomParameters()
        See setCustomParameters(Map) for information.
        Returns:
        A map of the assigned custom parameters.
      • setAccountCustomParameters

        public void setAccountCustomParameters​(@Nullable
                                               java.util.Map<java.lang.String,​java.lang.String> accountCustomParameters)
        Account custom parameters to add to the session request. Parameters with names or values containing invalid characters will be omitted. These parameters are added to the ad request URL in the style of "acp.[parameter_name]=[parameter_value]". NOTE: The account custom parameter values cannot contain any spaces or any of the following characters: comma (,), semicolon (;), double quote/quotation mark ("), single quote/apostrophe ('), backslash (\), pipe (|), tilde (~), or ampersand (&).
        Parameters:
        accountCustomParameters - Account custom parameters.
      • getAccountCustomParameters

        public java.util.Map<java.lang.String,​java.lang.String> getAccountCustomParameters()
        See setAccountCustomParameters(Map) for information.
        Returns:
        A map of the assigned account custom parameters.
      • setContentProviderInformation

        public void setContentProviderInformation​(java.lang.String providerCode,
                                                  java.lang.String contentId)
        Content provider information, used to specify provider-specific information about the video content that is being played.
        Parameters:
        providerCode - The unique content provider code.
        contentId - The unique content identifier.
      • copyContentProviderInformation

        public void copyContentProviderInformation​(com.ooyala.pulse.ContentProviderInformation contentProviderInformation)
        Replace the current ContentProviderInformation with the provided instance.
        Parameters:
        contentProviderInformation - the provided instance of ContentProviderInformation
      • getContentProviderInformation

        public com.ooyala.pulse.ContentProviderInformation getContentProviderInformation()
        Returns:
        The assigned content provider information.