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
@Path("/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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionjavax.ws.rs.core.ResponseThis method add array of tags to the specified resourcejavax.ws.rs.core.ResponseThis method deletes the specified tag on the given resourceprotected javax.ws.rs.core.ResponsegetPaginatedResults(org.wso2.carbon.registry.core.TaggedResourcePath[] taggedResourcePaths, int start, int size, String sortBy, String sortOrder) javax.ws.rs.core.ResponsegetTaggedResources(String tagName, int start, int size, String JWTToken) This method retrieves the resource paths for a given tag nameMethods inherited from class org.wso2.carbon.registry.rest.api.RegistryRestSuper
getBegin, getEnd, getPageSize, getResourcePath, getTenantID, getUserRegistry, getUserRegistry, setBegin, setEnd, setPageSize, setUserRegistry
-
Constructor Details
-
Tag
public Tag()
-
-
Method Details
-
getTaggedResources
public javax.ws.rs.core.Response getTaggedResources(String tagName, int start, int size, @HeaderParam("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("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("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:
getPaginatedResultsin classPaginationCalculation<org.wso2.carbon.registry.core.TaggedResourcePath>
-