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
,WebServices
@PathPrefix("/x/comment") public final class CommentWebServices extends Object implements WebServices
Webservice for Notification extension.- Author:
- npiedeloup
-
-
Constructor Summary
Constructors Constructor Description CommentWebServices()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<Comment>
getComments(String keyConcept, String id)
Gets comments for keyConcept.Map<String,Object>
getConfig()
Returns config.String
getHelp()
Returns help.Map<String,Object>
getStats()
Returns stats.String
getStatus()
Returns status (code 200 or 500)Comment
publishComment(Comment comment, String keyConcept, String id)
Publishes a new comment.Comment
updateComment(String uuid, Comment comment)
Updates a comment.
-
-
-
Method Detail
-
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
@GET("/status") @AnonymousAccessAllowed public String getStatus()
Returns status (code 200 or 500)- Returns:
- "OK" or error message
-
getStats
@GET("/stats") @AnonymousAccessAllowed public Map<String,Object> getStats()
Returns stats.- Returns:
- "OK" or error message
-
getConfig
@GET("/config") @AnonymousAccessAllowed public Map<String,Object> getConfig()
Returns config.- Returns:
- Config object
-
getHelp
@GET("/help") @AnonymousAccessAllowed public String getHelp()
Returns help.- Returns:
- Help object
-
-