org.silverpeas.resourcesmanager.web
Class ResourceEntity

java.lang.Object
  extended by org.silverpeas.resourcesmanager.web.ResourceEntity
All Implemented Interfaces:
com.silverpeas.web.Exposable, Serializable
Direct Known Subclasses:
ReservedResourceEntity

public class ResourceEntity
extends Object
implements com.silverpeas.web.Exposable

Web entity abstraction which provides common event informations of the entity

Author:
Yohann Chastagnier
See Also:
Serialized Form

Constructor Summary
protected ResourceEntity()
           
protected ResourceEntity(Resource resource)
           
 
Method Summary
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>
T
withCategoryURI(URI categoryURI)
           
<T extends ResourceEntity>
T
withURI(URI uri)
          Sets a URI to this entity.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

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 interface com.silverpeas.web.Exposable

getCategoryURI

public URI getCategoryURI()

getId

public Long getId()

getName

public String getName()

getDescription

public String getDescription()

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

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


Copyright © 2016 Silverpeas. All Rights Reserved.