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 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:
      getPaginatedResults in class PaginationCalculation<org.wso2.carbon.registry.core.Comment>