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 informations of the entity- Author:
- Yohann Chastagnier
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractMediaEntity()protectedAbstractMediaEntity(Media media)Instantiating a new web entity from the corresponding data
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)protected StringgetAuthor()protected StringgetDescription()intgetHeight()protected StringgetId()protected URIgetParentURI()URIgetThumbUrl()protected StringgetTitle()MediaTypegetType()URIgetURI()URIgetUrl()intgetWidth()inthashCode()protected voidsetAuthor(String author)protected voidsetDescription(String description)protected voidsetId(String id)protected voidsetTitle(String title)voidsetType(MediaType type)TwithHeight(int height)TwithOriginalUrl(URI originalUrl)TwithParentURI(URI parentURI)Sets a parentURI to this entity.TwithThumbUrl(URI thumbUrl)TwithURI(URI uri)Sets a URI to this entity.TwithWidth(int width)
-
-
-
Constructor Detail
-
AbstractMediaEntity
protected AbstractMediaEntity(Media media)
Instantiating a new web entity from the corresponding data- Parameters:
media- the media
-
AbstractMediaEntity
protected AbstractMediaEntity()
-
-
Method Detail
-
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.
-
withWidth
public T withWidth(int width)
-
withHeight
public T withHeight(int height)
-
getURI
public URI getURI()
- Specified by:
getURIin interfaceorg.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
-
-