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

java.lang.Object
  extended by org.wso2.carbon.registry.rest.api.RegistryRestSuper
      extended by org.wso2.carbon.registry.rest.api.PaginationCalculation<PropertyModel>
          extended by org.wso2.carbon.registry.rest.api.Properties

public class Properties
extends PaginationCalculation<PropertyModel>

This class handle the properties related to the REST verbs GET,POST and DELETE.


Constructor Summary
Properties()
           
 
Method Summary
 javax.ws.rs.core.Response addProperties(String resourcePath, PropertyModel[] addProperty, String JWTToken)
          This method add array of JSON property model for the specified resource
protected  javax.ws.rs.core.Response getPaginatedResults(PropertyModel[] propertyModels, int start, int size, String sortBy, String sortOrder)
           
 javax.ws.rs.core.Response getProperties(String resourcePath, int start, int size, String JWTToken)
          This method get the properties on the requested resource.
 
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

Properties

public Properties()
Method Detail

getProperties

public javax.ws.rs.core.Response getProperties(String resourcePath,
                                               int start,
                                               int size,
                                               @HeaderParam(value="X-JWT-Assertion")
                                               String JWTToken)
This method get the properties on the requested resource.

Parameters:
resourcePath - - Path of the resource in the registry.
start - - Starting page number.
size - - Number of records to be retrieved.
Returns:
- array of properties, HTTP 200 OK.

addProperties

public javax.ws.rs.core.Response addProperties(String resourcePath,
                                               PropertyModel[] addProperty,
                                               @HeaderParam(value="X-JWT-Assertion")
                                               String JWTToken)
This method add array of JSON property model for the specified resource

Parameters:
resourcePath - - Resource path
addProperty - - Array of PropertyModel objects
Returns:
- HTTP 204 No Content.

getPaginatedResults

protected javax.ws.rs.core.Response getPaginatedResults(PropertyModel[] propertyModels,
                                                        int start,
                                                        int size,
                                                        String sortBy,
                                                        String sortOrder)
Specified by:
getPaginatedResults in class PaginationCalculation<PropertyModel>


Copyright © 2015 WSO2. All rights reserved.