package eu.dnetlib.repo.manager.service; import eu.dnetlib.domain.data.PiwikInfo; import eu.dnetlib.domain.data.Repository; import eu.dnetlib.domain.data.RepositoryInterface; import eu.dnetlib.domain.functionality.validator.JobForValidation; import org.springframework.scheduling.annotation.Async; import org.springframework.security.core.Authentication; public interface EmailUtils { @Async void sendAdministratorRequestToEnableMetrics(PiwikInfo piwikInfo) throws Exception; @Async void sendUserRequestToEnableMetrics(PiwikInfo piwikInfo) throws Exception; @Async void sendAdministratorMetricsEnabled(PiwikInfo piwikInfo) throws Exception; @Async void sendUserMetricsEnabled(PiwikInfo piwikInfo) throws Exception; /****USER REGISTRATION REQUEST EMAILS****/ @Async void sendAdminRegistrationEmail(Repository repository, Authentication authentication) throws Exception; @Async void sendUserRegistrationEmail(Repository repository, Authentication authentication) throws Exception; @Async void sendAdminRegisterInterfaceEmail(Repository repository, String comment, RepositoryInterface repositoryInterface, Authentication authentication) throws Exception; @Async void sendUserRegisterInterfaceEmail(Repository repository, String comment, RepositoryInterface repositoryInterface, Authentication authentication) throws Exception; /****SUCCESSFUL REGISTRATION RESULTS EMAILS****/ @Async void sendUserRegistrationResultsSuccessEmail(String issuerEmail, String jobId,RepositoryInterface repositoryInterface, Repository repository, Authentication authentication) throws Exception; @Async void sendAdminRegistrationResultsSuccessEmail(String issuerEmail, String jobId,RepositoryInterface repositoryInterface, Repository repository, Authentication authentication) throws Exception; /****FAILURE REGISTRATION RESULTS EMAILS****/ @Async void sendUserRegistrationResultsFailureEmail(String jobId,RepositoryInterface repositoryInterface, Repository repository, Authentication authentication) throws Exception; @Async void sendAdminRegistrationResultsFailureEmail(String issuerEmail, String jobId,RepositoryInterface repositoryInterface, Repository repository, Authentication authentication) throws Exception; /****SUCCESSFUL UPDATE RESULTS EMAILS****/ @Async void sendUserUpdateResultsSuccessEmail(String issuer, String jobId,RepositoryInterface repositoryInterface, Repository repository, Authentication authentication) throws Exception; @Async void sendAdminUpdateResultsSuccessEmail(String issuerEmail, String jobId,RepositoryInterface repositoryInterface, Repository repository, Authentication authentication) throws Exception; /****FAILURE UPDATE RESULTS EMAILS****/ @Async void sendUserUpdateResultsFailureEmail(String issuer, String jobId,RepositoryInterface repositoryInterface, Repository repository, Authentication authentication) throws Exception; @Async void sendAdminUpdateResultsFailureEmail(String issuerEmail, String jobId,RepositoryInterface repositoryInterface, Repository repository, Authentication authentication) throws Exception; /****VALIDATION OF CONTENT PROVIDER EMAILS****/ @Async void sendUserValidationResults(String issuer,String jobId,RepositoryInterface repositoryInterface, Repository repository, Authentication authentication) throws Exception; @Async void sendAdminValidationResults(String issuer,String jobId,RepositoryInterface repositoryInterface, Repository repository, Authentication authentication) throws Exception; /****GENERAL FAILURE OF VALIDATOR****/ @Async void sendAdminGeneralFailure(String issuer,String jobId,RepositoryInterface repositoryInterface, Repository repository, Authentication authentication) throws Exception; @Async void sendAdminUpdateRepositoryInfoEmail(Repository repository, Authentication authentication) throws Exception; @Async void sendUserUpdateRepositoryInfoEmail(Repository repository, Authentication authentication) throws Exception; @Async void sendAdminUpdateInterfaceEmail(Repository repository, String comment, RepositoryInterface repositoryInterface, Authentication authentication) throws Exception; @Async void sendUserUpdateInterfaceEmail(Repository repository, String comment, RepositoryInterface repositoryInterface, Authentication authentication) throws Exception; @Async void sendSubmitJobForValidationEmail(Authentication authentication, JobForValidation jobForValidation) throws Exception; @Async void sendUponJobCompletion(String repoId, String repoInterfaceId, int scoreUsage, int scoreContent, boolean isSuccess, boolean isUpdate, String issuerEmail, String jobId) throws Exception; }