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, IOException;
24

    
25
    List<RepositorySnippet> getRepositoriesSnippetOfUser(String userEmail, String page, String size) throws IOException, JSONException;
26

    
27
    Repository getRepositoryById(String id) throws JSONException, ResourceNotFoundException;
28

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

    
31
    Map<String,List<AggregationDetails>> getRepositoryAggregationsByYear(String id) throws JSONException;
32

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

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

    
41
    List<RepositoryInterface> getRepositoryInterface(String id) throws JSONException;
42

    
43
    Repository addRepository(String datatype, Repository repository) throws Exception;
44

    
45
    void deleteRepositoryInterface(String id, String registeredBy);
46

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

    
52
    List<String> getDnetCountries();
53

    
54
    List<String> getTypologies();
55

    
56
    List<Timezone> getTimezones();
57

    
58
    Repository updateRepository(Repository repository, Authentication authentication) throws Exception;
59

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

    
64
    List<String> getDatasourceVocabularies(String mode);
65

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

    
68
    Map<String, String> getDatasourceClasses(String mode);
69

    
70
    String getCountryName(String countryCode);
71

    
72
    MetricsInfo getMetricsInfoForRepository(String repoId) throws RepositoryServiceException;
73

    
74
    Map<String, String> getListLatestUpdate(String mode) throws RepositoryServiceException, JSONException;
75

    
76
    RepositoryInterface updateRepositoryInterface(String repositoryId, String registeredBy, RepositoryInterface repositoryInterface) throws Exception;
77

    
78
}
(11-11/20)