public class DeleteResource extends AbstractResourceRequest<ResourceResponse<Void>>
An OSLC-Core-Version
header is set to 2.0
, as the GET is expected to execute on an OSLC resource. Clients should subclass
AbstractResourceRequest
to execute a GET on a non-OSLC resource.
Constructor and Description |
---|
DeleteResource(OslcClient client,
URI uri)
Creates a new instance to execute a DELETE on the specified resource.
|
Modifier and Type | Method and Description |
---|---|
protected ClientResponse |
call(OslcResource resource)
Executes a DELETE request on the resource.
|
protected ResourceResponse<Void> |
createResponse(OslcResource resource,
ClientResponse response)
Returns a
ResourceResponse instance with just the HTTP response headers. |
call, createErrorResponse, createResourceResponse, getClient, getUri
public DeleteResource(OslcClient client, URI uri)
client
- the REST client used to execute a request.uri
- the URI used for the underlying request.protected ClientResponse call(OslcResource 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.
call
in class AbstractResourceRequest<ResourceResponse<Void>>
resource
- the resource on which to execute a request.protected ResourceResponse<Void> createResponse(OslcResource resource, ClientResponse response)
ResourceResponse
instance with just the HTTP response headers.
This class doesn't expect any entity to be present in the resource response.createResponse
in class AbstractResourceRequest<ResourceResponse<Void>>
resource
- the resource on which a request is executed.response
- the response obtained.