90 lines
3.6 KiB
Java
90 lines
3.6 KiB
Java
package eu.dnetlib.repo.manager.service;
|
|
|
|
import eu.dnetlib.repo.manager.domain.*;
|
|
import eu.dnetlib.repo.manager.exception.RepositoryServiceException;
|
|
import eu.dnetlib.repo.manager.exception.ResourceNotFoundException;
|
|
import org.json.JSONException;
|
|
import org.springframework.security.core.Authentication;
|
|
|
|
import java.io.IOException;
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
|
|
public interface RepositoryService {
|
|
|
|
|
|
// TODO: move this elsewhere
|
|
Country[] getCountries();
|
|
|
|
List<Repository> getRepositories(List<String> ids) throws JSONException;
|
|
|
|
List<Repository> getRepositories(List<String> ids, int page, int size) throws JSONException;
|
|
|
|
List<RepositorySnippet> getRepositoriesSnippets(List<String> ids) throws Exception;
|
|
|
|
List<RepositorySnippet> getRepositoriesSnippets(List<String> ids, int page, int size) throws Exception;
|
|
|
|
List<RepositorySnippet> getRepositoriesByCountry(String country, String mode, Boolean managed) throws JSONException, IOException;
|
|
|
|
// TODO: remove?
|
|
List<Repository> getRepositoriesOfUser(String page, String size) throws JSONException, IOException;
|
|
|
|
// TODO: remove?
|
|
List<Repository> getRepositoriesOfUser(String userEmail,
|
|
String page,
|
|
String size) throws JSONException, IOException;
|
|
|
|
List<RepositorySnippet> getRepositoriesSnippetsOfUser(String page, String size) throws Exception;
|
|
|
|
List<RepositorySnippet> getRepositoriesSnippetsOfUser(String userEmail, String page, String size) throws Exception;
|
|
|
|
RepositorySnippet getRepositorySnippetById(String id) throws JSONException, ResourceNotFoundException;
|
|
|
|
Repository getRepositoryById(String id) throws JSONException, ResourceNotFoundException;
|
|
|
|
List<Repository> getRepositoriesByName(String name,
|
|
String page,
|
|
String size) throws JSONException;
|
|
|
|
List<RepositorySnippet> searchRegisteredRepositories(String country, String typology, String englishName,
|
|
String officialName, String requestSortBy, String order,
|
|
int page, int pageSize) throws Exception;
|
|
|
|
int getTotalRegisteredRepositories();
|
|
|
|
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 comment, RepositoryInterface repositoryInterface) throws Exception;
|
|
|
|
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);
|
|
|
|
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 JSONException;
|
|
|
|
RepositoryInterface updateRepositoryInterface(String repoId, String comment, RepositoryInterface repositoryInterface) throws Exception;
|
|
|
|
}
|