use of com.linkedin.restli.client.UpdateRequestBuilder in project rest.li by linkedin.
the class ExampleRequestResponseGenerator method update.
public ExampleRequestResponse update() {
checkSupports(ResourceMethod.UPDATE);
UpdateRequestBuilder<Object, RecordTemplatePlaceholder> update = new UpdateRequestBuilder<>(_uriTemplate, RecordTemplatePlaceholder.class, _resourceSpec, _requestOptions);
if (_resourceSpec.getKeyType() != null) {
update.id(generateKey());
}
update.input(generateEntity());
addParams(update, ResourceMethod.UPDATE);
addPathKeys(update);
UpdateRequest<RecordTemplatePlaceholder> request = update.build();
return buildRequestResponse(request, new UpdateResponse(HttpStatus.S_200_OK), buildResourceMethodDescriptorForRestMethod(request));
}
Aggregations