org.wso2.carbon.registry.rest.api
Class Tag
java.lang.Object
org.wso2.carbon.registry.rest.api.RegistryRestSuper
org.wso2.carbon.registry.rest.api.PaginationCalculation<org.wso2.carbon.registry.core.TaggedResourcePath>
org.wso2.carbon.registry.rest.api.Tag
public class Tag
- extends PaginationCalculation<org.wso2.carbon.registry.core.TaggedResourcePath>
This class is to handle the Tag related REST verbs GET , POST and DELETE.
|
Constructor Summary |
Tag()
|
|
Method Summary |
javax.ws.rs.core.Response |
addTag(String resourcePath,
String tagText,
String JWTToken)
This method add array of tags to the specified resource |
javax.ws.rs.core.Response |
deleteTag(String resourcePath,
String tagName,
String JWTToken)
This method deletes the specified tag on the given resource |
protected javax.ws.rs.core.Response |
getPaginatedResults(org.wso2.carbon.registry.core.TaggedResourcePath[] taggedResourcePaths,
int start,
int size,
String sortBy,
String sortOrder)
|
javax.ws.rs.core.Response |
getTaggedResources(String tagName,
int start,
int size,
String JWTToken)
This method retrieves the resource paths for a given tag name |
| 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 |
Tag
public Tag()
getTaggedResources
public javax.ws.rs.core.Response getTaggedResources(String tagName,
int start,
int size,
@HeaderParam(value="X-JWT-Assertion")
String JWTToken)
- This method retrieves the resource paths for a given tag name
- Parameters:
tagName - - Name of the tagstart - - Page start numbersize - - Number of records to be fetched
- Returns:
- JSON object eg: {"path":[]}protected HTTP 200 OK.
addTag
public javax.ws.rs.core.Response addTag(String resourcePath,
String tagText,
@HeaderParam(value="X-JWT-Assertion")
String JWTToken)
- This method add array of tags to the specified resource
- Parameters:
resourcePath - - Resource path
- Returns:
- HTTP 204 No Content if success
deleteTag
public javax.ws.rs.core.Response deleteTag(String resourcePath,
String tagName,
@HeaderParam(value="X-JWT-Assertion")
String JWTToken)
- This method deletes the specified tag on the given resource
- Parameters:
resourcePath - - Path of the resource.tagName - - Name of the tag
- Returns:
- HTTP 204 No Content response, if success.
getPaginatedResults
protected javax.ws.rs.core.Response getPaginatedResults(org.wso2.carbon.registry.core.TaggedResourcePath[] taggedResourcePaths,
int start,
int size,
String sortBy,
String sortOrder)
- Specified by:
getPaginatedResults in class PaginationCalculation<org.wso2.carbon.registry.core.TaggedResourcePath>
Copyright © 2015 WSO2. All rights reserved.