|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.brightcove.proserve.mediaapi.wrapper.apiobjects.Video
public class Video
Represents a Video object to/from the Media API.
From the Brightcove documentation on 2009/08/18 (http://support.brightcove.com/en/docs/media-api-objects-reference):
The Video object is an aggregation of metadata and asset information associated with a video. A Video has the following properties:
property name | type | read only? | description |
---|---|---|---|
name | String | no | The title of this Video, limited to 60 characters. The name is a required property when you create a video. |
id | long | yes | A number that uniquely identifies this Video, assigned by Brightcove when the Video is created. |
referenceId | String | no | A user-specified id that uniquely identifies this Video, limited to 150 characters. A referenceID can be used as a foreign-key to identify this video in another system. |
accountId | long | yes | A number, assigned by Brightcove, that uniquely identifies the account to which this Video belongs. |
shortDescription | String | no | A short description describing this Video, limited to 250 characters. The shortDescription is a required property when you create a video. |
longDescription | String | no | A longer description of this Video, limited to 5000 characters. |
FLVURL | String | yes | The URL of the video file for this Video. Note that this property can be accessed with the Media API only with a special read or write token. See Accessing Video Content with the Media API. |
renditions | Array | no | An array of Renditions that represent the dynamic delivery renditions available for this Video. A Video should have not more than 10 Renditions. Note that this property can be accessed with the Media API only with a special read or write token. See Accessing Video Content with the Media API. |
videoFullLength | Rendition | no | A single Rendition that represents the the video file for this Video. Note that this property can be accessed with the Media API only with a special read or write token. See Accessing Video Content with the Media API. |
creationDate | Date | yes | The date this Video was created, represented as the number of milliseconds since the UNIX epoch. |
publishedDate | Date | yes | The date this Video was last made active, represented as the number of milliseconds since the Unix epoch. |
lastModifiedDate | Date | yes | The date this Video was last modified, represented as the number of milliseconds since the Unix epoch. |
itemState | Enum | no | An ItemStateEnum. One of ACTIVE, INACTIVE, or DELETED. You can set this property only to ACTIVE or INACTIVE; you cannot delete a video by setting its itemState to DELETED. |
startDate | Date | no | The first date this Video is available to be played, represented as the number of milliseconds since the Unix epoch. |
endDate | Date | no | The last date this Video is available to be played, represented as the number of milliseconds since the Unix epoch. |
linkURL | String | no | An optional URL to a related item, limited to 150 characters. |
linkText | String | no | The text displayed for the linkURL, limited to 40 characters. |
tags | List | no | A list of Strings representing the tags assigned to this Video. Each tag can be not more than 64 characters, and a video can have no more than 1200 tags. |
videoStillURL | String | yes | The URL to the video still image associated with this Video. Video stills are 480x360 pixels. |
thumbnailURL | String | yes | The URL to the thumbnail image associated with this Video. Thumbnails are 120x90 pixels. |
length | long | yes | The length of this video in milliseconds. |
economics | Enum | no | An EconomicsEnum. Either FREE or AD_SUPPORTED. AD_SUPPORTED means that ad requests are enabled for this Video. |
geoFiltered | boolean | no | True indicates that the video is geo-restricted. |
geoFilteredCountries | List | no | A list of the ISO-3166 two-letter codes of the countries to enforce geo-restriction rules on. Use lowercase for the country codes. |
geoFilterExclude | boolean | no | If true, the video can be viewed in all countries except those listed in geoFilteredCountries ; if false, the video can be viewed only in the countries listed in geoFilteredCountries . |
cuePoints | List | no | A List of the CuePoints objects assigned to this Video. |
playsTotal | Integer | yes | How many times this Video has been played since its creation. |
playsTrailingWeek | Integer | yes | How many times this Video has been played within the past seven days, exclusive of today. |
Note that another field - "Custom Fields" is also supported by this API, but not officially documented as yet.
Constructor Summary | |
---|---|
Video()
Default Constructor. |
|
Video(JSONObject jsonObj)
Constructor using JSON object. |
|
Video(java.lang.String json)
Constructor using JSON string. |
Method Summary | |
---|---|
java.lang.Long |
getAccountId()
Gets the account id for this Video. |
java.util.Date |
getCreationDate()
Gets the creation date for this Video. |
java.util.List<CuePoint> |
getCuePoints()
Gets the cue points for this Video. |
java.util.List<CustomField> |
getCustomFields()
Gets the custom fields for this Video. |
EconomicsEnum |
getEconomics()
Gets the economics for this Video. |
java.util.Date |
getEndDate()
Gets the end date for this Video. |
java.lang.String |
getFlvUrl()
Gets the FLV URL for this Video. |
java.lang.Boolean |
getGeoFiltered()
Gets the geo filtered state for this Video. |
java.util.List<GeoFilterCodeEnum> |
getGeoFilteredCountries()
Gets the geo-filtered countries for this Video. |
java.lang.Boolean |
getGeoFilteredExclude()
Gets the geo filtered exclude state for this Video. |
java.lang.Long |
getId()
Gets the id for this Video. |
ItemStateEnum |
getItemState()
Gets the item state for this Video. |
java.util.Date |
getLastModifiedDate()
Gets the last modified date for this Video. |
java.lang.Long |
getLength()
Gets the length for this Video. |
java.lang.String |
getLinkText()
Gets the related link text for this Video. |
java.lang.String |
getLinkUrl()
Gets the related link URL for this Video. |
java.lang.String |
getLongDescription()
Gets the long description for this Video. |
java.lang.String |
getName()
Gets the name (title) for this Video. |
java.lang.Integer |
getPlaysTotal()
Gets the plays total count for this Video. |
java.lang.Integer |
getPlaysTrailingWeek()
Gets the plays trailing week count for this Video. |
java.util.Date |
getPublishedDate()
Gets the published date for this Video. |
java.lang.String |
getReferenceId()
Gets the reference id for this Video. |
java.util.Date |
getReleaseDate()
Gets the release date for this Video. |
java.util.List<Rendition> |
getRenditions()
Gets the renditions for this Video. |
java.lang.String |
getShortDescription()
Gets the short description for this Video. |
java.util.Date |
getStartDate()
Gets the start date for this Video. |
java.util.List<java.lang.String> |
getTags()
Gets the keyword tags for this Video. |
java.lang.String |
getThumbnailUrl()
Gets the thumbnail URL for this Video. |
Rendition |
getVideoFullLength()
Gets the full length rendition for this Video. |
java.lang.String |
getVideoStillUrl()
Gets the video still URL for this Video. |
void |
initAll()
Fully initializes the video object by setting all fields to null |
void |
setAccountId(java.lang.Long accountId)
Sets the account id for this Video. |
void |
setCreationDate(java.util.Date creationDate)
Sets the creation date for this Video. |
void |
setCuePoints(java.util.List<CuePoint> cuePoints)
Sets the cue points for this Video. |
void |
setCustomFields(java.util.List<CustomField> customFields)
Sets the custom fields for this Video. |
void |
setEconomics(EconomicsEnum economics)
Sets the economics for this Video. |
void |
setEndDate(java.util.Date endDate)
Sets the end date for this Video. |
void |
setFlvUrl(java.lang.String flvUrl)
Sets the FLV URL for this Video. |
void |
setGeoFiltered(java.lang.Boolean geoFiltered)
Sets the geo filtered state for this Video. |
void |
setGeoFilteredCountries(java.util.List<GeoFilterCodeEnum> geoFilteredCountries)
Sets the geo-filtered countries for this Video. |
void |
setGeoFilteredExclude(java.lang.Boolean geoFilteredExclude)
Sets the geo filtered exclude state for this Video. |
void |
setId(java.lang.Long id)
Sets the id for this Video. |
void |
setItemState(ItemStateEnum itemState)
Sets the item state for this Video. |
void |
setLastModifiedDate(java.util.Date lastModifiedDate)
Sets the last modified date for this Video. |
void |
setLength(java.lang.Long length)
Sets the length for this Video. |
void |
setLinkText(java.lang.String linkText)
Sets the related link text for this Video. |
void |
setLinkUrl(java.lang.String linkUrl)
Sets the related link URL for this Video. |
void |
setLongDescription(java.lang.String longDescription)
Sets the long description for this Video. |
void |
setName(java.lang.String name)
Sets the name (title) for this Video. |
void |
setPlaysTotal(java.lang.Integer playsTotal)
Sets the plays total count for this Video. |
void |
setPlaysTrailingWeek(java.lang.Integer playsTrailingWeek)
Sets the plays trailing week count for this Video. |
void |
setPublishedDate(java.util.Date publishedDate)
Sets the published date for this Video. |
void |
setReferenceId(java.lang.String referenceId)
Sets the reference id for this Video. |
void |
setReleaseDate(java.util.Date releaseDate)
Sets the release date for this Video. |
void |
setRenditions(java.util.List<Rendition> renditions)
Sets the renditions for this Video. |
void |
setShortDescription(java.lang.String shortDescription)
Sets the short description for this Video. |
void |
setStartDate(java.util.Date startDate)
Sets the start date for this Video. |
void |
setTags(java.util.List<java.lang.String> tags)
Sets the keyword tags for this Video. |
void |
setThumbnailUrl(java.lang.String thumbnailUrl)
Sets the thumbnail URL for this Video. |
void |
setVideoFullLength(Rendition videoFullLength)
Sets the full length rendition for this Video. |
void |
setVideoStillUrl(java.lang.String videoStillUrl)
Sets the video still URL for this Video. |
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 Video()
Default Constructor.
All fields set to null to start - required fields must be set before calling Write Media API.
public Video(java.lang.String json) throws JSONException
Constructor using JSON string.
Given a JSON string from the Media API, attempts to construct a new Video object and fill out all of the fields defined. All other fields will be null.
JSONException
public Video(JSONObject jsonObj) throws JSONException
Constructor using JSON object.
Given a JSON object from the Media API, attempts to construct a new Video object and fill out all of the fields defined. All other fields will be null.
JSONException
Method Detail |
---|
public void initAll()
Fully initializes the video object by setting all fields to null
public java.lang.String getName()
Gets the name (title) for this Video.
The title of this Video, limited to 60 characters. The name is a required property when you create a video.
public java.lang.Long getId()
Gets the id for this Video.
A number that uniquely identifies this Video, assigned by Brightcove when the Video is created.
public java.lang.String getReferenceId()
Gets the reference id for this Video.
A user-specified id that uniquely identifies this Video, limited to 150 characters. A referenceID can be used as a foreign-key to identify this video in another system.
public java.lang.Long getAccountId()
Gets the account id for this Video.
A number, assigned by Brightcove, that uniquely identifies the account to which this Video belongs.
public java.lang.String getShortDescription()
Gets the short description for this Video.
A short description describing this Video, limited to 250 characters. The shortDescription is a required property when you create a video.
public java.lang.String getLongDescription()
Gets the long description for this Video.
A longer description of this Video, limited to 5000 characters.
public java.lang.String getFlvUrl()
Gets the FLV URL for this Video.
The URL of the video file for this Video. Note that this property can be accessed with the Media API only with a special read or write token. This property applies, no matter whether the video's encoding is FLV (VP6) or MP4 (H.264). See Accessing Video Content with the Media API.
public java.util.Date getCreationDate()
Gets the creation date for this Video.
The date this Video was created, represented as the number of milliseconds since the UNIX epoch.
public java.util.Date getPublishedDate()
Gets the published date for this Video.
The date this Video was last made active, represented as the number of milliseconds since the Unix epoch.
public java.util.Date getLastModifiedDate()
Gets the last modified date for this Video.
The date this Video was last modified, represented as the number of milliseconds since the Unix epoch.
public java.util.Date getReleaseDate()
Gets the release date for this Video.
Note: This field is undocumented in the BC documentation as of 2009/10/06, but does appear on videos in some accounts.
public java.util.Date getStartDate()
Gets the start date for this Video.
The first date this Video is available to be played, represented as the number of milliseconds since the Unix epoch.
public java.util.Date getEndDate()
Gets the end date for this Video.
The last date this Video is available to be played, represented as the number of milliseconds since the Unix epoch.
public java.lang.String getLinkUrl()
Gets the related link URL for this Video.
An optional URL to a related item, limited to 150 characters.
public java.lang.String getLinkText()
Gets the related link text for this Video.
The text displayed for the linkURL, limited to 40 characters.
public java.lang.String getVideoStillUrl()
Gets the video still URL for this Video.
The URL to the video still image associated with this Video. Video stills are 480x360 pixels.
public java.lang.String getThumbnailUrl()
Gets the thumbnail URL for this Video.
The URL to the thumbnail image associated with this Video. Thumbnails are 120x90 pixels.
public java.lang.Long getLength()
Gets the length for this Video.
The length of this video in milliseconds.
public java.lang.Boolean getGeoFiltered()
Gets the geo filtered state for this Video.
True indicates that the video is geo-restricted.
public java.lang.Boolean getGeoFilteredExclude()
Gets the geo filtered exclude state for this Video.
If true, the video can be viewed in all countries except those listed in geoFilteredCountries; if false, the video can be viewed only in the countries listed in geoFilteredCountries.
public java.lang.Integer getPlaysTotal()
Gets the plays total count for this Video.
How many times this Video has been played since its creation.
public java.lang.Integer getPlaysTrailingWeek()
Gets the plays trailing week count for this Video.
How many times this Video has been played within the past seven days, exclusive of today.
public java.util.List<Rendition> getRenditions()
Gets the renditions for this Video.
An array of Renditions that represent the dynamic delivery renditions available for this Video. A Video should have not more than 10 Renditions. Note that this property can be accessed with the Media API only with a special read or write token. See Accessing Video Content with the Media API.
public Rendition getVideoFullLength()
Gets the full length rendition for this Video.
A single Rendition that represents the the video file for this Video. Note that this property can be accessed with the Media API only with a special read or write token. See Accessing Video Content with the Media API.
public ItemStateEnum getItemState()
Gets the item state for this Video.
An ItemStateEnum. One of ACTIVE, INACTIVE, or DELETED. You can set this property only to ACTIVE or INACTIVE; you cannot delete a video by setting its itemState to DELETED.
public java.util.List<java.lang.String> getTags()
Gets the keyword tags for this Video.
A list of Strings representing the tags assigned to this Video. Each tag can be not more than 64 characters, and a video can have no more than 1200 tags.
public EconomicsEnum getEconomics()
Gets the economics for this Video.
An EconomicsEnum. Either FREE or AD_SUPPORTED. AD_SUPPORTED means that ad requests are enabled for this Video.
public java.util.List<GeoFilterCodeEnum> getGeoFilteredCountries()
Gets the geo-filtered countries for this Video.
A list of the ISO-3166 two-letter codes of the countries to enforce geo-restriction rules on. Use lowercase for the country codes.
public java.util.List<CuePoint> getCuePoints()
Gets the cue points for this Video.
A List of the CuePoints objects assigned to this Video.
public java.util.List<CustomField> getCustomFields()
Gets the custom fields for this Video.
This feature is not explicitly documented in the Brightcove documentation
public void setName(java.lang.String name)
Sets the name (title) for this Video.
The title of this Video, limited to 60 characters. The name is a required property when you create a video.
name
- Name of the Videopublic void setId(java.lang.Long id)
Sets the id for this Video.
A number that uniquely identifies this Video, assigned by Brightcove when the Video is created.
id
- The id for this Videopublic void setReferenceId(java.lang.String referenceId)
Sets the reference id for this Video.
A user-specified id that uniquely identifies this Video, limited to 150 characters. A referenceID can be used as a foreign-key to identify this video in another system.
referenceId
- Reference id for this Videopublic void setAccountId(java.lang.Long accountId)
Sets the account id for this Video.
A number, assigned by Brightcove, that uniquely identifies the account to which this Video belongs.
accountId
- Account id for this Videopublic void setShortDescription(java.lang.String shortDescription)
Sets the short description for this Video.
A short description describing this Video, limited to 250 characters. The shortDescription is a required property when you create a video.
shortDescription
- Short description for this Videopublic void setLongDescription(java.lang.String longDescription)
Sets the long description for this Video.
A longer description of this Video, limited to 5000 characters.
longDescription
- Long description for this Videopublic void setFlvUrl(java.lang.String flvUrl)
Sets the FLV URL for this Video.
The URL of the video file for this Video. Note that this property can be accessed with the Media API only with a special read or write token. This property applies, no matter whether the video's encoding is FLV (VP6) or MP4 (H.264). See Accessing Video Content with the Media API.
flvUrl
- FLV URL for this Videopublic void setCreationDate(java.util.Date creationDate)
Sets the creation date for this Video.
The date this Video was created, represented as the number of milliseconds since the UNIX epoch.
creationDate
- Creation date for this Videopublic void setPublishedDate(java.util.Date publishedDate)
Sets the published date for this Video.
The date this Video was last made active, represented as the number of milliseconds since the Unix epoch.
publishedDate
- Published date for this Videopublic void setLastModifiedDate(java.util.Date lastModifiedDate)
Sets the last modified date for this Video.
The date this Video was last modified, represented as the number of milliseconds since the Unix epoch.
lastModifiedDate
- Last modified date for this Videopublic void setReleaseDate(java.util.Date releaseDate)
Sets the release date for this Video.
Note: This field is undocumented in the BC documentation as of 2009/10/06, but does appear on videos in some accounts.
releaseDate
- Release date for this Videopublic void setStartDate(java.util.Date startDate)
Sets the start date for this Video.
The first date this Video is available to be played, represented as the number of milliseconds since the Unix epoch.
startDate
- Start date for this Videopublic void setEndDate(java.util.Date endDate)
Sets the end date for this Video.
The last date this Video is available to be played, represented as the number of milliseconds since the Unix epoch.
endDate
- End date for this Videopublic void setLinkUrl(java.lang.String linkUrl)
Sets the related link URL for this Video.
An optional URL to a related item, limited to 150 characters.
linkUrl
- Link URL for this Videopublic void setLinkText(java.lang.String linkText)
Sets the related link text for this Video.
The text displayed for the linkURL, limited to 40 characters.
linkText
- Link text for this Videopublic void setVideoStillUrl(java.lang.String videoStillUrl)
Sets the video still URL for this Video.
The URL to the video still image associated with this Video. Video stills are 480x360 pixels.
videoStillUrl
- Video still URL for this Videopublic void setThumbnailUrl(java.lang.String thumbnailUrl)
Sets the thumbnail URL for this Video.
The URL to the thumbnail image associated with this Video. Thumbnails are 120x90 pixels.
thumbnailUrl
- Thumbnail URL for this Videopublic void setLength(java.lang.Long length)
Sets the length for this Video.
The length of this video in milliseconds.
length
- Length for this Videopublic void setGeoFiltered(java.lang.Boolean geoFiltered)
Sets the geo filtered state for this Video.
True indicates that the video is geo-restricted.
geoFiltered
- Geo filtered state for this Videopublic void setGeoFilteredExclude(java.lang.Boolean geoFilteredExclude)
Sets the geo filtered exclude state for this Video.
If true, the video can be viewed in all countries except those listed in geoFilteredCountries; if false, the video can be viewed only in the countries listed in geoFilteredCountries.
geoFilteredExclude
- Geo filtered exclude state for this Videopublic void setPlaysTotal(java.lang.Integer playsTotal)
Sets the plays total count for this Video.
How many times this Video has been played since its creation.
playsTotal
- Plays total count for this Videopublic void setPlaysTrailingWeek(java.lang.Integer playsTrailingWeek)
Sets the plays trailing week count for this Video.
How many times this Video has been played within the past seven days, exclusive of today.
playsTrailingWeek
- Plays trailing week count for this Videopublic void setRenditions(java.util.List<Rendition> renditions)
Sets the renditions for this Video.
An array of Renditions that represent the dynamic delivery renditions available for this Video. A Video should have not more than 10 Renditions. Note that this property can be accessed with the Media API only with a special read or write token. See Accessing Video Content with the Media API.
renditions
- List of renditions for this Videopublic void setVideoFullLength(Rendition videoFullLength)
Sets the full length rendition for this Video.
A single Rendition that represents the the video file for this Video. Note that this property can be accessed with the Media API only with a special read or write token. See Accessing Video Content with the Media API.
videoFullLength
- The full length rendition for this Videopublic void setItemState(ItemStateEnum itemState)
Sets the item state for this Video.
An ItemStateEnum. One of ACTIVE, INACTIVE, or DELETED. You can set this property only to ACTIVE or INACTIVE; you cannot delete a video by setting its itemState to DELETED.
itemState
- The item state for this Videopublic void setTags(java.util.List<java.lang.String> tags)
Sets the keyword tags for this Video.
A list of Strings representing the tags assigned to this Video. Each tag can be not more than 64 characters, and a video can have no more than 1200 tags.
tags
- The keyword tags for this Videopublic void setEconomics(EconomicsEnum economics)
Sets the economics for this Video.
An EconomicsEnum. Either FREE or AD_SUPPORTED. AD_SUPPORTED means that ad requests are enabled for this Video.
economics
- The economics for this Videopublic void setGeoFilteredCountries(java.util.List<GeoFilterCodeEnum> geoFilteredCountries)
Sets the geo-filtered countries for this Video.
A list of the ISO-3166 two-letter codes of the countries to enforce geo-restriction rules on. Use lowercase for the country codes.
geoFilteredCountries
- The geo-filtered countries for this Videopublic void setCuePoints(java.util.List<CuePoint> cuePoints)
Sets the cue points for this Video.
A List of the CuePoints objects assigned to this Video.
cuePoints
- The cue points for this Videopublic void setCustomFields(java.util.List<CustomField> customFields)
Sets the custom fields for this Video.
This feature is not explicitly documented in the Brightcove documentation
customFields
- The list of custom fields to use for this videopublic 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 All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |