@StableMinor(version="12.5", sinceVersion="8.0") @Path(value="/lumis/service/likeit/rest") public class LikeItResource extends Object
Modifier and Type | Class and Description |
---|---|
static class |
LikeItResource.LikesItem
JAXB object used to represent the
Like s of a single item (itemId on a specific LikeIt service instance). |
static class |
LikeItResource.LikesItemList
JAXB object used to return a list of
LikeItResource.LikesItem . |
static class |
LikeItResource.LikesList
JAXB object used to return a list of
Like . |
Constructor and Description |
---|
LikeItResource() |
Modifier and Type | Method and Description |
---|---|
Response |
addLike(Like like)
Adds a
Like . |
void |
deleteLike(String likeId)
Delete the
Like with the identifier |
Like |
getLike(String id)
Returns a
Like by its identifier. |
LikeItResource.LikesItemList |
getLikesItems(String serviceInstanceId,
List<String> itemIds)
Get all
Like s of the specified items, organized in LikeItResource.LikesItem structures. |
@POST @Path(value="/likes") @Produces(value="application/json") @Consumes(value="application/json") public Response addLike(@NotNull Like like) throws PortalException
Like
.like
- the Like
to add.Response
with the path to the Like
and the added Like
.PortalException
@GET @Path(value="/likes/{id:[A-F0-9]{32}}") @Produces(value="application/json") public Like getLike(@NotNull @PathParam(value="id") String id) throws PortalException
Like
by its identifier.id
- the identifier of the Like
.Like
, or a Response.Status.NOT_FOUND
response if not found.PortalException
@GET @Path(value="/likes-items/{serviceInstanceId:[A-F0-9]{32}}") @Produces(value="application/json") public LikeItResource.LikesItemList getLikesItems(@NotNull @PathParam(value="serviceInstanceId") String serviceInstanceId, @NotNull @NotEmpty @QueryParam(value="itemIds") List<String> itemIds) throws PortalException
Like
s of the specified items, organized in LikeItResource.LikesItem
structures.serviceInstanceId
- the service instance identifier where the content isitemIds
- the identifier of the content to retrieve the likes fromLikeItResource.LikesItem
object with the list of likes.PortalException
@DELETE @Path(value="/likes/{likeId:[A-F0-9]{32}}") public void deleteLike(@NotNull @PathParam(value="likeId") String likeId) throws PortalException
Like
with the identifierlikeId
- the identifier of the Like
to be deletedPortalException
LumisXP 12.5.0.200928 - Copyright © 2006–2020 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.