Class Comment


  • @Path("/comment")
    public class Comment
    extends RegistryRestSuper
    This class is to handle REST verbs GET , PSST and DELETE.
    • Constructor Detail

      • Comment

        public Comment()
    • Method Detail

      • 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 path
        commentId - - id of the specific comment
        commentText - - 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 resource
        commentId - - ID of the comment to be deleted
        Returns:
        Response , HTTP 204 No Content.