Class Artifact
- java.lang.Object
-
- org.wso2.carbon.registry.rest.api.RegistryRestSuper
-
- org.wso2.carbon.registry.rest.api.Artifact
-
@Path("/artifact") public class Artifact extends RegistryRestSuperThis class is to handle the resources/collections according to the REST verbs GET,PUT and DELETE.
-
-
Constructor Summary
Constructors Constructor Description Artifact()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.ws.rs.core.ResponsecreateResource(List<javax.ws.rs.core.PathSegment> path, InputStream contentStream, String contentType, String JWTToken)This method creates/update the resource sent as the payload to the registry.javax.ws.rs.core.ResponsedeleteResource(List<javax.ws.rs.core.PathSegment> path, String JWTToken)This method delete the requested resource.javax.ws.rs.core.ResponsegetResource(List<javax.ws.rs.core.PathSegment> path, String JWTToken)This method get the resource content of 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
-
-
-
-
Method Detail
-
getResource
@Path("/{path:.*}") public javax.ws.rs.core.Response getResource(List<javax.ws.rs.core.PathSegment> path, @HeaderParam("X-JWT-Assertion") String JWTToken)This method get the resource content of the requested resource. If the path is collection it returns the paths inside that collection. If resource it return the content of the resource.- Parameters:
path- - Path of the resource/collection in the registry.- Returns:
- Response, if resource content stream, else resource paths array.HTTP 200 OK.
-
createResource
@Path("/{path:.*}") public javax.ws.rs.core.Response createResource(List<javax.ws.rs.core.PathSegment> path, InputStream contentStream, @HeaderParam("Content-Type") String contentType, @HeaderParam("X-JWT-Assertion") String JWTToken)This method creates/update the resource sent as the payload to the registry.- Parameters:
path- - List of path segment of the resource path after the (/resource) in the URIcontentStream- - Resource content sent as stream- Returns:
- Response - HTTP 200 OK with the resource/collection path.
-
deleteResource
@Path("/{path:.*}") public javax.ws.rs.core.Response deleteResource(List<javax.ws.rs.core.PathSegment> path, @HeaderParam("X-JWT-Assertion") String JWTToken)This method delete the requested resource.- Parameters:
path- - path segment of the resource path- Returns:
- Response - HTTP 204 No Content.
-
-