Class ResourceEntity
- java.lang.Object
-
- org.silverpeas.components.resourcesmanager.web.ResourceEntity
-
- All Implemented Interfaces:
Serializable
,org.silverpeas.core.web.rs.WebEntity
- Direct Known Subclasses:
ReservedResourceEntity
public class ResourceEntity extends Object implements org.silverpeas.core.web.rs.WebEntity
Web entity abstraction which provides common event informations of the entity- Author:
- Yohann Chastagnier
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ResourceEntity()
protected
ResourceEntity(Resource resource)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ResourceEntity
createFrom(Resource resource)
Creates a new resource entity from the specified resource.boolean
equals(Object obj)
URI
getCategoryURI()
String
getDescription()
Long
getId()
String
getName()
URI
getURI()
int
hashCode()
<T extends ResourceEntity>
TwithCategoryURI(URI categoryURI)
<T extends ResourceEntity>
TwithURI(URI uri)
Sets a URI to this entity.
-
-
-
Constructor Detail
-
ResourceEntity
protected ResourceEntity(Resource resource)
-
ResourceEntity
protected ResourceEntity()
-
-
Method Detail
-
withURI
public <T extends ResourceEntity> 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.
-
withCategoryURI
public <T extends ResourceEntity> T withCategoryURI(URI categoryURI)
-
createFrom
public static ResourceEntity createFrom(Resource resource)
Creates a new resource entity from the specified resource.- Parameters:
resource
-- Returns:
- the entity representing the specified resource.
-
getURI
public URI getURI()
- Specified by:
getURI
in interfaceorg.silverpeas.core.web.rs.WebEntity
-
getCategoryURI
public URI getCategoryURI()
-
getId
public Long getId()
-
getName
public String getName()
-
getDescription
public String getDescription()
-
-