com.silverpeas.questionReply.web
Class ReplyEntity

java.lang.Object
  extended by com.silverpeas.questionReply.web.ReplyEntity
All Implemented Interfaces:
com.silverpeas.web.Exposable, Serializable

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

Author:
emmanuel.hugonnet@silverpeas.org
See Also:
Serialized Form

Constructor Summary
protected ReplyEntity()
           
 
Method Summary
 boolean equals(Object obj)
           
static List<ReplyEntity> fromReplies(Iterable<Reply> replies, String lang)
          Creates several new reply entities from the specified list of replies.
static List<ReplyEntity> fromReplies(Reply... replies)
          Creates several new reply entities from the specified replies.
static ReplyEntity fromReply(Reply reply, String lang)
          Creates a new reply entity from the specified reply.
 com.silverpeas.attachment.web.AttachmentEntity[] getAttachments()
           
 String getContent()
           
 String getCreationDate()
           
 String getCreatorId()
           
 String getCreatorName()
           
 String getId()
           
 String getLanguage()
           
 String getTitle()
           
 URI getURI()
           
 int hashCode()
           
 boolean isPrivateReply()
           
 boolean isPublicReply()
           
 Reply toReply()
          Gets the reply business objet this entity represent.
 String toString()
           
 ReplyEntity withAttachments(Collection<org.silverpeas.attachment.model.SimpleDocument> attachmentDetails)
          Sets a URI to this entity.
 ReplyEntity withProfile(com.stratelia.webactiv.SilverpeasRole profile)
          Sets the accessing user profile to this entity.
 ReplyEntity withURI(URI uri)
          Sets a URI to this entity.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ReplyEntity

protected ReplyEntity()
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 com.silverpeas.attachment.web.AttachmentEntity[] getAttachments()

getURI

public URI getURI()
Specified by:
getURI in interface com.silverpeas.web.Exposable

equals

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

hashCode

public int hashCode()
Overrides:
hashCode in class Object

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(Reply... replies)
Creates several new reply entities from the specified replies.

Parameters:
replies - the replies to entitify.
Returns:
a list of entities representing each of then one of the specified replies.

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.attachment.model.SimpleDocument> attachmentDetails)
Sets a URI to this entity. With this URI, it can then be accessed through the Web.

Parameters:
attachmentDetails -
Returns:
itself.

withProfile

public ReplyEntity withProfile(com.stratelia.webactiv.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.

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2016 Silverpeas. All Rights Reserved.