io.thestencil.client.api.StencilStore Maven / Gradle / Ivy
package io.thestencil.client.api;
/*-
* #%L
* stencil-client-api
* %%
* Copyright (C) 2021 - 2022 Copyright 2021 ReSys OÜ
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import java.util.List;
import org.immutables.value.Value;
import io.smallrye.mutiny.Uni;
import io.thestencil.client.api.StencilClient.Entity;
import io.thestencil.client.api.StencilClient.EntityBody;
import io.thestencil.client.api.StencilClient.EntityType;
import io.thestencil.client.api.StencilComposer.SiteState;
import io.thestencil.client.api.StencilConfig.EntityState;
public interface StencilStore {
Uni> delete(Entity toBeDeleted);
Uni> get(String blobId, EntityType type);
Uni> save(Entity toBeSaved);
Uni> create(Entity toBeSaved);
Uni>> saveAll(List> toBeSaved);
Uni>> batch(BatchCommand batch);
StencilConfig getConfig();
@Value.Immutable
@SuppressWarnings("rawtypes")
interface BatchCommand {
List getToBeCreated();
List getToBeSaved();
List getToBeDeleted();
}
QueryBuilder query();
StoreRepoBuilder repo();
String getRepoName();
String getHeadName();
String gid(EntityType type);
interface QueryBuilder {
Uni head();
Uni release(String releaseId);
Uni>> head(List ids, EntityType type);
}
interface StoreRepoBuilder {
StoreRepoBuilder repoName(String repoName);
StoreRepoBuilder headName(String headName);
Uni create();
StencilStore build();
Uni createIfNot();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy