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.RepositorySnippet;
7
import eu.dnetlib.repo.manager.exception.ResourceNotFoundException;
8
import eu.dnetlib.repo.manager.shared.*;
9
import org.json.JSONException;
10
import org.springframework.security.core.Authentication;
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;
25

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

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

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

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

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

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

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

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

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

    
51
    List<String> getDnetCountries();
52

    
53
    List<String> getTypologies();
54

    
55
    List<Timezone> getTimezones();
56

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

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

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

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

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

    
69
    String getCountryName(String countryCode);
70

    
71
    MetricsInfo getMetricsInfoForRepository(String repoId) throws RepositoryServiceException;
72

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

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

    
77
}
(11-11/20)