Search in sources :

Example 1 with DeleteRequestBuilder

use of com.linkedin.restli.client.DeleteRequestBuilder in project rest.li by linkedin.

the class ExampleRequestResponseGenerator method delete.

public ExampleRequestResponse delete() {
    checkSupports(ResourceMethod.DELETE);
    DeleteRequestBuilder<Object, RecordTemplatePlaceholder> delete = new DeleteRequestBuilder<Object, RecordTemplatePlaceholder>(_uriTemplate, RecordTemplatePlaceholder.class, _resourceSpec, _requestOptions);
    if (_resourceSpec.getKeyType() != null) {
        delete.id(generateKey());
    }
    addParams(delete, ResourceMethod.DELETE);
    addPathKeys(delete);
    DeleteRequest<RecordTemplatePlaceholder> request = delete.build();
    return buildRequestResponse(request, new UpdateResponse(HttpStatus.S_200_OK), buildResourceMethodDescriptorForRestMethod(request));
}
Also used : BatchDeleteRequestBuilder(com.linkedin.restli.client.BatchDeleteRequestBuilder) DeleteRequestBuilder(com.linkedin.restli.client.DeleteRequestBuilder) UpdateResponse(com.linkedin.restli.server.UpdateResponse)

Aggregations

BatchDeleteRequestBuilder (com.linkedin.restli.client.BatchDeleteRequestBuilder)1 DeleteRequestBuilder (com.linkedin.restli.client.DeleteRequestBuilder)1 UpdateResponse (com.linkedin.restli.server.UpdateResponse)1