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

    
12
public interface EmailUtils {
13

    
14

    
15
    void reportException(Exception exception);
16

    
17
    void sendAdministratorRequestToEnableMetrics(PiwikInfo piwikInfo) throws Exception;
18

    
19
    void sendUserRequestToEnableMetrics(PiwikInfo piwikInfo) throws Exception;
20

    
21
    void sendAdministratorMetricsEnabled(PiwikInfo piwikInfo) throws Exception;
22

    
23
    void sendUserMetricsEnabled(PiwikInfo piwikInfo) throws Exception;
24

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

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

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

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

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

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

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

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

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

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

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

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

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

    
58

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

    
61
    void sendUserUpdateRepositoryEmail(Repository repository, Authentication authentication) throws Exception;
62

    
63
    void sendSubmitJobForValidationEmail(Authentication authentication, JobForValidation jobForValidation) throws Exception;
64

    
65
    void sendUponJobCompletion(String repoId,
66
                               String repoInterfaceId,
67
                               int scoreUsage,
68
                               int scoreContent,
69
                               boolean isSuccess,
70
                               boolean isUpdate,
71
                               String issuerEmail,
72
                               String jobId) throws Exception;
73
}
(5-5/20)