public interface UnresolvedReferencesService<T extends WaitingToBeResolved>
| Modifier and Type | Method and Description |
|---|---|
java.util.concurrent.CompletionStage<java.util.Optional<T>> |
delete(java.lang.String key,
java.lang.String containerKey,
java.lang.Class<T> clazz)
Given a draft key, this methods deletes the matching draft from persistence.
|
java.util.concurrent.CompletionStage<java.util.Set<T>> |
fetch(java.util.Set<java.lang.String> keys,
java.lang.String containerKey,
java.lang.Class<T> clazz)
Given draft keys, this method fetches the persisted drafts waiting to be resolved.
|
java.util.concurrent.CompletionStage<java.util.Optional<T>> |
save(T draft,
java.lang.String containerKey,
java.lang.Class<T> clazz)
Persists a draft that is not ready to be resolved yet.
|
@Nonnull java.util.concurrent.CompletionStage<java.util.Set<T>> fetch(@Nonnull java.util.Set<java.lang.String> keys, @Nonnull java.lang.String containerKey, @Nonnull java.lang.Class<T> clazz)
Set will be returned in the returned future.keys - the keys of the persisted drafts, waiting to be resolved, to fetch.containerKey - the key of the container, which contains the persisted draftclazz - Class of the object contained by custom objectCompletionStage<Set> in which the result of its completion
contains a Set that contains the matching drafts if any exist, otherwise empty.@Nonnull java.util.concurrent.CompletionStage<java.util.Optional<T>> save(@Nonnull T draft, @Nonnull java.lang.String containerKey, @Nonnull java.lang.Class<T> clazz)
draft - the draft that should be persisted.containerKey - the key of the container, which contains the persisted draftclazz - Class of the object contained by custom objectCompletionStage containing an optional with the created resource if
successful otherwise an empty optional.@Nonnull java.util.concurrent.CompletionStage<java.util.Optional<T>> delete(@Nonnull java.lang.String key, @Nonnull java.lang.String containerKey, @Nonnull java.lang.Class<T> clazz)
key - the key of the draft to delete from persistence.containerKey - the key of the container, which contains the persisted draftclazz - Class of the object contained by custom objectCompletionStage containing an optional with the deleted resource if
successful otherwise an empty optional.