public class

SVSAdPlacement

extends Object
implements Parcelable Serializable
java.lang.Object
   ↳ com.smartadserver.android.instreamsdk.model.adplacement.SVSAdPlacement

Class Overview

Class representing an instream ad placement

Summary

Constants
String FORMAT_ID_PARAMETER Constant for format id property key string
String PAGE_ID_PARAMETER Constant for page id property key string
String PAGE_NAME_PARAMETER Constant for page name property key string
String SCO_PARAMETER Constant for supply chain object property key string
String SITE_ID_PARAMETER Constant for site id property key string
String TARGET_PARAMETER Constant for target property key string
[Expand]
Inherited Constants
From interface android.os.Parcelable
Fields
public static final SVSAdPlacement PREROLL_MIDROLL_POSTROLL A test placement that will return one ad for preroll, midroll and postroll
Public Constructors
SVSAdPlacement(long siteID, String pageName, long formatId)
Creates a SVSAdPlacement instance from specified parameters
SVSAdPlacement(long siteID, long pageId, long formatId)
Creates a SVSAdPlacement instance from specified parameters.
Public Methods
long getFormatId()
Returns the format Id parameter
String getGlobalTargetingString()
Returns the global targeting String
String getMidrollTargetingString()
Returns the midroll targeting String
long getPageId()
Returns the page Id parameter
String getPageName()
Returns the page name parameter
void getParameters(HashMap<String, String> parameters, SVSAdBreakType adBreakType)
Fills the passed HashMap with all relevant parameters of this SVSAdPlacement Object
String getPostrollTargetingString()
Returns the postroll targeting String
String getPrerollTargetingString()
Returns the Preroll targeting String
long getSiteID()
Returns the site Id parameter
String getSupplyChainObjectString()
Returns the Supply Chain Object String
String getTargetingForAdBreakType(SVSAdBreakType type)
Returns the appropriate targeting string for the given ad break type.
void setGlobalTargetingString(String globalTargetingString)
Sets the global targeting String
void setMidrollTargetingString(String midrollTargetingString)
Sets the midroll targeting String
void setPostrollTargetingString(String postrollTargetingString)
Sets the postroll targeting String
void setPrerollTargetingString(String prerollTargetingString)
Sets the preroll targeting String
void setSupplyChainObjectString(String supplyChainObjectString)
Sets the Supply Chain Object String It is a string representing the Supply Chain Object that will be passed to Smart AdServer during AdCalls.
boolean usesPageName()
Returns whether this placement relies on a page name or a page Id.
[Expand]
Inherited Methods
From class java.lang.Object
From interface android.os.Parcelable

Constants

public static final String FORMAT_ID_PARAMETER

Constant for format id property key string

Constant Value: "fmtid"

public static final String PAGE_ID_PARAMETER

Constant for page id property key string

Constant Value: "pgid"

public static final String PAGE_NAME_PARAMETER

Constant for page name property key string

Constant Value: "pgname"

public static final String SCO_PARAMETER

Constant for supply chain object property key string

Constant Value: "schain"

public static final String SITE_ID_PARAMETER

Constant for site id property key string

Constant Value: "siteid"

public static final String TARGET_PARAMETER

Constant for target property key string

Constant Value: "tgt"

Fields

public static final SVSAdPlacement PREROLL_MIDROLL_POSTROLL

A test placement that will return one ad for preroll, midroll and postroll

Public Constructors

public SVSAdPlacement (long siteID, String pageName, long formatId)

Creates a SVSAdPlacement instance from specified parameters

public SVSAdPlacement (long siteID, long pageId, long formatId)

Creates a SVSAdPlacement instance from specified parameters.

Public Methods

public long getFormatId ()

Returns the format Id parameter

public String getGlobalTargetingString ()

Returns the global targeting String

public String getMidrollTargetingString ()

Returns the midroll targeting String

public long getPageId ()

Returns the page Id parameter

public String getPageName ()

Returns the page name parameter

public void getParameters (HashMap<String, String> parameters, SVSAdBreakType adBreakType)

Fills the passed HashMap with all relevant parameters of this SVSAdPlacement Object

public String getPostrollTargetingString ()

Returns the postroll targeting String

public String getPrerollTargetingString ()

Returns the Preroll targeting String

public long getSiteID ()

Returns the site Id parameter

public String getSupplyChainObjectString ()

Returns the Supply Chain Object String

public String getTargetingForAdBreakType (SVSAdBreakType type)

Returns the appropriate targeting string for the given ad break type.

public void setGlobalTargetingString (String globalTargetingString)

Sets the global targeting String

public void setMidrollTargetingString (String midrollTargetingString)

Sets the midroll targeting String

public void setPostrollTargetingString (String postrollTargetingString)

Sets the postroll targeting String

public void setPrerollTargetingString (String prerollTargetingString)

Sets the preroll targeting String

public void setSupplyChainObjectString (String supplyChainObjectString)

Sets the Supply Chain Object String It is a string representing the Supply Chain Object that will be passed to Smart AdServer during AdCalls. You should fill this parameter if you are reselling inventory from direct publishers. You can find more information about Supply Chain Object at this URL: https://help.smartadserver.com/s/article/Sellers-json-and-SupplyChain-Object

public boolean usesPageName ()

Returns whether this placement relies on a page name or a page Id.

Returns
  • true if this placement relies on a page name, false if it relies on a page Id.