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 Summary
ConstructorsModifierConstructorDescriptionprotectedprotectedAbstractMediaEntity(Media media) Instantiating a new web entity from the corresponding data -
Method Summary
Modifier and TypeMethodDescriptionbooleanprotected Stringprotected Stringintprotected StringgetId()protected URIprotected StringgetTitle()getType()getURI()getUrl()intgetWidth()inthashCode()protected voidprotected voidsetDescription(String description) protected voidprotected voidvoidwithHeight(int height) withOriginalUrl(URI originalUrl) withParentURI(URI parentURI) Sets a parentURI to this entity.withThumbUrl(URI thumbUrl) Sets a URI to this entity.withWidth(int width)
-
Constructor Details
-
AbstractMediaEntity
Instantiating a new web entity from the corresponding data- Parameters:
media- the media
-
AbstractMediaEntity
protected AbstractMediaEntity()
-
-
Method Details
-
withURI
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
Sets a parentURI to this entity.- Parameters:
parentURI- the parent web entity URI.- Returns:
- itself.
-
withOriginalUrl
-
withThumbUrl
-
withWidth
-
withHeight
-
getURI
- Specified by:
getURIin interfaceorg.silverpeas.core.web.rs.WebEntity
-
getParentURI
-
setType
-
getType
-
setId
-
getId
-
setTitle
-
getTitle
-
setDescription
-
getDescription
-
setAuthor
-
getAuthor
-
getThumbUrl
- Returns:
- the thumbUrl
-
getUrl
- Returns:
- the url
-
getHeight
public int getHeight()- Returns:
- the height
-
getWidth
public int getWidth()- Returns:
- the width
-
hashCode
public int hashCode() -
equals
-