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.RepositorySnippet;
6
import eu.dnetlib.repo.manager.exception.ResourceNotFoundException;
7
import eu.dnetlib.repo.manager.shared.*;
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) 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<RepositoryInterface> getRepositoryInterface(String id) throws JSONException;
36

    
37
    Repository addRepository(String datatype, Repository repository) throws Exception;
38

    
39
    void deleteRepositoryInterface(String id, String registeredBy);
40

    
41
    RepositoryInterface addRepositoryInterface(String datatype,
42
                                               String repoId,
43
                                               String registeredBy,
44
                                               RepositoryInterface iFace) throws JSONException,ResourceNotFoundException;
45

    
46
    List<String> getDnetCountries();
47

    
48
    List<String> getTypologies();
49

    
50
    List<Timezone> getTimezones();
51

    
52
    Repository updateRepository(Repository repository, Authentication authentication) throws Exception;
53

    
54
    List<String> getUrlsOfUserRepos(String user_email,
55
                                    String page,
56
                                    String size) throws JSONException;
57

    
58
    List<String> getDatasourceVocabularies(String mode);
59

    
60
    Map<String, String> getCompatibilityClasses(String mode);
61

    
62
    Map<String, String> getDatasourceClasses(String mode);
63

    
64
    String getCountryName(String countryCode);
65

    
66
    MetricsInfo getMetricsInfoForRepository(String repoId) throws RepositoryServiceException;
67

    
68
    Map<String, String> getListLatestUpdate(String mode) throws RepositoryServiceException, JSONException;
69

    
70
    RepositoryInterface updateRepositoryInterface(String repositoryId, String registeredBy, RepositoryInterface repositoryInterface) throws Exception;
71

    
72
}
(9-9/18)