@StableMinor(version="12.3", sinceVersion="8.0") @Path(value="/lumis/service/commentit/rest") public class CommentItResource extends Object
Modifier and Type | Class and Description |
---|---|
static class |
CommentItResource.CommentsItem
JAXB object used to represent the
CommentItResource.CommentsList of a single item (itemId on a specific CommentIt service
instance). |
static class |
CommentItResource.CommentsItemList
JAXB object used to return a list of
CommentItResource.CommentsItem . |
static class |
CommentItResource.CommentsList
JAXB object used to return a list of
Comment objects. |
Constructor and Description |
---|
CommentItResource() |
Modifier and Type | Method and Description |
---|---|
Response |
addComment(Comment comment)
Adds a
Comment . |
void |
deleteComment(String commentId)
Delete the
Comment with the identifier |
Comment |
getComment(String id)
Returns a
Comment by its identifier. |
CommentItResource.CommentsItemList |
getCommentsItems(String serviceInstanceId,
List<String> itemIds,
Integer limit)
Get the newest
Comment objects of the specified items, organized in
CommentItResource.CommentsItem structures, up to the specified amount. |
@POST @Path(value="/comments") @Produces(value="application/json") @Consumes(value="application/json") public Response addComment(@NotNull Comment comment) throws PortalException
Comment
.comment
- the Comment
to add.Response
with the path to the Comment
and the added Comment
.PortalException
@GET @Path(value="/comments/{id:[A-F0-9]{32}}") @Produces(value="application/json") public Comment getComment(@NotNull @PathParam(value="id") String id) throws PortalException
Comment
by its identifier.id
- The identifier of the Comment
.Comment
or a Response.Status.NOT_FOUND
response if not found.PortalException
@GET @Path(value="/comments-items/{serviceInstanceId:[A-F0-9]{32}}") @Produces(value="application/json") public CommentItResource.CommentsItemList getCommentsItems(@NotNull @PathParam(value="serviceInstanceId") String serviceInstanceId, @NotNull @NotEmpty @QueryParam(value="itemIds") List<String> itemIds, @NotNull @QueryParam(value="limit") Integer limit) throws PortalException
Comment
objects of the specified items, organized in
CommentItResource.CommentsItem
structures, up to the specified amount.serviceInstanceId
- The instance identifier for the CommentIt service being use.itemIds
- The identifier of the items to retrieve the Comment
objects fromlimit
- The maximum number of Comment
objects to get.CommentItResource.CommentsItemList
object with the CommentItResource.CommentsList
with a list of Comment
objects for each item.PortalException
@DELETE @Path(value="/comments/{commentId:[A-F0-9]{32}}") public void deleteComment(@NotNull @PathParam(value="commentId") String commentId) throws PortalException
Comment
with the identifiercommentId
- the identifier of the Comment
to deletePortalException
LumisXP 12.3.0.200408 - Copyright © 2006–2020 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.