Class LikeItResource


  • @StableMinor(version="17.0",
                 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$ $Date$
    • Constructor Detail

      • LikeItResource

        public LikeItResource()
    • Method Detail

      • addLike

        @POST
        @Path("/likes")
        @Produces("application/json")
        @Consumes("application/json")
        public javax.ws.rs.core.Response addLike​(@NotNull
                                                 @NotNull Like like)
                                          throws PortalException
        Adds a Like.
        Parameters:
        like - the Like to add.
        Returns:
        A Response with the path to the Like and the added Like.
        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 a Like by its identifier.
        Parameters:
        id - the identifier of the Like.
        Returns:
        the Like, or a Response.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 all Likes of the specified items, organized in LikeItResource.LikesItem structures.
        Parameters:
        serviceInstanceId - the service instance identifier where the content is
        itemIds - 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 the Like with the identifier
        Parameters:
        likeId - the identifier of the Like to be deleted
        Throws:
        PortalException
        Since:
        8.0.0