Class AbstractMediaEntity<T extends AbstractMediaEntity<T>>

java.lang.Object
org.silverpeas.components.gallery.web.AbstractMediaEntity<T>
All Implemented Interfaces:
Serializable, org.silverpeas.core.web.rs.WebEntity
Direct Known Subclasses:
PhotoEntity, SoundEntity, StreamingEntity, VideoEntity

public abstract class AbstractMediaEntity<T extends AbstractMediaEntity<T>> extends Object implements org.silverpeas.core.web.rs.WebEntity
Web entity abstraction which provides common media information of the entity
Author:
Yohann Chastagnier
See Also:
  • Constructor Details

    • AbstractMediaEntity

      protected AbstractMediaEntity(Media media)
      Instantiating a new web entity from the corresponding data
      Parameters:
      media - the media
    • AbstractMediaEntity

      protected AbstractMediaEntity()
  • Method Details

    • withURI

      public T withURI(URI uri)
      Sets a URI to this entity. With this URI, it can then be accessed through the Web.
      Parameters:
      uri - the web entity URI.
      Returns:
      itself.
    • withParentURI

      public T withParentURI(URI parentURI)
      Sets a parentURI to this entity.
      Parameters:
      parentURI - the parent web entity URI.
      Returns:
      itself.
    • withOriginalUrl

      public T withOriginalUrl(URI originalUrl)
    • withThumbUrl

      public T withThumbUrl(URI thumbUrl)
    • withWidth

      public T withWidth(int width)
    • withHeight

      public T withHeight(int height)
    • getURI

      public URI getURI()
      Specified by:
      getURI in interface org.silverpeas.core.web.rs.WebEntity
    • getParentURI

      protected URI getParentURI()
    • setType

      public void setType(MediaType type)
    • getType

      public MediaType getType()
    • setId

      protected void setId(String id)
    • getId

      protected String getId()
    • setTitle

      protected void setTitle(String title)
    • getTitle

      protected String getTitle()
    • setDescription

      protected void setDescription(String description)
    • getDescription

      protected String getDescription()
    • setAuthor

      protected void setAuthor(String author)
    • getAuthor

      protected String getAuthor()
    • getThumbUrl

      public URI getThumbUrl()
      Returns:
      the thumbUrl
    • getUrl

      public URI getUrl()
      Returns:
      the url
    • getHeight

      public int getHeight()
      Returns:
      the height
    • getWidth

      public int getWidth()
      Returns:
      the width
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object