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.scheduling.annotation.Async;
8
import org.springframework.security.core.Authentication;
9

    
10
public interface EmailUtils {
11

    
12
    @Async
13
    void sendAdministratorRequestToEnableMetrics(PiwikInfo piwikInfo) throws Exception;
14

    
15
    @Async
16
    void sendUserRequestToEnableMetrics(PiwikInfo piwikInfo) throws Exception;
17

    
18
    @Async
19
    void sendAdministratorMetricsEnabled(PiwikInfo piwikInfo) throws Exception;
20

    
21
    @Async
22
    void sendUserMetricsEnabled(PiwikInfo piwikInfo) throws Exception;
23

    
24
    /****USER REGISTRATION REQUEST EMAILS****/
25
    @Async
26
    void sendAdminRegistrationEmail(Repository repository, Authentication authentication) throws Exception;
27

    
28
    @Async
29
    void sendUserRegistrationEmail(Repository repository, Authentication authentication) throws Exception;
30

    
31
    @Async
32
    void sendAdminRegisterInterfaceEmail(Repository repository, String comment, RepositoryInterface repositoryInterface, Authentication authentication) throws Exception;
33

    
34
    @Async
35
    void sendUserRegisterInterfaceEmail(Repository repository, String comment, RepositoryInterface repositoryInterface, Authentication authentication) throws Exception;
36

    
37
    /****SUCCESSFUL REGISTRATION RESULTS EMAILS****/
38
    @Async
39
    void sendUserRegistrationResultsSuccessEmail(String issuerEmail, String jobId,RepositoryInterface repositoryInterface, Repository repository, Authentication authentication) throws Exception;
40

    
41
    @Async
42
    void sendAdminRegistrationResultsSuccessEmail(String issuerEmail, String jobId,RepositoryInterface repositoryInterface, Repository repository, Authentication authentication) throws Exception;
43

    
44
    /****FAILURE REGISTRATION RESULTS EMAILS****/
45
    @Async
46
    void sendUserRegistrationResultsFailureEmail(String jobId,RepositoryInterface repositoryInterface, Repository repository, Authentication authentication) throws Exception;
47

    
48
    @Async
49
    void sendAdminRegistrationResultsFailureEmail(String issuerEmail, String jobId,RepositoryInterface repositoryInterface, Repository repository, Authentication authentication) throws Exception;
50

    
51
    /****SUCCESSFUL UPDATE RESULTS EMAILS****/
52
    @Async
53
    void sendUserUpdateResultsSuccessEmail(String issuer, String jobId,RepositoryInterface repositoryInterface, Repository repository, Authentication authentication) throws Exception;
54

    
55
    @Async
56
    void sendAdminUpdateResultsSuccessEmail(String issuerEmail, String jobId,RepositoryInterface repositoryInterface, Repository repository, Authentication authentication) throws Exception;
57

    
58
    /****FAILURE UPDATE RESULTS EMAILS****/
59
    @Async
60
    void sendUserUpdateResultsFailureEmail(String issuer, String jobId,RepositoryInterface repositoryInterface, Repository repository, Authentication authentication) throws Exception;
61

    
62
    @Async
63
    void sendAdminUpdateResultsFailureEmail(String issuerEmail, String jobId,RepositoryInterface repositoryInterface, Repository repository, Authentication authentication) throws Exception;
64

    
65
    /****VALIDATION OF CONTENT PROVIDER EMAILS****/
66
    @Async
67
    void sendUserValidationResults(String issuer,String jobId,RepositoryInterface repositoryInterface, Repository repository, Authentication authentication) throws Exception;
68

    
69
    @Async
70
    void sendAdminValidationResults(String issuer,String jobId,RepositoryInterface repositoryInterface, Repository repository, Authentication authentication) throws Exception;
71

    
72
    /****GENERAL FAILURE OF VALIDATOR****/
73
    @Async
74
    void sendAdminGeneralFailure(String issuer,String jobId,RepositoryInterface repositoryInterface, Repository repository, Authentication authentication) throws Exception;
75

    
76

    
77
    @Async
78
    void sendAdminUpdateRepositoryInfoEmail(Repository repository, Authentication authentication) throws Exception;
79

    
80
    @Async
81
    void sendUserUpdateRepositoryInfoEmail(Repository repository, Authentication authentication) throws Exception;
82

    
83
    @Async
84
    void sendAdminUpdateInterfaceEmail(Repository repository, String comment, RepositoryInterface repositoryInterface, Authentication authentication) throws Exception;
85

    
86
    @Async
87
    void sendUserUpdateInterfaceEmail(Repository repository, String comment, RepositoryInterface repositoryInterface, Authentication authentication) throws Exception;
88

    
89
    @Async
90
    void sendSubmitJobForValidationEmail(Authentication authentication, JobForValidation jobForValidation) throws Exception;
91

    
92
    @Async
93
    void sendUponJobCompletion(String repoId,
94
                               String repoInterfaceId,
95
                               int scoreUsage,
96
                               int scoreContent,
97
                               boolean isSuccess,
98
                               boolean isUpdate,
99
                               String issuerEmail,
100
                               String jobId) throws Exception;
101
}
(5-5/20)