Class Artifact


  • @Path("/artifact")
    public class Artifact
    extends RegistryRestSuper
    This class is to handle the resources/collections according to the REST verbs GET,PUT and DELETE.
    • Constructor Detail

      • Artifact

        public Artifact()
    • 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 URI
        contentStream - - 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.