package eu.dnetlib.dsm;

import java.util.List;

import eu.dnetlib.data.openaire.dsm.model.Api;
import eu.dnetlib.data.openaire.dsm.model.Datasource;
import eu.dnetlib.is.errors.DsmException;
import eu.dnetlib.is.errors.DsmForbiddenException;
import eu.dnetlib.is.errors.DsmNotFoundException;

public interface DatasourceManagerCommon {

	Datasource getDs(String id) throws DsmException;

	Datasource getDsByNsPrefix(String prefix) throws DsmException;

	List<? extends Api> getApis(String dsId) throws DsmException;

	void deleteDs(String dsId) throws DsmException;

	void deleteApi(String dsId, String apiId) throws DsmForbiddenException, DsmNotFoundException;

	void addApi(Api api) throws DsmException;

	void setManaged(String id, boolean managed) throws DsmException;

	boolean isManaged(String id) throws DsmException;

	void saveDs(Datasource datasource) throws DsmException;

	void updateCompliance(String dsId, String apiId, String compliance, boolean override) throws DsmException;

}
