org.wso2.carbon.registry.rest.api
Class Comments

java.lang.Object
  extended by org.wso2.carbon.registry.rest.api.RegistryRestSuper
      extended by org.wso2.carbon.registry.rest.api.PaginationCalculation<org.wso2.carbon.registry.core.Comment>
          extended by org.wso2.carbon.registry.rest.api.Comments

public class Comments
extends PaginationCalculation<org.wso2.carbon.registry.core.Comment>

This class retrieves the comments of the requested resource.


Constructor Summary
Comments()
           
 
Method Summary
 javax.ws.rs.core.Response getComments(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.Response getPaginatedResults(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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Comments

public Comments()
Method Detail

getComments

public javax.ws.rs.core.Response getComments(String resourcePath,
                                             int start,
                                             int size,
                                             @HeaderParam(value="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>


Copyright © 2015 WSO2. All rights reserved.