Class ReplyEntity
- java.lang.Object
-
- org.silverpeas.components.questionreply.web.ReplyEntity
-
- All Implemented Interfaces:
Serializable,org.silverpeas.core.web.rs.WebEntity
public class ReplyEntity extends Object implements org.silverpeas.core.web.rs.WebEntity
- Author:
- emmanuel.hugonnet@silverpeas.org
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedReplyEntity()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)static List<ReplyEntity>fromReplies(Iterable<Reply> replies, String lang)Creates several new reply entities from the specified list of replies.static ReplyEntityfromReply(Reply reply, String lang)Creates a new reply entity from the specified reply.org.silverpeas.core.webapi.attachment.AttachmentEntity[]getAttachments()StringgetContent()StringgetCreationDate()StringgetCreatorId()StringgetCreatorName()StringgetId()StringgetLanguage()StringgetTitle()URIgetURI()inthashCode()booleanisPrivateReply()booleanisPublicReply()ReplytoReply()Gets the reply business objet this entity represent.StringtoString()ReplyEntitywithAttachments(Collection<org.silverpeas.core.contribution.attachment.model.SimpleDocument> attachmentDetails)Sets a URI to this entity.ReplyEntitywithProfile(org.silverpeas.core.admin.user.model.SilverpeasRole profile)Sets the accessing user profile to this entity.ReplyEntitywithURI(URI uri)Sets a URI to this entity.
-
-
-
Method Detail
-
getContent
public String getContent()
-
getCreationDate
public String getCreationDate()
-
getCreatorId
public String getCreatorId()
-
getCreatorName
public String getCreatorName()
-
getId
public String getId()
-
isPrivateReply
public boolean isPrivateReply()
-
isPublicReply
public boolean isPublicReply()
-
getTitle
public String getTitle()
-
getLanguage
public String getLanguage()
-
getAttachments
public org.silverpeas.core.webapi.attachment.AttachmentEntity[] getAttachments()
-
getURI
public URI getURI()
- Specified by:
getURIin interfaceorg.silverpeas.core.web.rs.WebEntity
-
fromReply
public static ReplyEntity fromReply(Reply reply, String lang)
Creates a new reply entity from the specified reply.- Parameters:
reply- the reply to entitify.- Returns:
- the entity representing the specified reply.
-
fromReplies
public static List<ReplyEntity> fromReplies(Iterable<Reply> replies, String lang)
Creates several new reply entities from the specified list of replies.- Parameters:
replies- the list of replies to entitify.- Returns:
- a list of entities representing each of then one of the specified replies.
-
toReply
public Reply toReply()
Gets the reply business objet this entity represent.- Returns:
- a reply instance.
-
withURI
public ReplyEntity 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.
-
withAttachments
public ReplyEntity withAttachments(Collection<org.silverpeas.core.contribution.attachment.model.SimpleDocument> attachmentDetails)
Sets a URI to this entity. With this URI, it can then be accessed through the Web.- Parameters:
attachmentDetails- a collection of SimpleDocument- Returns:
- itself.
-
withProfile
public ReplyEntity withProfile(org.silverpeas.core.admin.user.model.SilverpeasRole profile)
Sets the accessing user profile to this entity. With this profile the status of this reply can be defined.- Parameters:
profile- the profile of the accessing user.- Returns:
- itself.
-
-