Class Comments
java.lang.Object
org.wso2.carbon.registry.rest.api.RegistryRestSuper
org.wso2.carbon.registry.rest.api.PaginationCalculation<org.wso2.carbon.registry.core.Comment>
org.wso2.carbon.registry.rest.api.Comments
@Path("/comments")
public class Comments
extends PaginationCalculation<org.wso2.carbon.registry.core.Comment>
This class retrieves the comments of the requested resource.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionjavax.ws.rs.core.ResponsegetComments(String resourcePath, int start, int size, String JWTToken) This method get the comments on the requested resource based on the pagination properties.protected javax.ws.rs.core.ResponsegetPaginatedResults(org.wso2.carbon.registry.core.Comment[] comments, int start, int size, String sortBy, String sortOrder) Methods inherited from class org.wso2.carbon.registry.rest.api.RegistryRestSuper
getBegin, getEnd, getPageSize, getResourcePath, getTenantID, getUserRegistry, getUserRegistry, setBegin, setEnd, setPageSize, setUserRegistry
-
Constructor Details
-
Comments
public Comments()
-
-
Method Details
-
getComments
public javax.ws.rs.core.Response getComments(String resourcePath, int start, int size, @HeaderParam("X-JWT-Assertion") String JWTToken) This method get the comments on the requested resource based on the pagination properties.- Parameters:
resourcePath- - Path of the resource in the registry.start- - Starting page number.size- - Number of records to be retrieved- Returns:
- array of CommentModel objects, HTTP 200 OK.
-
getPaginatedResults
protected javax.ws.rs.core.Response getPaginatedResults(org.wso2.carbon.registry.core.Comment[] comments, int start, int size, String sortBy, String sortOrder) - Specified by:
getPaginatedResultsin classPaginationCalculation<org.wso2.carbon.registry.core.Comment>
-