Package org.silverpeas.components.questionreply.web

# 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
  `protected`
  `ReplyEntity()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `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 ReplyEntity`
  `fromReply(Reply reply, String lang)`
  Creates a new reply entity from the specified reply.
  `org.silverpeas.core.webapi.attachment.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.core.contribution.attachment.model.SimpleDocument> attachmentDetails)`
  Sets a URI to this entity.
  `ReplyEntity`
  `withProfile(org.silverpeas.core.admin.user.model.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 Details

  - ### ReplyEntity

    protected ReplyEntity()

- ## Method Details

  - ### 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`

  - ### 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(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.

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`