Class EventComment
java.lang.Object
org.opencastproject.event.comment.EventComment
Business object for comments.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe key for the reason that the video needs cutting -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddReply(EventCommentReply reply) Add a reply to the commentstatic EventCommentcreate(Optional<Long> id, String eventId, String organization, String text, org.opencastproject.security.api.User author) Creates a simple commentstatic EventCommentcreate(Optional<Long> id, String eventId, String organization, String text, org.opencastproject.security.api.User author, String reason, boolean resolvedStatus) Creates a complex commentstatic EventCommentcreate(Optional<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 commentstatic EventCommentcreate(Optional<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 commentbooleanorg.opencastproject.security.api.UserReturns the authorReturns the creation dategetId()Returns the comment idReturns the modification dateReturns the reasonReturns the comment repliesgetText()Returns the textinthashCode()booleanReturns whether the status is resolvedbooleanremoveReply(EventCommentReply reply) Remove a reply from the commentvoidsetEventId(String eventId) voidsetOrganization(String organization) org.opencastproject.util.Jsons.ObjtoJson()toString()
-
Field Details
-
REASON_NEEDS_CUTTING
The key for the reason that the video needs cutting- See Also:
-
-
Method Details
-
create
public static EventComment create(Optional<Long> id, String eventId, String organization, String text, org.opencastproject.security.api.User author) Creates a simple comment- Parameters:
id- the optional identifiertext- the textauthor- the author of the comment- Throws:
IllegalArgumentException- if id, text or author is not set
-
create
public static EventComment create(Optional<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 identifiertext- the textauthor- the author of the commentreason- the comment reasonresolvedStatus- whether the comment is resolved- Throws:
IllegalArgumentException- if id, text, or author is not set
-
create
public static EventComment create(Optional<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 identifiertext- the textauthor- the author of the commentreason- the comment reasonresolvedStatus- whether the comment is resolvedcreationDate- the creation datemodificationDate- the modification dateresolvedStatus- whether the comment is resolved- Throws:
IllegalArgumentException- if id, text, author, creation date or modification date is not set
-
create
public static EventComment create(Optional<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 identifiertext- the textauthor- the author of the commentreason- the comment reasonresolvedStatus- whether the comment is resolvedcreationDate- the creation datemodificationDate- the modification datereplies- the repliesresolvedStatus- whether the comment is resolved- Throws:
IllegalArgumentException- if id, text, author, creation date, modification date or replies is not set
-
getId
Returns the comment id- Returns:
- the id
-
getEventId
-
setEventId
-
getOrganization
-
setOrganization
-
getText
Returns the text- Returns:
- the text
-
getCreationDate
Returns the creation date- Returns:
- the creation 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
Returns the reason- Returns:
- the reason
-
isResolvedStatus
public boolean isResolvedStatus()Returns whether the status is resolved- Returns:
- whether the status is resolved
-
getReplies
Returns the comment replies- Returns:
- the comment replies
-
addReply
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
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
-
hashCode
public int hashCode() -
toString
-
toJson
public org.opencastproject.util.Jsons.Obj toJson()
-