Class Comments


  • @Path("2/comments")
    public class Comments
    extends Object
    REST interface for the social networking library (comments).
    Author:
    Ahmed Ibrahim ISTI-CNR
    • Constructor Detail

      • Comments

        public Comments()
    • Method Detail

      • getAllCommentsByPostId

        @GET
        @Produces("application/json")
        @Path("get-comments-by-post-id")
        public javax.ws.rs.core.Response getAllCommentsByPostId​(@NotNull @QueryParam("key")
                                                                @NotNull String key)
      • getCommentsUser

        @GET
        @Produces("application/json")
        @Path("get-comments-user")
        public javax.ws.rs.core.Response getCommentsUser()
      • getCommentsUserByTime

        @GET
        @Produces("application/json")
        @Path("get-comments-user-by-time")
        public javax.ws.rs.core.Response getCommentsUserByTime​(@QueryParam("time") @Min(value=0L,message="time cannot be negative")
                                                               @javax.validation.constraints.Min(value=0L, message="time cannot be negative") long timeInMillis)
                                                        throws javax.validation.ValidationException
        Throws:
        javax.validation.ValidationException
      • writeComment

        @POST
        @Path("comment-post")
        @Consumes("application/json")
        @Produces("application/json")
        public javax.ws.rs.core.Response writeComment​(@NotNull(message="Comment to write is missing") @Valid
                                                      @NotNull(message="Comment to write is missing") @Valid CommentInputBean comment)
                                               throws javax.validation.ValidationException
        Create a new comment to a post having as owner the auth token's owner
        Parameters:
        comment - The CommentInputBean object
        Returns:
        Throws:
        javax.validation.ValidationException