Package com.jms.socialmedia.handlers
Class LikeRequestHandler
- java.lang.Object
-
- com.jms.socialmedia.handlers.RequestHandler
-
- com.jms.socialmedia.handlers.LikeRequestHandler
-
public class LikeRequestHandler extends RequestHandler
-
-
Field Summary
-
Fields inherited from class com.jms.socialmedia.handlers.RequestHandler
dataService, tokenService
-
-
Constructor Summary
Constructors Constructor Description LikeRequestHandler(DataService dataService, TokenService tokenService, com.google.gson.Gson gson)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<Integer>
handleGetCommentLikes(spark.Request request, spark.Response response)
Collection<Post>
handleGetLikedPosts(spark.Request request, spark.Response response)
Collection<Integer>
handleGetPostLikes(spark.Request request, spark.Response response)
Boolean
handleLikeComment(spark.Request request, spark.Response response)
Boolean
handleLikePost(spark.Request request, spark.Response response)
Boolean
handleUnlikeComment(spark.Request request, spark.Response response)
Boolean
handleUnlikePost(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
-
LikeRequestHandler
public LikeRequestHandler(DataService dataService, TokenService tokenService, com.google.gson.Gson gson)
-
-
Method Detail
-
handleGetLikedPosts
public Collection<Post> handleGetLikedPosts(spark.Request request, spark.Response response)
-
handleGetPostLikes
public Collection<Integer> handleGetPostLikes(spark.Request request, spark.Response response)
-
handleLikePost
public Boolean handleLikePost(spark.Request request, spark.Response response) throws IOException
- Throws:
IOException
-
handleUnlikePost
public Boolean handleUnlikePost(spark.Request request, spark.Response response) throws IOException
- Throws:
IOException
-
handleGetCommentLikes
public Collection<Integer> handleGetCommentLikes(spark.Request request, spark.Response response)
-
handleLikeComment
public Boolean handleLikeComment(spark.Request request, spark.Response response) throws IOException
- Throws:
IOException
-
handleUnlikeComment
public Boolean handleUnlikeComment(spark.Request request, spark.Response response) throws IOException
- Throws:
IOException
-
-