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

    
11
import java.io.IOException;
12
import java.util.List;
13
import java.util.Map;
14

    
15
public interface RepositoryService {
16

    
17

    
18
    Country[] getCountries() ;
19

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

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

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

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

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

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

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

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

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

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

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

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

    
53
    List<String> getDnetCountries();
54

    
55
    List<String> getTypologies();
56

    
57
    List<Timezone> getTimezones();
58

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

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

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

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

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

    
71
    String getCountryName(String countryCode);
72

    
73
    MetricsInfo getMetricsInfoForRepository(String repoId) throws RepositoryServiceException;
74

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

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

    
79
}
(11-11/20)