com.endeca.infront.cartridge.model
Class MediaObject

java.lang.Object
  extended by com.endeca.infront.cartridge.model.MediaObject

public class MediaObject
extends Object

A generic media object that could represent an image or a video.


Constructor Summary
MediaObject()
           
 
Method Summary
 int getContentBytes()
           
 int getContentHeight()
           
 String getContentSrcKey()
          Gets the key that will be used to identify the content source of the object.
 String getContentType()
           
 int getContentWidth()
           
 String getUri()
           
 void setContentBytes(int bytes)
          Sets the size of the media object in bytes.
 void setContentHeight(int height)
          If the media object is an image, it sets the image height.
 void setContentSrcKey(String contentSrcKey)
          Sets the content source key that should be used to retrieve this media object.
 void setContentType(String contentType)
          Sets the content type of this MediaObject.
 void setContentWidth(int width)
          If the media object is an image, it sets the image width.
 void setUri(String uri)
          Sets the URI to get this media object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MediaObject

public MediaObject()
Method Detail

getContentType

public String getContentType()
Returns:
The MIME content type of the media object null.

setContentType

public void setContentType(String contentType)
Sets the content type of this MediaObject. Examples: audio/mpeg, image/jpeg.

Parameters:
contentType -

getContentSrcKey

public String getContentSrcKey()
Gets the key that will be used to identify the content source of the object. This key should be used for the map that contains the different systems that holds the media assets.

Returns:
The key of the content source of the media object or null.

setContentSrcKey

public void setContentSrcKey(String contentSrcKey)
Sets the content source key that should be used to retrieve this media object.

Parameters:
contentSrcKey - the content source key

getUri

public String getUri()
Returns:
The URI of the media object or null.

setUri

public void setUri(String uri)
Sets the URI to get this media object.

Parameters:
uri - the URI

getContentWidth

public int getContentWidth()
Returns:
The image width or null.

setContentWidth

public void setContentWidth(int width)
If the media object is an image, it sets the image width.

Parameters:
width - the image width

getContentHeight

public int getContentHeight()
Returns:
The image height or null.

setContentHeight

public void setContentHeight(int height)
If the media object is an image, it sets the image height.

Parameters:
height - the image height

getContentBytes

public int getContentBytes()
Returns:
The size of the media object or null.

setContentBytes

public void setContentBytes(int bytes)
Sets the size of the media object in bytes.

Parameters:
bytes - the size of the media object


Copyright © 2012, Oracle and/or its affiliates. All rights reserved.