Class LikableContentResource
java.lang.Object
com.atlassian.confluence.plugins.like.rest.resources.LikableContentResource
-
Constructor Summary
ConstructorsConstructorDescriptionLikableContentResource
(LikeManager likeManager, ContentEntityManager contentEntityManager, NetworkService networkService, UserEntityExpander userEntityExpander, com.atlassian.sal.api.transaction.TransactionTemplate transactionTemplate) -
Method Summary
Modifier and TypeMethodDescriptionjavax.ws.rs.core.Response
javax.ws.rs.core.Response
getCommentLikes
(Long contentId) javax.ws.rs.core.Response
javax.ws.rs.core.Response
getLikesForIds
(LikeRequestDto likeDto) Get the likes for a list of contentsjavax.ws.rs.core.Response
removeLike
(Long contentId)
-
Constructor Details
-
LikableContentResource
@Inject public LikableContentResource(@Named("likeManager") LikeManager likeManager, ContentEntityManager contentEntityManager, NetworkService networkService, UserEntityExpander userEntityExpander, com.atlassian.sal.api.transaction.TransactionTemplate transactionTemplate)
-
-
Method Details
-
getLikesForIds
@POST @Produces("application/json") @Consumes("application/json") @Path("/likes") public javax.ws.rs.core.Response getLikesForIds(LikeRequestDto likeDto) Get the likes for a list of contents -
getLikes
@GET @Produces("application/json") @Path("/{id}/likes") public javax.ws.rs.core.Response getLikes(@PathParam("id") Long contentId, @QueryParam("expand") String expand, @QueryParam("max") Integer max, @QueryParam("commentLikes") Boolean commentLikes) - Parameters:
expand
- the name of the field in the JSON entity to expand. The value of "user" has been deprecated as the user will always be expanded.
-
addLike
@POST @Produces("application/json") @Path("/{id}/likes") @Consumes("application/json") public javax.ws.rs.core.Response addLike(@PathParam("id") Long contentId) -
removeLike
@DELETE @Produces("application/json") @Path("/{id}/likes") @Consumes("application/json") public javax.ws.rs.core.Response removeLike(@PathParam("id") Long contentId) -
getCommentLikes
@GET @Produces("application/json") @Path("/{id}/comment-likes") public javax.ws.rs.core.Response getCommentLikes(@PathParam("id") Long contentId)
-