2019-02-16 11:04:41 +01:00
|
|
|
package eu.dnetlib.repo.manager.service;
|
|
|
|
|
|
|
|
import eu.dnetlib.domain.data.PiwikInfo;
|
|
|
|
import eu.dnetlib.domain.data.Repository;
|
2019-09-04 14:21:53 +02:00
|
|
|
import eu.dnetlib.domain.data.RepositoryInterface;
|
2019-02-16 11:04:41 +01:00
|
|
|
import eu.dnetlib.domain.functionality.validator.JobForValidation;
|
|
|
|
import org.springframework.security.core.Authentication;
|
|
|
|
|
|
|
|
public interface EmailUtils {
|
|
|
|
|
|
|
|
|
|
|
|
void reportException(Exception exception);
|
|
|
|
|
|
|
|
void sendAdministratorRequestToEnableMetrics(PiwikInfo piwikInfo) throws Exception;
|
|
|
|
|
|
|
|
void sendUserRequestToEnableMetrics(PiwikInfo piwikInfo) throws Exception;
|
|
|
|
|
|
|
|
void sendAdministratorMetricsEnabled(PiwikInfo piwikInfo) throws Exception;
|
|
|
|
|
|
|
|
void sendUserMetricsEnabled(PiwikInfo piwikInfo) throws Exception;
|
|
|
|
|
2019-09-04 14:21:53 +02:00
|
|
|
/****USER REGISTRATION REQUEST EMAILS****/
|
2019-07-19 11:31:23 +02:00
|
|
|
void sendAdminRegistrationEmail(Repository repository, Authentication authentication) throws Exception;
|
|
|
|
|
2019-02-16 11:04:41 +01:00
|
|
|
void sendUserRegistrationEmail(Repository repository, Authentication authentication) throws Exception;
|
|
|
|
|
2020-07-29 13:35:35 +02:00
|
|
|
void sendAdminRegisterInterfaceEmail(Repository repository, String comment, RepositoryInterface repositoryInterface, Authentication authentication) throws Exception;
|
2019-12-18 14:11:36 +01:00
|
|
|
|
2020-07-29 13:35:35 +02:00
|
|
|
void sendUserRegisterInterfaceEmail(Repository repository, String comment, RepositoryInterface repositoryInterface, Authentication authentication) throws Exception;
|
2019-12-18 14:11:36 +01:00
|
|
|
|
2019-09-04 14:21:53 +02:00
|
|
|
/****SUCCESSFUL REGISTRATION RESULTS EMAILS****/
|
|
|
|
void sendUserRegistrationResultsSuccessEmail(String issuerEmail, String jobId,RepositoryInterface repositoryInterface, Repository repository, Authentication authentication) throws Exception;
|
|
|
|
|
|
|
|
void sendAdminRegistrationResultsSuccessEmail(String issuerEmail, String jobId,RepositoryInterface repositoryInterface, Repository repository, Authentication authentication) throws Exception;
|
|
|
|
|
|
|
|
/****FAILURE REGISTRATION RESULTS EMAILS****/
|
|
|
|
void sendUserRegistrationResultsFailureEmail(String jobId,RepositoryInterface repositoryInterface, Repository repository, Authentication authentication) throws Exception;
|
|
|
|
|
|
|
|
void sendAdminRegistrationResultsFailureEmail(String issuerEmail, String jobId,RepositoryInterface repositoryInterface, Repository repository, Authentication authentication) throws Exception;
|
|
|
|
|
|
|
|
/****SUCCESSFUL UPDATE RESULTS EMAILS****/
|
|
|
|
void sendUserUpdateResultsSuccessEmail(String issuer, String jobId,RepositoryInterface repositoryInterface, Repository repository, Authentication authentication) throws Exception;
|
|
|
|
|
|
|
|
void sendAdminUpdateResultsSuccessEmail(String issuerEmail, String jobId,RepositoryInterface repositoryInterface, Repository repository, Authentication authentication) throws Exception;
|
|
|
|
|
|
|
|
/****FAILURE UPDATE RESULTS EMAILS****/
|
|
|
|
void sendUserUpdateResultsFailureEmail(String issuer, String jobId,RepositoryInterface repositoryInterface, Repository repository, Authentication authentication) throws Exception;
|
|
|
|
|
|
|
|
void sendAdminUpdateResultsFailureEmail(String issuerEmail, String jobId,RepositoryInterface repositoryInterface, Repository repository, Authentication authentication) throws Exception;
|
|
|
|
|
|
|
|
/****VALIDATION OF CONTENT PROVIDER EMAILS****/
|
|
|
|
void sendUserValidationResults(String issuer,String jobId,RepositoryInterface repositoryInterface, Repository repository, Authentication authentication) throws Exception;
|
|
|
|
|
|
|
|
void sendAdminValidationResults(String issuer,String jobId,RepositoryInterface repositoryInterface, Repository repository, Authentication authentication) throws Exception;
|
|
|
|
|
|
|
|
/****GENERAL FAILURE OF VALIDATOR****/
|
|
|
|
void sendAdminGeneralFailure(String issuer,String jobId,RepositoryInterface repositoryInterface, Repository repository, Authentication authentication) throws Exception;
|
|
|
|
|
|
|
|
|
2019-12-18 14:11:36 +01:00
|
|
|
void sendAdminUpdateRepositoryInfoEmail(Repository repository, Authentication authentication) throws Exception;
|
|
|
|
|
|
|
|
void sendUserUpdateRepositoryInfoEmail(Repository repository, Authentication authentication) throws Exception;
|
|
|
|
|
2020-07-29 13:35:35 +02:00
|
|
|
void sendAdminUpdateInterfaceEmail(Repository repository, String comment, RepositoryInterface repositoryInterface, Authentication authentication) throws Exception;
|
2019-07-19 11:31:23 +02:00
|
|
|
|
2020-07-29 13:35:35 +02:00
|
|
|
void sendUserUpdateInterfaceEmail(Repository repository, String comment, RepositoryInterface repositoryInterface, Authentication authentication) throws Exception;
|
2019-02-16 11:04:41 +01:00
|
|
|
|
|
|
|
void sendSubmitJobForValidationEmail(Authentication authentication, JobForValidation jobForValidation) throws Exception;
|
2019-09-04 14:21:53 +02:00
|
|
|
|
|
|
|
void sendUponJobCompletion(String repoId,
|
|
|
|
String repoInterfaceId,
|
|
|
|
int scoreUsage,
|
|
|
|
int scoreContent,
|
|
|
|
boolean isSuccess,
|
|
|
|
boolean isUpdate,
|
|
|
|
String issuerEmail,
|
|
|
|
String jobId) throws Exception;
|
2019-02-16 11:04:41 +01:00
|
|
|
}
|