Project

General

Profile

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

    
3
import eu.dnetlib.domain.data.Repository;
4
import eu.dnetlib.domain.data.RepositoryInterface;
5
import eu.dnetlib.repo.manager.domain.*;
6
import eu.dnetlib.repo.manager.exception.ResourceNotFoundException;
7
import org.json.JSONException;
8
import org.springframework.security.core.Authentication;
9

    
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<Repository> getRepositories(List<String> ids) throws JSONException;
20

    
21
    List<Repository> getRepositories(List<String> ids, int page, int size) throws JSONException;
22

    
23
    List<RepositorySnippet> getRepositoriesSnippets(List<String> ids) throws Exception;
24

    
25
    List<RepositorySnippet> getRepositoriesSnippets(List<String> ids, int page, int size) throws Exception;
26

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

    
29
    List<Repository> getRepositoriesOfUser(String page, String size) throws JSONException, IOException;
30

    
31
    List<Repository> getRepositoriesOfUser(String userEmail,
32
                                           String page,
33
                                           String size) throws JSONException, IOException;
34

    
35
    List<RepositorySnippet> getRepositoriesSnippetOfUser(String page, String size) throws Exception;
36

    
37
    List<RepositorySnippet> getRepositoriesSnippetOfUser(String userEmail, String page, String size) throws Exception;
38

    
39
    RepositorySnippet getRepositorySnippetById(String id) throws JSONException, ResourceNotFoundException;
40
    Repository getRepositoryById(String id) throws JSONException, ResourceNotFoundException;
41

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

    
44
    Map<String,List<AggregationDetails>> getRepositoryAggregationsByYear(String id) throws JSONException;
45

    
46
    List<Repository> getRepositoriesByName(String name,
47
                                           String page,
48
                                           String size) throws JSONException;
49

    
50
    List<RepositorySnippet> searchRegisteredRepositories(String country, String typology, String englishName,
51
                                                                String officialName, String requestSortBy, String order,
52
                                                                int page, int pageSize) throws Exception;
53

    
54
    List<RepositoryInterface> getRepositoryInterface(String id) throws JSONException;
55

    
56
    Repository addRepository(String datatype, Repository repository) throws Exception;
57

    
58
    void deleteRepositoryInterface(String id, String registeredBy);
59

    
60
    RepositoryInterface addRepositoryInterface(String datatype,
61
                                               String repoId,
62
                                               String registeredBy,
63
                                               String comment, RepositoryInterface repositoryInterface) throws Exception;
64

    
65
    List<String> getDnetCountries();
66

    
67
    List<String> getTypologies();
68

    
69
    List<Timezone> getTimezones();
70

    
71
    Repository updateRepository(Repository repository, Authentication authentication) throws Exception;
72

    
73
    List<String> getUrlsOfUserRepos(String user_email,
74
                                    String page,
75
                                    String size) throws JSONException;
76

    
77
    List<String> getDatasourceVocabularies(String mode);
78

    
79
    Map<String, String> getCompatibilityClasses(String mode);
80

    
81
    Map<String, String> getDatasourceClasses(String mode);
82

    
83
    String getCountryName(String countryCode);
84

    
85
    MetricsInfo getMetricsInfoForRepository(String repoId) throws RepositoryServiceException;
86

    
87
    Map<String, String> getListLatestUpdate(String mode) throws RepositoryServiceException, JSONException;
88

    
89
    RepositoryInterface updateRepositoryInterface(String repoId, String registeredBy, String comment, RepositoryInterface repositoryInterface) throws Exception;
90

    
91
}
(11-11/20)