U - the type of resource that can be persisted by this servicepublic interface MutableDataService<U> extends RetrievalService<U>
| Modifier and Type | Method and Description |
|---|---|
default CompletionStage<Void> |
create(Metadata metadata,
Dataset dataset)
Create a resource in the server.
|
CompletionStage<Void> |
delete(Metadata metadata)
Delete a resource from the server.
|
CompletionStage<Void> |
replace(Metadata metadata,
Dataset dataset)
Replace a resource in the server.
|
getdefault CompletionStage<Void> create(Metadata metadata, Dataset dataset)
metadata - metadata for the new resourcedataset - the dataset to be persistedCompletionStage will complete exceptionally and can be handled with
CompletionStage.handle(java.util.function.BiFunction<? super T, java.lang.Throwable, ? extends U>), CompletionStage.exceptionally(java.util.function.Function<java.lang.Throwable, ? extends T>) or similar methods.replace(org.trellisldp.api.Metadata, org.apache.commons.rdf.api.Dataset) method.CompletionStage<Void> replace(Metadata metadata, Dataset dataset)
metadata - metadata for the resourcedataset - the dataset to be persistedCompletionStage will complete exceptionally and can be handled with
CompletionStage.handle(java.util.function.BiFunction<? super T, java.lang.Throwable, ? extends U>), CompletionStage.exceptionally(java.util.function.Function<java.lang.Throwable, ? extends T>) or similar methods.CompletionStage<Void> delete(Metadata metadata)
metadata - metadata for the resourceCompletionStage will complete exceptionally and can be handled with
CompletionStage.handle(java.util.function.BiFunction<? super T, java.lang.Throwable, ? extends U>), CompletionStage.exceptionally(java.util.function.Function<java.lang.Throwable, ? extends T>) or similar methods.