|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.brightcove.proserve.mediaapi.wrapper.apiobjects.Playlist
public class Playlist
Represents a Playlist object to/from the Media API.
From the Brightcove documentation on 2009/08/18 (http://support.brightcove.com/en/docs/media-api-objects-reference#Playlist):
The Playlist object is a collection of Videos. A Playlist has the following properties::
property name | type | read only? | description |
---|---|---|---|
id | long | yes | A number that uniquely identifies this Playlist. This id is automatically assigned when the Playlist is created. |
referenceId | String | no | A user-specified id, limited to 150 characters, that uniquely identifies this Playlist. Note that the find_playlists_by_reference_ids method cannot handle referenceIds that contain commas, so you may want to avoid using commas in referenceId values. |
accountId | long | yes | A number that uniquely identifies the account to which this Playlist belongs, assigned by Brightcove. |
name | String | no | The title of this Playlist, limited to 50 characters. The name is a required property when you create a playlist. |
shortDescription | String | no | A short description describing this Playlist, limited to 250 characters. |
videoIds | List | no | A list of the ids of the Videos that are encapsulated in this Playlist. |
videos | List | no | A list of the Video objects that are encapsulated in this Playlist. |
playlistType | Enum | no | Options are OLDEST_TO_NEWEST, NEWEST_TO_OLDEST, ALPHABETICAL, PLAYSTOTAL, and PLAYS_TRAILING_WEEK (each of which is a smart playlist, ordered as indicated) or EXPLICIT (a manual playlist). The playlistType is a required property when you create a playlist. |
filterTags | List | no | A list of the tags that define this smart playlist. For example: "filterTags":["Sitka","ticks"] |
thumbnailURL | String | yes | The URL of the thumbnail associated with this Playlist. |
Constructor Summary | |
---|---|
Playlist()
Default Constructor. |
|
Playlist(JSONObject jsonObj)
Constructor using JSON object. |
|
Playlist(java.lang.String json)
Constructor using JSON string. |
Method Summary | |
---|---|
java.lang.Long |
getAccountId()
Gets the account id for this Playlist. |
java.util.List<java.lang.String> |
getFilterTags()
Gets the filter tags for this Playlist. |
java.lang.Long |
getId()
Gets the id for this Playlist. |
java.lang.String |
getName()
Gets the name (title) for this Playlist. |
PlaylistTypeEnum |
getPlaylistType()
Gets the type for this Playlist. |
java.lang.String |
getReferenceId()
Gets the reference id for this Playlist. |
java.lang.String |
getShortDescription()
Gets the short description for this Playlist. |
java.lang.String |
getThumbnailUrl()
Gets the thumbnail URL for this Playlist. |
java.util.List<java.lang.Long> |
getVideoIds()
Gets the Video Ids for this Playlist. |
java.util.List<Video> |
getVideos()
Gets the Videos for this Playlist. |
void |
initAll()
Fully initializes the playlist object by setting all fields to null |
void |
setAccountId(java.lang.Long accountId)
Sets the account id for this Playlist. |
void |
setFilterTags(java.util.List<java.lang.String> filterTags)
Sets the filter tags for this Playlist. |
void |
setId(java.lang.Long id)
Sets the id for this Playlist. |
void |
setName(java.lang.String name)
Sets the name (title) for this Playlist. |
void |
setPlaylistType(PlaylistTypeEnum playlistType)
Sets the type for this Playlist. |
void |
setReferenceId(java.lang.String referenceId)
Sets the reference id for this Playlist. |
void |
setShortDescription(java.lang.String shortDescription)
Sets the short description for this Playlist. |
void |
setThumbnailUrl(java.lang.String thumbnailUrl)
Sets the thumbnail URL for this Playlist. |
void |
setVideoIds(java.util.List<java.lang.Long> videoIds)
Sets the Video Ids for this Playlist. |
void |
setVideos(java.util.List<Video> videos)
Sets the Videos for this Playlist. |
JSONObject |
toJson()
Converts the video into a JSON object suitable for use with the Media API |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Playlist()
Default Constructor.
All fields set to null to start - required fields must be set before calling Write Media API.
public Playlist(java.lang.String json) throws JSONException
Constructor using JSON string.
Given a JSON string from the Media API, attempts to construct a new Playlist object and fill out all of the fields defined. All other fields will be null.
JSONException
public Playlist(JSONObject jsonObj) throws JSONException
Constructor using JSON object.
Given a JSON object from the Media API, attempts to construct a new Playlist object and fill out all of the fields defined. All other fields will be null.
JSONException
Method Detail |
---|
public void initAll()
Fully initializes the playlist object by setting all fields to null
public java.lang.Long getId()
Gets the id for this Playlist.
A number that uniquely identifies this Playlist. This id is automatically assigned when the Playlist is created.
public java.lang.String getReferenceId()
Gets the reference id for this Playlist.
A user-specified id, limited to 150 characters, that uniquely identifies this Playlist. Note that the find_playlists_by_reference_ids method cannot handle referenceIds that contain commas, so you may want to avoid using commas in referenceId values.
public java.lang.Long getAccountId()
Gets the account id for this Playlist.
A number that uniquely identifies the account to which this Playlist belongs, assigned by Brightcove.
public java.lang.String getName()
Gets the name (title) for this Playlist.
The title of this Playlist, limited to 50 characters. The name is a required property when you create a playlist.
public java.lang.String getShortDescription()
Gets the short description for this Playlist.
A short description describing this Playlist, limited to 250 characters.
public java.util.List<java.lang.Long> getVideoIds()
Gets the Video Ids for this Playlist.
A list of the ids of the Videos that are encapsulated in this Playlist.
public java.util.List<Video> getVideos()
Gets the Videos for this Playlist.
A list of the Video objects that are encapsulated in this Playlist.
public PlaylistTypeEnum getPlaylistType()
Gets the type for this Playlist.
Options are OLDEST_TO_NEWEST, NEWEST_TO_OLDEST, ALPHABETICAL, PLAYSTOTAL, and PLAYS_TRAILING_WEEK (each of which is a smart playlist, ordered as indicated) or EXPLICIT (a manual playlist). The playlistType is a required property when you create a playlist.
public java.util.List<java.lang.String> getFilterTags()
Gets the filter tags for this Playlist.
A list of the tags that define this smart playlist. For example:
"filterTags":["Sitka","ticks"]
public java.lang.String getThumbnailUrl()
Gets the thumbnail URL for this Playlist.
The URL of the thumbnail associated with this Playlist.
public void setId(java.lang.Long id)
Sets the id for this Playlist.
A number that uniquely identifies this Playlist. This id is automatically assigned when the Playlist is created.
id
- The id for this Playlistpublic void setReferenceId(java.lang.String referenceId)
Sets the reference id for this Playlist.
A user-specified id, limited to 150 characters, that uniquely identifies this Playlist. Note that the find_playlists_by_reference_ids method cannot handle referenceIds that contain commas, so you may want to avoid using commas in referenceId values.
referenceId
- Reference id for this Playlistpublic void setAccountId(java.lang.Long accountId)
Sets the account id for this Playlist.
A number that uniquely identifies the account to which this Playlist belongs, assigned by Brightcove.
accountId
- Account id for this Playlistpublic void setName(java.lang.String name)
Sets the name (title) for this Playlist.
The title of this Playlist, limited to 50 characters. The name is a required property when you create a playlist.
name
- Name of the Playlistpublic void setShortDescription(java.lang.String shortDescription)
Sets the short description for this Playlist.
A short description describing this Playlist, limited to 250 characters.
shortDescription
- Short description for this Playlistpublic void setVideoIds(java.util.List<java.lang.Long> videoIds)
Sets the Video Ids for this Playlist.
A list of the ids of the Videos that are encapsulated in this Playlist.
videoIds
- Video Ids for this Playlistpublic void setVideos(java.util.List<Video> videos)
Sets the Videos for this Playlist.
A list of the Video objects that are encapsulated in this Playlist.
videos
- Videos for this Playlistpublic void setPlaylistType(PlaylistTypeEnum playlistType)
Sets the type for this Playlist.
Options are OLDEST_TO_NEWEST, NEWEST_TO_OLDEST, ALPHABETICAL, PLAYSTOTAL, and PLAYS_TRAILING_WEEK (each of which is a smart playlist, ordered as indicated) or EXPLICIT (a manual playlist). The playlistType is a required property when you create a playlist.
playlistType
- Type for this Playlistpublic void setFilterTags(java.util.List<java.lang.String> filterTags)
Sets the filter tags for this Playlist.
A list of the tags that define this smart playlist. For example:
"filterTags":["Sitka","ticks"]
filterTags
- Filter tags for this Playlistpublic void setThumbnailUrl(java.lang.String thumbnailUrl)
Sets the thumbnail URL for this Playlist.
The URL of the thumbnail associated with this Playlist.
thumbnailUrl
- Thumbnail URL for this Playlistpublic JSONObject toJson() throws JSONException
Converts the video into a JSON object suitable for use with the Media API
JSONException
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |