|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.silverpeas.comment.web.CommentEntity
public class CommentEntity
The comment entity is a comment object that is exposed in the web as an entity (web entity). As such, it publishes only some of its attributes It represents a comment in Silverpeas plus some additional information such as the URI for accessing it.
Constructor Summary | |
---|---|
protected |
CommentEntity()
|
protected |
CommentEntity(Comment comment)
|
Method Summary | |
---|---|
boolean |
equals(Object obj)
|
static CommentEntity |
fromComment(Comment comment)
Creates a new comment entity from the specified comment. |
static List<CommentEntity> |
fromComments(Comment... comments)
Creates several new comment entities from the specified comments. |
static List<CommentEntity> |
fromComments(List<Comment> comments)
Creates several new comment entities from the specified list of comments. |
UserProfileEntity |
getAuthor()
Gets the user that has written this comment. |
String |
getComponentId()
Gets the identifier of the Silverpeas component instance to which the commented content belongs. |
String |
getCreationDate()
Gets the date at which the comment was created. |
String |
getCurrentUserLanguage()
Gets the current user language. |
String |
getId()
Gets the unique identifier of the comment. |
String |
getModificationDate()
Gets the date at which the comment was lastly updated. |
String |
getResourceId()
Gets the identifier of the resource that is commented by this. |
String |
getResourceType()
Gets the type of the resource that is commented by this. |
String |
getText()
Gets the text of the comment. |
String |
getTextForHtml()
Gets the text encoded for HTLML of the comment. |
URI |
getURI()
Gets the URI of this comment entity. |
int |
hashCode()
|
boolean |
isIndexed()
Is this comment indexed? |
CommentEntity |
newText(String aText)
Changes the text of this comment by the specified one. |
Comment |
toComment()
Gets the comment business objet this entity represent. |
CommentEntity |
withCurrentUserLanguage(String currentUserLanguage)
Sets a currentUserLanguage to this entity. |
CommentEntity |
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 |
---|
protected CommentEntity(Comment comment)
protected CommentEntity()
Method Detail |
---|
public static CommentEntity fromComment(Comment comment)
comment
- the comment to entitify.
public static List<CommentEntity> fromComments(Comment... comments)
comments
- the comments to entitify.
public static List<CommentEntity> fromComments(List<Comment> comments)
comments
- the list of comments to entitify.
public Comment toComment()
public CommentEntity withURI(URI uri)
uri
- the web entity URI.
public URI getURI()
getURI
in interface Exposable
public String getId()
public String getComponentId()
public String getResourceType()
public String getResourceId()
public UserProfileEntity getAuthor()
public String getText()
public String getTextForHtml()
public String getCurrentUserLanguage()
public CommentEntity withCurrentUserLanguage(String currentUserLanguage)
currentUserLanguage
- the language of the current user.
public String getCreationDate()
public String getModificationDate()
public boolean isIndexed()
public CommentEntity newText(String aText)
aText
- the new text.
public boolean equals(Object obj)
equals
in class Object
public int hashCode()
hashCode
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |