Class 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 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 org.silverpeas.core.webapi.attachment.AttachmentEntity[] getAttachments()
      • getURI

        public URI getURI()
        Specified by:
        getURI in interface org.silverpeas.core.web.rs.WebEntity
      • 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​(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.