Package lumis.service.likeit
Class LikeItResource
- java.lang.Object
-
- lumis.service.likeit.LikeItResource
-
@StableMinor(version="14.0", sinceVersion="8.0") @Path("/lumis/service/likeit/rest") public class LikeItResource extends Object
REST API for LikeIt service.- Since:
- 8.0.0
- Version:
- $Revision: 24476 $ $Date: 2021-04-28 11:28:23 -0300 (Wed, 28 Apr 2021) $
-
-
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(Like like)
Adds aLike
.void
deleteLike(String likeId)
Delete theLike
with the identifierLike
getLike(String id)
Returns aLike
by its identifier.LikeItResource.LikesItemList
getLikesItems(String serviceInstanceId, 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 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") 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") String serviceInstanceId, @NotNull @NotEmpty @QueryParam("itemIds") 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") String likeId) throws PortalException
Delete theLike
with the identifier- Parameters:
likeId
- the identifier of theLike
to be deleted- Throws:
PortalException
- Since:
- 8.0.0
-
-