|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.brightcove.proserve.mediaapi.wrapper.apiobjects.Image
public class Image
Represents an Image object to/from the Media API.
From the Brightcove documentation on 2009/08/18 (http://support.brightcove.com/en/docs/media-api-objects-reference):
This object represents metadata about an image file in your account. Images are associated with videos as thumbnail images or video still images. An image can be a JPEG, GIF, or PNG-formatted image. Note that when creating a new image asset, the only property that is required is type. If you are not uploading a file, the remoteUrl property is also required. For more information, see Adding Images to Videos with the Media API.
property name | type | read only? | description |
---|---|---|---|
id | long | yes | A number that uniquely identifies this Image. This id is automatically assigned by Brightcove when the Image is created. |
referenceId | String | no | A user-specified id that uniquely identifies this Image. |
type | ImageTypeEnum | no | THUMBNAIL or VIDEO_STILL. The type is writable and required when you create an Image; it cannot subsequently be changed. |
remoteUrl | String | no | The URL of a remote image file. This property is required if you are not uploading a file for the image asset. |
displayName | String | no | The name of the asset, which will be displayed in the Media module. |
Constructor Summary | |
---|---|
Image()
Default Constructor. |
|
Image(JSONObject jsonObj)
Constructor using JSON object. |
|
Image(java.lang.String json)
Constructor using JSON string. |
Method Summary | |
---|---|
java.lang.String |
getDisplayName()
Gets the display name for this Image. |
java.lang.Long |
getId()
Gets the id for this Image. |
java.lang.String |
getReferenceId()
Gets the reference id for this Image. |
java.lang.String |
getRemoteUrl()
Gets the remote URL for this Image. |
ImageTypeEnum |
getType()
Gets the type for this Image. |
void |
initAll()
Fully initializes the video object by setting all fields to null |
void |
setDisplayName(java.lang.String displayName)
Sets the display name for this Image. |
void |
setId(java.lang.Long id)
Sets the id for this Image. |
void |
setReferenceId(java.lang.String referenceId)
Sets the reference id for this Image. |
void |
setRemoteUrl(java.lang.String remoteUrl)
Sets the remote URL for this Image. |
void |
setType(ImageTypeEnum type)
Sets the type for this Image. |
JSONObject |
toJson()
Converts the image 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 Image()
Default Constructor.
All fields set to null to start - required fields must be set before calling Write Media API.
public Image(java.lang.String json) throws JSONException
Constructor using JSON string.
Given a JSON string from the Media API, attempts to construct a new Image object and fill out all of the fields defined. All other fields will be null.
JSONException
public Image(JSONObject jsonObj) throws JSONException
Constructor using JSON object.
Given a JSON object from the Media API, attempts to construct a new Image 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.Long getId()
Gets the id for this Image.
A number that uniquely identifies this Image. This id is automatically assigned by Brightcove when the Image is created.
public java.lang.String getReferenceId()
Gets the reference id for this Image.
A user-specified id that uniquely identifies this Image.
public ImageTypeEnum getType()
Gets the type for this Image.
THUMBNAIL or VIDEO_STILL. The type is writable and required when you create an Image; it cannot subsequently be changed.
public java.lang.String getRemoteUrl()
Gets the remote URL for this Image.
The URL of a remote image file. This property is required if you are not uploading a file for the image asset.
public java.lang.String getDisplayName()
Gets the display name for this Image.
The name of the asset, which will be displayed in the Media module.
public void setId(java.lang.Long id)
Sets the id for this Image.
A number that uniquely identifies this Image. This id is automatically assigned by Brightcove when the Image is created.
id
- The id for this Imagepublic void setReferenceId(java.lang.String referenceId)
Sets the reference id for this Image.
A user-specified id that uniquely identifies this Image.
referenceId
- Reference id for this Imagepublic void setType(ImageTypeEnum type)
Sets the type for this Image.
THUMBNAIL or VIDEO_STILL. The type is writable and required when you create an Image; it cannot subsequently be changed.
type
- Type for this Imagepublic void setRemoteUrl(java.lang.String remoteUrl)
Sets the remote URL for this Image.
The URL of a remote image file. This property is required if you are not uploading a file for the image asset.
remoteUrl
- Remote URL for this Imagepublic void setDisplayName(java.lang.String displayName)
Sets the display name for this Image.
The name of the asset, which will be displayed in the Media module.
displayName
- Display name for this Imagepublic JSONObject toJson() throws JSONException
Converts the image 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 |