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
|
/****SUCCESSFUL REGISTRATION RESULTS EMAILS****/
|
28
|
void sendUserRegistrationResultsSuccessEmail(String issuerEmail, String jobId,RepositoryInterface repositoryInterface, Repository repository, Authentication authentication) throws Exception;
|
29
|
|
30
|
void sendAdminRegistrationResultsSuccessEmail(String issuerEmail, String jobId,RepositoryInterface repositoryInterface, Repository repository, Authentication authentication) throws Exception;
|
31
|
|
32
|
/****FAILURE REGISTRATION RESULTS EMAILS****/
|
33
|
void sendUserRegistrationResultsFailureEmail(String jobId,RepositoryInterface repositoryInterface, Repository repository, Authentication authentication) throws Exception;
|
34
|
|
35
|
void sendAdminRegistrationResultsFailureEmail(String issuerEmail, String jobId,RepositoryInterface repositoryInterface, Repository repository, Authentication authentication) throws Exception;
|
36
|
|
37
|
/****SUCCESSFUL UPDATE RESULTS EMAILS****/
|
38
|
void sendUserUpdateResultsSuccessEmail(String issuer, String jobId,RepositoryInterface repositoryInterface, Repository repository, Authentication authentication) throws Exception;
|
39
|
|
40
|
void sendAdminUpdateResultsSuccessEmail(String issuerEmail, String jobId,RepositoryInterface repositoryInterface, Repository repository, Authentication authentication) throws Exception;
|
41
|
|
42
|
/****FAILURE UPDATE RESULTS EMAILS****/
|
43
|
void sendUserUpdateResultsFailureEmail(String issuer, String jobId,RepositoryInterface repositoryInterface, Repository repository, Authentication authentication) throws Exception;
|
44
|
|
45
|
void sendAdminUpdateResultsFailureEmail(String issuerEmail, String jobId,RepositoryInterface repositoryInterface, Repository repository, Authentication authentication) throws Exception;
|
46
|
|
47
|
/****VALIDATION OF CONTENT PROVIDER EMAILS****/
|
48
|
void sendUserValidationResults(String issuer,String jobId,RepositoryInterface repositoryInterface, Repository repository, Authentication authentication) throws Exception;
|
49
|
|
50
|
void sendAdminValidationResults(String issuer,String jobId,RepositoryInterface repositoryInterface, Repository repository, Authentication authentication) throws Exception;
|
51
|
|
52
|
/****GENERAL FAILURE OF VALIDATOR****/
|
53
|
void sendAdminGeneralFailure(String issuer,String jobId,RepositoryInterface repositoryInterface, Repository repository, Authentication authentication) throws Exception;
|
54
|
|
55
|
|
56
|
void sendAdminUpdateRepositoryEmail(Repository repository, Authentication authentication) throws Exception;
|
57
|
|
58
|
void sendUserUpdateRepositoryEmail(Repository repository, Authentication authentication) throws Exception;
|
59
|
|
60
|
void sendSubmitJobForValidationEmail(Authentication authentication, JobForValidation jobForValidation) throws Exception;
|
61
|
|
62
|
void sendUponJobCompletion(String repoId,
|
63
|
String repoInterfaceId,
|
64
|
int scoreUsage,
|
65
|
int scoreContent,
|
66
|
boolean isSuccess,
|
67
|
boolean isUpdate,
|
68
|
String issuerEmail,
|
69
|
String jobId) throws Exception;
|
70
|
}
|