Class Comment
java.lang.Object
org.wso2.carbon.registry.rest.api.RegistryRestSuper
org.wso2.carbon.registry.rest.api.Comment
This class is to handle REST verbs GET , PSST and DELETE.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionjavax.ws.rs.core.ResponseaddComment(String resourcePath, String commentText, String JWTToken) This method to add comment for given resource.javax.ws.rs.core.ResponsedeleteComment(String resourcePath, long commentId, String JWTToken) This method deletes the specific comment(using id) on the given resourcejavax.ws.rs.core.ResponseeditComment(String resourcePath, long commentId, String commentText, String JWTToken) This method to update the given comment (using comment id).javax.ws.rs.core.ResponsegetComment(String resourcePath, long commentId, String JWTToken) This method get a specific comment of the given resourceMethods inherited from class org.wso2.carbon.registry.rest.api.RegistryRestSuper
getBegin, getEnd, getPageSize, getResourcePath, getTenantID, getUserRegistry, getUserRegistry, setBegin, setEnd, setPageSize, setUserRegistry
-
Constructor Details
-
Comment
public Comment()
-
-
Method Details
-
getComment
public javax.ws.rs.core.Response getComment(String resourcePath, long commentId, @HeaderParam("X-JWT-Assertion") String JWTToken) This method get a specific comment of the given resource- Parameters:
resourcePath- - Registry path of the resource.commentId- - Comment id.- Returns:
- CommentModel JSON object. HTTP 200 OK.
-
addComment
public javax.ws.rs.core.Response addComment(String resourcePath, String commentText, @HeaderParam("X-JWT-Assertion") String JWTToken) This method to add comment for given resource.- Parameters:
resourcePath- - Resource path.commentText- - Comment to be added.- Returns:
- CommentModel object. HTTP 204 No Content.
-
editComment
public javax.ws.rs.core.Response editComment(String resourcePath, long commentId, String commentText, @HeaderParam("X-JWT-Assertion") String JWTToken) This method to update the given comment (using comment id).- Parameters:
resourcePath- - resource pathcommentId- - id of the specific commentcommentText- - comment to be added- Returns:
- CommentModel object. HTTP 204 No Content.
-
deleteComment
public javax.ws.rs.core.Response deleteComment(String resourcePath, long commentId, @HeaderParam("X-JWT-Assertion") String JWTToken) This method deletes the specific comment(using id) on the given resource- Parameters:
resourcePath- - registry path of the resourcecommentId- - ID of the comment to be deleted- Returns:
- Response , HTTP 204 No Content.
-