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

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.Tag>
          extended by org.wso2.carbon.registry.rest.api.Tags

public class Tags
extends PaginationCalculation<org.wso2.carbon.registry.core.Tag>


Constructor Summary
Tags()
           
 
Method Summary
 javax.ws.rs.core.Response addTags(String resourcePath, TagModel tags, String JWTToken)
          This method add array of tags to the specified resource
protected  javax.ws.rs.core.Response getPaginatedResults(org.wso2.carbon.registry.core.Tag[] tags, int start, int size, String sortBy, String sortOrder)
           
 javax.ws.rs.core.Response getTags(String resourcePath, int start, int size, String JWTToken)
          This method tags associated with the given 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

Tags

public Tags()
Method Detail

getTags

public javax.ws.rs.core.Response getTags(String resourcePath,
                                         int start,
                                         int size,
                                         @HeaderParam(value="X-JWT-Assertion")
                                         String JWTToken)
This method tags associated with the given resource

Parameters:
resourcePath - resource path
start - starting page number
size - number of tags to be fetched
Returns:
JSON tag model eg: {"tags":[

addTags

public javax.ws.rs.core.Response addTags(String resourcePath,
                                         TagModel tags,
                                         @HeaderParam(value="X-JWT-Assertion")
                                         String JWTToken)
This method add array of tags to the specified resource

Parameters:
resourcePath - - Resource path
tags - - eg:{"tags":[]}
Returns:
HTTP 204 No Content ,if success.

getPaginatedResults

protected javax.ws.rs.core.Response getPaginatedResults(org.wso2.carbon.registry.core.Tag[] tags,
                                                        int start,
                                                        int size,
                                                        String sortBy,
                                                        String sortOrder)
Specified by:
getPaginatedResults in class PaginationCalculation<org.wso2.carbon.registry.core.Tag>


Copyright © 2015 WSO2. All rights reserved.