73 lines
2.8 KiB
Java
73 lines
2.8 KiB
Java
|
package eu.dnetlib.repo.manager.service;
|
||
|
|
||
|
import eu.dnetlib.domain.data.Repository;
|
||
|
import eu.dnetlib.domain.data.RepositoryInterface;
|
||
|
import eu.dnetlib.repo.manager.domain.RepositorySnippet;
|
||
|
import eu.dnetlib.repo.manager.exception.ResourceNotFoundException;
|
||
|
import eu.dnetlib.repo.manager.shared.*;
|
||
|
import org.json.JSONException;
|
||
|
import org.springframework.security.core.Authentication;
|
||
|
import java.io.IOException;
|
||
|
import java.util.List;
|
||
|
import java.util.Map;
|
||
|
|
||
|
public interface RepositoryApi {
|
||
|
|
||
|
|
||
|
Country[] getCountries() ;
|
||
|
|
||
|
List<RepositorySnippet> getRepositoriesByCountry(String country, String mode, Boolean managed) throws JSONException, IOException;
|
||
|
|
||
|
List<Repository> getRepositoriesOfUser(String userEmail,
|
||
|
String page,
|
||
|
String size) throws JSONException;
|
||
|
|
||
|
Repository getRepositoryById(String id) throws JSONException, ResourceNotFoundException;
|
||
|
|
||
|
List<AggregationDetails> getRepositoryAggregations(String id) throws JSONException;
|
||
|
|
||
|
Map<String,List<AggregationDetails>> getRepositoryAggregationsByYear(String id) throws JSONException;
|
||
|
|
||
|
List<Repository> getRepositoriesByName(String name,
|
||
|
String page,
|
||
|
String size) throws JSONException;
|
||
|
|
||
|
List<RepositoryInterface> getRepositoryInterface(String id) throws JSONException;
|
||
|
|
||
|
Repository addRepository(String datatype, Repository repository) throws Exception;
|
||
|
|
||
|
void deleteRepositoryInterface(String id, String registeredBy);
|
||
|
|
||
|
RepositoryInterface addRepositoryInterface(String datatype,
|
||
|
String repoId,
|
||
|
String registeredBy,
|
||
|
RepositoryInterface iFace) throws JSONException,ResourceNotFoundException;
|
||
|
|
||
|
List<String> getDnetCountries();
|
||
|
|
||
|
List<String> getTypologies();
|
||
|
|
||
|
List<Timezone> getTimezones();
|
||
|
|
||
|
Repository updateRepository(Repository repository, Authentication authentication) throws Exception;
|
||
|
|
||
|
List<String> getUrlsOfUserRepos(String user_email,
|
||
|
String page,
|
||
|
String size) throws JSONException;
|
||
|
|
||
|
List<String> getDatasourceVocabularies(String mode);
|
||
|
|
||
|
Map<String, String> getCompatibilityClasses(String mode);
|
||
|
|
||
|
Map<String, String> getDatasourceClasses(String mode);
|
||
|
|
||
|
String getCountryName(String countryCode);
|
||
|
|
||
|
MetricsInfo getMetricsInfoForRepository(String repoId) throws RepositoryServiceException;
|
||
|
|
||
|
Map<String, String> getListLatestUpdate(String mode) throws RepositoryServiceException, JSONException;
|
||
|
|
||
|
RepositoryInterface updateRepositoryInterface(String repositoryId, String registeredBy, RepositoryInterface repositoryInterface) throws JSONException;
|
||
|
|
||
|
}
|