Class EventComment

java.lang.Object
org.opencastproject.event.comment.EventComment

public final class EventComment extends Object
Business object for comments.
  • Field Details

    • REASON_NEEDS_CUTTING

      public static final String REASON_NEEDS_CUTTING
      The key for the reason that the video needs cutting
      See Also:
  • Method Details

    • create

      public static EventComment create(org.opencastproject.util.data.Option<Long> id, String eventId, String organization, String text, org.opencastproject.security.api.User author)
      Creates a simple comment
      Parameters:
      id - the optional identifier
      text - the text
      author - the author of the comment
      Throws:
      IllegalArgumentException - if id, text or author is not set
    • create

      public static EventComment create(org.opencastproject.util.data.Option<Long> id, String eventId, String organization, String text, org.opencastproject.security.api.User author, String reason, boolean resolvedStatus)
      Creates a complex comment
      Parameters:
      id - the optional identifier
      text - the text
      author - the author of the comment
      reason - the comment reason
      resolvedStatus - whether the comment is resolved
      Throws:
      IllegalArgumentException - if id, text, or author is not set
    • create

      public static EventComment create(org.opencastproject.util.data.Option<Long> id, String eventId, String organization, String text, org.opencastproject.security.api.User author, String reason, boolean resolvedStatus, Date creationDate, Date modificationDate)
      Creates a complex comment
      Parameters:
      id - the optional identifier
      text - the text
      author - the author of the comment
      reason - the comment reason
      resolvedStatus - whether the comment is resolved
      creationDate - the creation date
      modificationDate - the modification date
      resolvedStatus - whether the comment is resolved
      Throws:
      IllegalArgumentException - if id, text, author, creation date or modification date is not set
    • create

      public static EventComment create(org.opencastproject.util.data.Option<Long> id, String eventId, String organization, String text, org.opencastproject.security.api.User author, String reason, boolean resolvedStatus, Date creationDate, Date modificationDate, List<EventCommentReply> replies)
      Creates a complex comment
      Parameters:
      id - the optional identifier
      text - the text
      author - the author of the comment
      reason - the comment reason
      resolvedStatus - whether the comment is resolved
      creationDate - the creation date
      modificationDate - the modification date
      replies - the replies
      resolvedStatus - whether the comment is resolved
      Throws:
      IllegalArgumentException - if id, text, author, creation date, modification date or replies is not set
    • getId

      public org.opencastproject.util.data.Option<Long> getId()
      Returns the comment id
      Returns:
      the id
    • getEventId

      public String getEventId()
    • setEventId

      public void setEventId(String eventId)
    • getOrganization

      public String getOrganization()
    • setOrganization

      public void setOrganization(String organization)
    • getText

      public String getText()
      Returns the text
      Returns:
      the text
    • getCreationDate

      public Date getCreationDate()
      Returns the creation date
      Returns:
      the creation date
    • getModificationDate

      public Date getModificationDate()
      Returns the modification date
      Returns:
      the modification date
    • getAuthor

      public org.opencastproject.security.api.User getAuthor()
      Returns the author
      Returns:
      the author
    • getReason

      public String getReason()
      Returns the reason
      Returns:
      the reason
    • isResolvedStatus

      public boolean isResolvedStatus()
      Returns whether the status is resolved
      Returns:
      whether the status is resolved
    • getReplies

      public List<EventCommentReply> getReplies()
      Returns the comment replies
      Returns:
      the comment replies
    • addReply

      public boolean addReply(EventCommentReply reply)
      Add a reply to the comment
      Parameters:
      reply - the reply to add to this comment
      Returns:
      true if this collection changed as a result of the call
    • removeReply

      public boolean removeReply(EventCommentReply reply)
      Remove a reply from the comment
      Parameters:
      reply - the reply to remove from this comment
      Returns:
      true if this collection changed as a result of the call
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toJson

      public org.opencastproject.util.Jsons.Obj toJson()