Class Comments
- java.lang.Object
-
- org.gcube.portal.social.networking.ws.methods.v2.Comments
-
@Path("2/comments") public class Comments extends ObjectREST interface for the social networking library (comments).
-
-
Constructor Summary
Constructors Constructor Description Comments()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.ws.rs.core.ResponsegetAllCommentsByPostId(String key)javax.ws.rs.core.ResponsegetCommentsUser()javax.ws.rs.core.ResponsegetCommentsUserByTime(long timeInMillis)javax.ws.rs.core.ResponsewriteComment(CommentInputBean comment)Create a new comment to a post having as owner the auth token's owner
-
-
-
Method Detail
-
getAllCommentsByPostId
@GET @Produces("application/json") @Path("get-comments-by-post-id") public javax.ws.rs.core.Response getAllCommentsByPostId(@NotNull @QueryParam("key") 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") 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") CommentInputBean comment) throws javax.validation.ValidationExceptionCreate a new comment to a post having as owner the auth token's owner- Parameters:
post- The post to be written- Returns:
- Throws:
javax.validation.ValidationException
-
-