com.silverpeas.gallery.web
Class StreamingProviderDataEntity

java.lang.Object
  extended by com.silverpeas.gallery.web.StreamingProviderDataEntity
All Implemented Interfaces:
com.silverpeas.web.Exposable, Serializable
Direct Known Subclasses:
DailymotionDataEntity, SoundcloudDataEntity, VimeoDataEntity, YoutubeDataEntity

public abstract class StreamingProviderDataEntity
extends Object
implements com.silverpeas.web.Exposable

This entity ensures that all streaming data are formatted in a single way whatever the streaming provider.

Author:
Yohann Chastagnier
See Also:
Serialized Form

Constructor Summary
protected StreamingProviderDataEntity()
           
protected StreamingProviderDataEntity(StreamingProvider streamingProvider, org.json.JSONObject oembedData)
          Constructor from oembed data (http://oembed.com).
 
Method Summary
static StreamingProviderDataEntity from(String homepageUrl)
          Creates a streaming provider data entity from specified homepage url.
 String getAuthor()
           
 org.silverpeas.media.web.MediaDefinitionEntity getDefinition()
           
 String getEmbedHtml()
           
 String getFormattedDurationHMS()
           
 StreamingProvider getProvider()
           
 org.silverpeas.media.web.MediaDefinitionEntity getThumbnailDefinition()
           
 List<URI> getThumbnailPreviewUrls()
           
 URI getThumbnailUrl()
           
 String getTitle()
           
 URI getURI()
           
 void setAuthor(String author)
           
 void setDefinition(org.silverpeas.media.web.MediaDefinitionEntity definition)
           
 void setEmbedHtml(String embedHtml)
           
 void setFormattedDurationHMS(String formattedDurationHMS)
           
 void setProvider(StreamingProvider provider)
           
 void setThumbnailDefinition(org.silverpeas.media.web.MediaDefinitionEntity thumbnailDefinition)
           
 void setThumbnailPreviewUrls(List<URI> thumbnailPreviewUrls)
           
 void setThumbnailUrl(URI thumbnailUrl)
           
 void setTitle(String title)
           
 void setUri(URI uri)
           
 StreamingProviderDataEntity withURI(URI uri)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StreamingProviderDataEntity

protected StreamingProviderDataEntity(StreamingProvider streamingProvider,
                                      org.json.JSONObject oembedData)
Constructor from oembed data (http://oembed.com).

Parameters:
streamingProvider - the Silverpeas provider identifier.
oembedData - the oembed data as JSON format.

StreamingProviderDataEntity

protected StreamingProviderDataEntity()
Method Detail

from

public static StreamingProviderDataEntity from(String homepageUrl)
Creates a streaming provider data entity from specified homepage url.

Parameters:
homepageUrl - the streaming home page url.
Returns:
the streaming provider data entity representing the specified streaming.

withURI

public StreamingProviderDataEntity withURI(URI uri)

getURI

public URI getURI()
Specified by:
getURI in interface com.silverpeas.web.Exposable

setUri

public void setUri(URI uri)

getProvider

public StreamingProvider getProvider()

setProvider

public void setProvider(StreamingProvider provider)

getTitle

public String getTitle()

setTitle

public void setTitle(String title)

getAuthor

public String getAuthor()

setAuthor

public void setAuthor(String author)

getFormattedDurationHMS

public String getFormattedDurationHMS()

setFormattedDurationHMS

public void setFormattedDurationHMS(String formattedDurationHMS)

getDefinition

public org.silverpeas.media.web.MediaDefinitionEntity getDefinition()

setDefinition

public void setDefinition(org.silverpeas.media.web.MediaDefinitionEntity definition)

getEmbedHtml

public String getEmbedHtml()

setEmbedHtml

public void setEmbedHtml(String embedHtml)

getThumbnailUrl

public URI getThumbnailUrl()

setThumbnailUrl

public void setThumbnailUrl(URI thumbnailUrl)

getThumbnailDefinition

public org.silverpeas.media.web.MediaDefinitionEntity getThumbnailDefinition()

setThumbnailDefinition

public void setThumbnailDefinition(org.silverpeas.media.web.MediaDefinitionEntity thumbnailDefinition)

getThumbnailPreviewUrls

public List<URI> getThumbnailPreviewUrls()

setThumbnailPreviewUrls

public void setThumbnailPreviewUrls(List<URI> thumbnailPreviewUrls)


Copyright © 2016 Silverpeas. All Rights Reserved.