Package lumis.service.likeit
Class LikeItResource
- java.lang.Object
-
- lumis.service.likeit.LikeItResource
-
@StableMinor(version="16.1", sinceVersion="8.0") @Path("/lumis/service/likeit/rest") public class LikeItResource extends java.lang.Object
REST API for LikeIt service.- Since:
- 8.0.0
- Version:
- $Revision: 26157 $ $Date: 2024-01-13 11:35:03 -0300 (Sat, 13 Jan 2024) $
-
-
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 java.lang.String likeId)
Delete theLike
with the identifierLike
getLike(@NotNull java.lang.String id)
Returns aLike
by its identifier.LikeItResource.LikesItemList
getLikesItems(@NotNull java.lang.String serviceInstanceId, @NotNull @NotEmpty java.util.List<java.lang.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 java.lang.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 java.lang.String serviceInstanceId, @NotNull @NotEmpty @QueryParam("itemIds") @NotNull @NotEmpty java.util.List<java.lang.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 java.lang.String likeId) throws PortalException
Delete theLike
with the identifier- Parameters:
likeId
- the identifier of theLike
to be deleted- Throws:
PortalException
- Since:
- 8.0.0
-
-