public class CommentAPI extends BaseAPI
| Constructor and Description |
|---|
CommentAPI(ResourceFactory resourceFactory) |
| Modifier and Type | Method and Description |
|---|---|
int |
addComment(Reference reference,
CommentCreate comment,
boolean silent)
Adds a new comment to the object of the given type and id, f.ex.
|
void |
deleteComment(int commentId)
Deletes a comment made by a user.
|
Comment |
getComment(int commentId)
Returns the contents of a comment.
|
List<Comment> |
getComments(Reference reference)
Used to retrieve all the comments that have been made on an object of the
given type and with the given id.
|
void |
updateComment(int commentId,
CommentUpdate comment)
Updates an already created comment.
|
getResourceFactorypublic CommentAPI(ResourceFactory resourceFactory)
public List<Comment> getComments(Reference reference)
reference - The reference to the object from which the comments should be
retrievedpublic Comment getComment(int commentId)
commentId - The id of the commentpublic int addComment(Reference reference, CommentCreate comment, boolean silent)
reference - The reference to the object the comment should be added tocomment - The comment that should be addedsilent - True if the update should be silent, false otherwisepublic void updateComment(int commentId,
CommentUpdate comment)
commentId - The id of the commentcomment - The updated comment definitionpublic void deleteComment(int commentId)
commentId - The id of the commentCopyright © 2014. All Rights Reserved.