Class EventCommentServiceImpl
java.lang.Object
org.opencastproject.event.comment.EventCommentServiceImpl
- All Implemented Interfaces:
EventCommentService
Implements permanent storage for event comments.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddeleteComment(long commentId) Delete a comment from an event.voiddeleteComments(String eventId) Delete all comments from an event.getComment(long commentId) Get a comment for a particular event.getComments(String eventId) Get all of the comments for an event.Get the available reasons for commenting on an event.voidsetEventCommentDatabaseService(EventCommentDatabaseService eventCommentDatabaseService) OSGi callback to set the event comment database service.updateComment(EventComment comment) Update a comment.
-
Constructor Details
-
EventCommentServiceImpl
public EventCommentServiceImpl()
-
-
Method Details
-
setEventCommentDatabaseService
OSGi callback to set the event comment database service.- Parameters:
eventCommentDatabaseService- the event comment database service
-
getReasons
Description copied from interface:EventCommentServiceGet the available reasons for commenting on an event.- Specified by:
getReasonsin interfaceEventCommentService- Returns:
- A list of reasons of why a comment was made.
- Throws:
EventCommentException- Thrown if there was an issue getting the comment reasons.
-
getComment
Description copied from interface:EventCommentServiceGet a comment for a particular event.- Specified by:
getCommentin interfaceEventCommentService- Parameters:
commentId- The id for the comment.- Returns:
- The comment
- Throws:
NotFoundException- Thrown if the comment cannot be found.EventCommentException- Thrown if there was an issue getting the comment.
-
deleteComment
Description copied from interface:EventCommentServiceDelete a comment from an event.- Specified by:
deleteCommentin interfaceEventCommentService- Parameters:
commentId- The id of the comment.- Throws:
NotFoundException- Thrown if cannot find the event / comment.EventCommentException- Thrown if there is a problem deleting the comment.
-
deleteComments
Description copied from interface:EventCommentServiceDelete all comments from an event.- Specified by:
deleteCommentsin interfaceEventCommentService- Parameters:
eventId- The id of the event to get the comments for (mediapackage id).- Throws:
NotFoundException- Thrown if cannot find the eventEventCommentException- Thrown if there is a problem deleting the comments.
-
updateComment
Description copied from interface:EventCommentServiceUpdate a comment.- Specified by:
updateCommentin interfaceEventCommentService- Parameters:
comment- The new comment status to update to.- Returns:
- The comment updated.
- Throws:
EventCommentException- Thrown if there is a problem updating the comment.
-
getComments
Description copied from interface:EventCommentServiceGet all of the comments for an event.- Specified by:
getCommentsin interfaceEventCommentService- Parameters:
eventId- The id of the event to get the comments for (mediapackage id).- Returns:
- The
Listof comments. - Throws:
EventCommentException- Thrown if there was a problem getting the comments.
-