-
@JvmSuppressWildcards() public interface CommentsApi
-
-
Method Summary
Modifier and Type Method Description abstract CommentEntrycreateComment(@Path(value = nodeId) String nodeId, @Body() CommentBody commentBodyCreate, @Query(value = fields) List<String> fields)Create a comment Creates a comment on node nodeId. abstract UnitdeleteComment(@Path(value = nodeId) String nodeId, @Path(value = commentId) String commentId)Delete a comment Deletes the comment commentId from node nodeId. abstract CommentPaginglistComments(@Path(value = nodeId) String nodeId, @Query(value = skipCount) Integer skipCount, @Query(value = maxItems) Integer maxItems, @Query(value = fields) List<String> fields)List comments Gets a list of comments for the node nodeId, sorted chronologically with the newest comment first. abstract CommentEntryupdateComment(@Path(value = nodeId) String nodeId, @Path(value = commentId) String commentId, @Body() CommentBody commentBodyUpdate, @Query(value = fields) List<String> fields)Update a comment Updates an existing comment commentId on node nodeId. -
-
Method Detail
-
createComment
@Headers(value = {Content-Type: application/json})@POST(value = alfresco/versions/1/nodes/{nodeId}/comments) abstract CommentEntry createComment(@Path(value = nodeId) String nodeId, @Body() CommentBody commentBodyCreate, @Query(value = fields) List<String> fields)Create a comment Creates a comment on node nodeId. You specify the comment in a JSON body like this:
``JSON { \"content\": \"This is a comment\" } ``Note: You can create more than one comment by specifying a list of comments in the JSON body like this:``JSON [ { \"content\": \"This is a comment\" }, { \"content\": \"This is another comment\" } ] ``If you specify a list as input, then a paginated list rather than an entry is returned in the response body. For example:``JSON { \"list\": { \"pagination\": { \"count\": 2, \"hasMoreItems\": false, \"totalItems\": 2, \"skipCount\": 0, \"maxItems\": 100 }, \"entries\": [ { \"entry\": { ... } }, { \"entry\": { ... } } ] } } ``The endpoint is owned by defaultname service owner @param nodeId The identifier of a node. (required) @param commentBodyCreate The comment text. Note that you can also provide a list of comments. (required) @param fields A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the include parameter, then the fields specified in the include parameter are returned in addition to those specified in the fields parameter. (optional)
-
deleteComment
@Headers(value = {Content-Type: application/json})@DELETE(value = alfresco/versions/1/nodes/{nodeId}/comments/{commentId}) abstract Unit deleteComment(@Path(value = nodeId) String nodeId, @Path(value = commentId) String commentId)Delete a comment Deletes the comment commentId from node nodeId. The endpoint is owned by defaultname service owner
- Parameters:
nodeId- The identifier of a node.commentId- The identifier of a comment.
-
listComments
@Headers(value = {Content-Type: application/json})@GET(value = alfresco/versions/1/nodes/{nodeId}/comments) abstract CommentPaging listComments(@Path(value = nodeId) String nodeId, @Query(value = skipCount) Integer skipCount, @Query(value = maxItems) Integer maxItems, @Query(value = fields) List<String> fields)List comments Gets a list of comments for the node nodeId, sorted chronologically with the newest comment first. The endpoint is owned by defaultname service owner
- Parameters:
nodeId- The identifier of a node.skipCount- The number of entities that exist in the collection before those included in this list.maxItems- The maximum number of items to return in the list.fields- A list of field names.
-
updateComment
@Headers(value = {Content-Type: application/json})@PUT(value = alfresco/versions/1/nodes/{nodeId}/comments/{commentId}) abstract CommentEntry updateComment(@Path(value = nodeId) String nodeId, @Path(value = commentId) String commentId, @Body() CommentBody commentBodyUpdate, @Query(value = fields) List<String> fields)Update a comment Updates an existing comment commentId on node nodeId. The endpoint is owned by defaultname service owner
- Parameters:
nodeId- The identifier of a node.commentId- The identifier of a comment.commentBodyUpdate- The JSON representing the comment to be updated.fields- A list of field names.
-
-
-
-