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).- Author:
- Ahmed Ibrahim ISTI-CNR
-
-
Constructor Summary
Constructors Constructor Description Comments()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.ws.rs.core.ResponsegetAllCommentsByPostId(@NotNull String key)javax.ws.rs.core.ResponsegetCommentsUser()javax.ws.rs.core.ResponsegetCommentsUserByTime(@javax.validation.constraints.Min(value=0L, message="time cannot be negative") long timeInMillis)javax.ws.rs.core.ResponsewriteComment(@NotNull(message="Comment to write is missing") @Valid 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") @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.ValidationExceptionCreate a new comment to a post having as owner the auth token's owner- Parameters:
comment- The CommentInputBean object- Returns:
- Throws:
javax.validation.ValidationException
-
-