Project

General

Profile

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

    
3
import eu.dnetlib.domain.data.PiwikInfo;
4
import eu.dnetlib.domain.data.Repository;
5
import eu.dnetlib.domain.data.RepositoryInterface;
6
import eu.dnetlib.domain.functionality.validator.JobForValidation;
7
import org.springframework.security.core.Authentication;
8

    
9
public interface EmailUtils {
10

    
11

    
12
    void reportException(Exception exception);
13

    
14
    void sendAdministratorRequestToEnableMetrics(PiwikInfo piwikInfo) throws Exception;
15

    
16
    void sendUserRequestToEnableMetrics(PiwikInfo piwikInfo) throws Exception;
17

    
18
    void sendAdministratorMetricsEnabled(PiwikInfo piwikInfo) throws Exception;
19

    
20
    void sendUserMetricsEnabled(PiwikInfo piwikInfo) throws Exception;
21

    
22
    /****USER REGISTRATION REQUEST EMAILS****/
23
    void sendAdminRegistrationEmail(Repository repository, Authentication authentication) throws Exception;
24

    
25
    void sendUserRegistrationEmail(Repository repository, Authentication authentication) throws Exception;
26

    
27
    void sendAdminRegisterInterfaceEmail(Repository repository, String comment, RepositoryInterface repositoryInterface, Authentication authentication) throws Exception;
28

    
29
    void sendUserRegisterInterfaceEmail(Repository repository, String comment, RepositoryInterface repositoryInterface, Authentication authentication) throws Exception;
30

    
31
    /****SUCCESSFUL REGISTRATION RESULTS EMAILS****/
32
    void sendUserRegistrationResultsSuccessEmail(String issuerEmail, String jobId,RepositoryInterface repositoryInterface, Repository repository, Authentication authentication) throws Exception;
33

    
34
    void sendAdminRegistrationResultsSuccessEmail(String issuerEmail, String jobId,RepositoryInterface repositoryInterface, Repository repository, Authentication authentication) throws Exception;
35

    
36
    /****FAILURE REGISTRATION RESULTS EMAILS****/
37
    void sendUserRegistrationResultsFailureEmail(String jobId,RepositoryInterface repositoryInterface, Repository repository, Authentication authentication) throws Exception;
38

    
39
    void sendAdminRegistrationResultsFailureEmail(String issuerEmail, String jobId,RepositoryInterface repositoryInterface, Repository repository, Authentication authentication) throws Exception;
40

    
41
    /****SUCCESSFUL UPDATE RESULTS EMAILS****/
42
    void sendUserUpdateResultsSuccessEmail(String issuer, String jobId,RepositoryInterface repositoryInterface, Repository repository, Authentication authentication) throws Exception;
43

    
44
    void sendAdminUpdateResultsSuccessEmail(String issuerEmail, String jobId,RepositoryInterface repositoryInterface, Repository repository, Authentication authentication) throws Exception;
45

    
46
    /****FAILURE UPDATE RESULTS EMAILS****/
47
    void sendUserUpdateResultsFailureEmail(String issuer, String jobId,RepositoryInterface repositoryInterface, Repository repository, Authentication authentication) throws Exception;
48

    
49
    void sendAdminUpdateResultsFailureEmail(String issuerEmail, String jobId,RepositoryInterface repositoryInterface, Repository repository, Authentication authentication) throws Exception;
50

    
51
    /****VALIDATION OF CONTENT PROVIDER EMAILS****/
52
    void sendUserValidationResults(String issuer,String jobId,RepositoryInterface repositoryInterface, Repository repository, Authentication authentication) throws Exception;
53

    
54
    void sendAdminValidationResults(String issuer,String jobId,RepositoryInterface repositoryInterface, Repository repository, Authentication authentication) throws Exception;
55

    
56
    /****GENERAL FAILURE OF VALIDATOR****/
57
    void sendAdminGeneralFailure(String issuer,String jobId,RepositoryInterface repositoryInterface, Repository repository, Authentication authentication) throws Exception;
58

    
59

    
60
    void sendAdminUpdateRepositoryInfoEmail(Repository repository, Authentication authentication) throws Exception;
61

    
62
    void sendUserUpdateRepositoryInfoEmail(Repository repository, Authentication authentication) throws Exception;
63

    
64
    void sendAdminUpdateInterfaceEmail(Repository repository, String comment, RepositoryInterface repositoryInterface, Authentication authentication) throws Exception;
65

    
66
    void sendUserUpdateInterfaceEmail(Repository repository, String comment, RepositoryInterface repositoryInterface, Authentication authentication) throws Exception;
67

    
68
    void sendSubmitJobForValidationEmail(Authentication authentication, JobForValidation jobForValidation) throws Exception;
69

    
70
    void sendUponJobCompletion(String repoId,
71
                               String repoInterfaceId,
72
                               int scoreUsage,
73
                               int scoreContent,
74
                               boolean isSuccess,
75
                               boolean isUpdate,
76
                               String issuerEmail,
77
                               String jobId) throws Exception;
78
}
(5-5/20)