You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
1.8 KiB
Java
45 lines
1.8 KiB
Java
package org.gcube.application.geoportal.service.engine.mongo;
|
|
|
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
|
import org.bson.Document;
|
|
import org.gcube.application.cms.plugins.faults.StepException;
|
|
import org.gcube.application.geoportal.common.faults.StorageException;
|
|
import org.gcube.application.geoportal.common.model.document.ProfiledDocument;
|
|
import org.gcube.application.geoportal.common.model.rest.QueryRequest;
|
|
import org.gcube.application.geoportal.common.rest.TempFile;
|
|
import org.gcube.application.geoportal.service.model.internal.faults.ConfigurationException;
|
|
import org.gcube.application.geoportal.service.model.internal.faults.DeletionException;
|
|
import org.gcube.common.storagehub.model.exceptions.StorageHubException;
|
|
|
|
import java.io.IOException;
|
|
import java.util.List;
|
|
|
|
public interface MongoManagerI<T> {
|
|
|
|
|
|
// create
|
|
|
|
public T registerNew(Document toRegister) throws IOException, StepException;
|
|
|
|
// update
|
|
public T update(String id,Document toSetDocument) throws IOException, StepException;
|
|
|
|
// delete
|
|
|
|
public void delete(String id,boolean force) throws DeletionException;
|
|
|
|
// get By ID
|
|
|
|
public T getByID(String id) throws IOException;
|
|
|
|
// query
|
|
|
|
public Iterable<Document> query(QueryRequest request);
|
|
public Iterable<T> filter(QueryRequest request);
|
|
|
|
public T performStep(String id, String step, Document options) throws IOException, StepException;
|
|
|
|
public T registerFileSet(String id, String destination, Document attributes, List<TempFile> files) throws ConfigurationException, StorageHubException, StorageException, StepException, JsonProcessingException;
|
|
public T deleteFileSet(String id, String destination, Boolean force) throws ConfigurationException, StorageHubException, StorageException, StepException, JsonProcessingException;
|
|
}
|