Project

General

Profile

1
package eu.dnetlib.repo.manager.service;
2

    
3
import eu.dnetlib.api.functionality.ValidatorServiceException;
4
import eu.dnetlib.domain.data.Repository;
5
import eu.dnetlib.domain.data.RepositoryInterface;
6
import eu.dnetlib.repo.manager.domain.*;
7
import eu.dnetlib.repo.manager.exception.ResourceNotFoundException;
8
import org.json.JSONException;
9
import org.springframework.security.core.Authentication;
10
import java.io.IOException;
11
import java.util.List;
12
import java.util.Map;
13

    
14
public interface RepositoryService {
15

    
16

    
17
    Country[] getCountries() ;
18

    
19
    List<RepositorySnippet> getRepositoriesByCountry(String country, String mode, Boolean managed) throws JSONException, IOException;
20

    
21
    List<Repository> getRepositoriesOfUser(String userEmail,
22
                                           String page,
23
                                           String size) throws JSONException;
24

    
25
    Repository getRepositoryById(String id) throws JSONException, ResourceNotFoundException;
26

    
27
    List<AggregationDetails> getRepositoryAggregations(String id, int from, int size) throws JSONException;
28

    
29
    Map<String,List<AggregationDetails>> getRepositoryAggregationsByYear(String id) throws JSONException;
30

    
31
    List<Repository> getRepositoriesByName(String name,
32
                                           String page,
33
                                           String size) throws JSONException;
34

    
35
    List<RepositorySnippet> searchRegisteredRepositories(String country, String typology, String englishName,
36
                                                                String officialName, String requestSortBy, String order,
37
                                                                int page, int pageSize) throws Exception;
38

    
39
    List<RepositoryInterface> getRepositoryInterface(String id) throws JSONException;
40

    
41
    Repository addRepository(String datatype, Repository repository) throws Exception;
42

    
43
    void deleteRepositoryInterface(String id, String registeredBy);
44

    
45
    RepositoryInterface addRepositoryInterface(String datatype,
46
                                               String repoId,
47
                                               String registeredBy,
48
                                               RepositoryInterface iFace) throws JSONException, ResourceNotFoundException, ValidatorServiceException;
49

    
50
    List<String> getDnetCountries();
51

    
52
    List<String> getTypologies();
53

    
54
    List<Timezone> getTimezones();
55

    
56
    Repository updateRepository(Repository repository, Authentication authentication) throws Exception;
57

    
58
    List<String> getUrlsOfUserRepos(String user_email,
59
                                    String page,
60
                                    String size) throws JSONException;
61

    
62
    List<String> getDatasourceVocabularies(String mode);
63

    
64
    Map<String, String> getCompatibilityClasses(String mode);
65

    
66
    Map<String, String> getDatasourceClasses(String mode);
67

    
68
    String getCountryName(String countryCode);
69

    
70
    MetricsInfo getMetricsInfoForRepository(String repoId) throws RepositoryServiceException;
71

    
72
    Map<String, String> getListLatestUpdate(String mode) throws RepositoryServiceException, JSONException;
73

    
74
    RepositoryInterface updateRepositoryInterface(String repositoryId, String registeredBy, RepositoryInterface repositoryInterface) throws Exception;
75

    
76
}
(11-11/20)