Class DeleteResource

    • Constructor Detail

      • DeleteResource

        public DeleteResource​(OslcClient client,
                              URI uri)
        Creates a new instance to execute a DELETE on the specified resource.
        Parameters:
        client - the REST client used to execute a request.
        uri - the URI used for the underlying request.
      • DeleteResource

        public DeleteResource​(OslcClient client,
                              URI uri,
                              MediaType acceptType)
        Creates a new instance to execute a DELETE on the specified resource with the given media type for Accept header.
        Parameters:
        client - the REST client used to execute a request.
        uri - the URI used for the underlying request.
        acceptType - the value of the Accept headers to use.
        Since:
        1.13.0
    • Method Detail

      • call

        protected ClientResponse call​(OslcResource resource)
        Executes a DELETE request on the resource.

        An OSLC-Core-Version header is set to 2.0, as the DELETE is expected to execute on an OSLC resource. Clients should subclass AbstractResourceRequest to execute a DELETE on a non-OSLC resource.

        Specified by:
        call in class AbstractResourceRequest<ResourceResponse<Void>>
        Parameters:
        resource - the resource on which to execute a request.
        Returns:
        the response of the request execution.
      • createResponse

        protected ResourceResponse<Void> createResponse​(OslcResource resource,
                                                        ClientResponse response)
        Returns a ResourceResponse instance with just the HTTP response headers. This class doesn't expect any entity to be present in the resource response.
        Specified by:
        createResponse in class AbstractResourceRequest<ResourceResponse<Void>>
        Parameters:
        resource - the resource on which a request is executed.
        response - the response obtained.
        Returns:
        the extraction of the response content into the expected format.