Package com.jms.socialmedia.handlers
Class CommentRequestHandler
- java.lang.Object
-
- com.jms.socialmedia.handlers.RequestHandler
-
- com.jms.socialmedia.handlers.CommentRequestHandler
-
public class CommentRequestHandler extends RequestHandler
-
-
Field Summary
-
Fields inherited from class com.jms.socialmedia.handlers.RequestHandler
dataService, tokenService
-
-
Constructor Summary
Constructors Constructor Description CommentRequestHandler(DataService dataService, TokenService tokenService, com.google.gson.Gson gson)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Boolean
handleAddComment(spark.Request request, spark.Response response)
Boolean
handleDeleteComment(spark.Request request, spark.Response response)
Boolean
handleEditComment(spark.Request request, spark.Response response)
Comment
handleGetComment(spark.Request request, spark.Response response)
Collection<Comment>
handleGetComments(spark.Request request, spark.Response response)
Collection<Comment>
handleGetCommentsByUserId(spark.Request request, spark.Response response)
-
Methods inherited from class com.jms.socialmedia.handlers.RequestHandler
authorizeRequest, authorizeRequest, checkParameter, checkParameter, checkParameter, extractBodyContent, handleAuthorizeRequest, throwBadRequestExceptionIf, throwExceptionIfNecessary
-
-
-
-
Constructor Detail
-
CommentRequestHandler
public CommentRequestHandler(DataService dataService, TokenService tokenService, com.google.gson.Gson gson)
-
-
Method Detail
-
handleGetComments
public Collection<Comment> handleGetComments(spark.Request request, spark.Response response)
-
handleGetCommentsByUserId
public Collection<Comment> handleGetCommentsByUserId(spark.Request request, spark.Response response)
-
handleGetComment
public Comment handleGetComment(spark.Request request, spark.Response response)
-
handleAddComment
public Boolean handleAddComment(spark.Request request, spark.Response response) throws IOException
- Throws:
IOException
-
handleEditComment
public Boolean handleEditComment(spark.Request request, spark.Response response) throws IOException
- Throws:
IOException
-
handleDeleteComment
public Boolean handleDeleteComment(spark.Request request, spark.Response response) throws IOException
- Throws:
IOException
-
-