Class 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 Detail

      • Tag

        public Tag()
    • Method Detail

      • 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 tag
        start - - Page start number
        size - - 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:
        getPaginatedResults in class PaginationCalculation<org.wso2.carbon.registry.core.TaggedResourcePath>