Class CommentWebServices
java.lang.Object
io.vertigo.social.webservices.comment.CommentWebServices
- All Implemented Interfaces:
io.vertigo.core.node.component.Component,io.vertigo.core.node.component.CoreComponent,io.vertigo.vega.webservice.WebServices
@PathPrefix("/x/comment")
public final class CommentWebServices
extends Object
implements io.vertigo.vega.webservice.WebServices
Webservice for Notification extension.
- Author:
- npiedeloup
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetComments(String keyConcept, String id) Gets comments for keyConcept.Returns config.getHelp()Returns help.getStats()Returns stats.Returns status (code 200 or 500)publishComment(Comment comment, String keyConcept, String id) Publishes a new comment.updateComment(String uuid, Comment comment) Updates a comment.
-
Constructor Details
-
CommentWebServices
public CommentWebServices()
-
-
Method Details
-
getComments
@GET("/api/comments") public List<Comment> getComments(@QueryParam("concept") String keyConcept, @QueryParam("id") String id) Gets comments for keyConcept.- Parameters:
keyConcept- KeyConcept typeid- KeyConcept id- Returns:
- comments for keyConcept
-
publishComment
@POST("/api/comments") public Comment publishComment(@ExcludedFields("uuid") Comment comment, @QueryParam("concept") String keyConcept, @QueryParam("id") String id) Publishes a new comment.- Parameters:
comment- Comment msgkeyConcept- KeyConcept typeid- KeyConcept id
-
updateComment
@PUT("/api/comments/{uuid}") public Comment updateComment(@PathParam("uuid") String uuid, Comment comment) Updates a comment.- Parameters:
uuid- Comment uuidcomment- Comment msg
-
getStatus
Returns status (code 200 or 500)- Returns:
- "OK" or error message
-
getStats
Returns stats.- Returns:
- "OK" or error message
-
getConfig
Returns config.- Returns:
- Config object
-
getHelp
Returns help.- Returns:
- Help object
-