Package lumis.service.likeit
Class LikeItResource
- java.lang.Object
-
- lumis.service.likeit.LikeItResource
-
@StableMinor(version="14.2", sinceVersion="8.0") @Path("/lumis/service/likeit/rest") public class LikeItResource extends Object
REST API for LikeIt service.- Since:
- 8.0.0
- Version:
- $Revision: 24985 $ $Date: 2022-05-02 23:04:30 -0300 (Mon, 02 May 2022) $
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
LikeItResource.LikesItem
JAXB object used to represent theLike
s of a single item (itemId on a specific LikeIt service instance).static class
LikeItResource.LikesItemList
JAXB object used to return a list ofLikeItResource.LikesItem
.static class
LikeItResource.LikesList
JAXB object used to return a list ofLike
.
-
Constructor Summary
Constructors Constructor Description LikeItResource()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Response
addLike(@NotNull Like like)
Adds aLike
.void
deleteLike(@NotNull String likeId)
Delete theLike
with the identifierLike
getLike(@NotNull String id)
Returns aLike
by its identifier.LikeItResource.LikesItemList
getLikesItems(@NotNull String serviceInstanceId, @NotNull @NotEmpty List<String> itemIds)
Get allLike
s of the specified items, organized inLikeItResource.LikesItem
structures.
-
-
-
Method Detail
-
addLike
@POST @Path("/likes") @Produces("application/json") @Consumes("application/json") public Response addLike(@NotNull @NotNull Like like) throws PortalException
Adds aLike
.- Parameters:
like
- theLike
to add.- Returns:
- A
Response
with the path to theLike
and the addedLike
. - Throws:
PortalException
- Since:
- 8.0.0
-
getLike
@GET @Path("/likes/{id:[A-F0-9]{32}}") @Produces("application/json") public Like getLike(@NotNull @PathParam("id") @NotNull String id) throws PortalException
Returns aLike
by its identifier.- Parameters:
id
- the identifier of theLike
.- Returns:
- the
Like
, or aResponse.Status.NOT_FOUND
response if not found. - Throws:
PortalException
- Since:
- 8.0.0
-
getLikesItems
@GET @Path("/likes-items/{serviceInstanceId:[A-F0-9]{32}}") @Produces("application/json") public LikeItResource.LikesItemList getLikesItems(@NotNull @PathParam("serviceInstanceId") @NotNull String serviceInstanceId, @NotNull @NotEmpty @QueryParam("itemIds") @NotNull @NotEmpty List<String> itemIds) throws PortalException
Get allLike
s of the specified items, organized inLikeItResource.LikesItem
structures.- Parameters:
serviceInstanceId
- the service instance identifier where the content isitemIds
- the identifier of the content to retrieve the likes from- Returns:
- A
LikeItResource.LikesItem
object with the list of likes. - Throws:
PortalException
- Since:
- 8.0.0
-
deleteLike
@DELETE @Path("/likes/{likeId:[A-F0-9]{32}}") public void deleteLike(@NotNull @PathParam("likeId") @NotNull String likeId) throws PortalException
Delete theLike
with the identifier- Parameters:
likeId
- the identifier of theLike
to be deleted- Throws:
PortalException
- Since:
- 8.0.0
-
-