uoa-repository-manager-service/src/main/java/eu/dnetlib/repo/manager/service/EmailUtils.java

112 lines
5.0 KiB
Java
Raw Normal View History

package eu.dnetlib.repo.manager.service;
import eu.dnetlib.domain.data.PiwikInfo;
2022-12-01 14:19:29 +01:00
import eu.dnetlib.domain.functionality.validator.JobForValidation;
import eu.dnetlib.repo.manager.domain.InterfaceComplianceRequest;
import eu.dnetlib.repo.manager.domain.Repository;
import eu.dnetlib.repo.manager.domain.RepositoryInterface;
2021-10-22 13:32:44 +02:00
import org.springframework.scheduling.annotation.Async;
import org.springframework.security.core.Authentication;
import java.util.List;
public interface EmailUtils {
2021-10-22 13:32:44 +02:00
@Async
void sendAdministratorRequestToEnableMetrics(PiwikInfo piwikInfo);
2021-10-22 13:32:44 +02:00
@Async
void sendUserRequestToEnableMetrics(PiwikInfo piwikInfo);
2021-10-22 13:32:44 +02:00
@Async
void sendAdministratorMetricsEnabled(PiwikInfo piwikInfo);
2021-10-22 13:32:44 +02:00
@Async
void sendUserMetricsEnabled(PiwikInfo piwikInfo);
/****USER REGISTRATION REQUEST EMAILS****/
2021-10-22 13:32:44 +02:00
@Async
void sendAdminRegistrationEmail(Repository repository, Authentication authentication);
2021-10-22 13:32:44 +02:00
@Async
void sendUserRegistrationEmail(Repository repository, Authentication authentication);
2021-10-22 13:32:44 +02:00
@Async
void sendAdminRegisterInterfaceEmail(Repository repository, String comment, RepositoryInterface repositoryInterface, Authentication authentication);
2021-10-22 13:32:44 +02:00
@Async
void sendUserRegisterInterfaceEmail(Repository repository, String comment, RepositoryInterface repositoryInterface, Authentication authentication);
/****SUCCESSFUL REGISTRATION RESULTS EMAILS****/
2021-10-22 13:32:44 +02:00
@Async
void sendUserRegistrationResultsSuccessEmail(String issuerEmail, String jobId, RepositoryInterface repositoryInterface, Repository repository, Authentication authentication);
2021-10-22 13:32:44 +02:00
@Async
void sendAdminRegistrationResultsSuccessEmail(String issuerEmail, String jobId, RepositoryInterface repositoryInterface, Repository repository, Authentication authentication);
/****FAILURE REGISTRATION RESULTS EMAILS****/
2021-10-22 13:32:44 +02:00
@Async
void sendUserRegistrationResultsFailureEmail(String jobId, RepositoryInterface repositoryInterface, Repository repository, Authentication authentication);
2021-10-22 13:32:44 +02:00
@Async
void sendAdminRegistrationResultsFailureEmail(String issuerEmail, String jobId, RepositoryInterface repositoryInterface, Repository repository, Authentication authentication);
/****SUCCESSFUL UPDATE RESULTS EMAILS****/
2021-10-22 13:32:44 +02:00
@Async
void sendUserUpdateResultsSuccessEmail(String issuer, String jobId, RepositoryInterface repositoryInterface, Repository repository, Authentication authentication);
2021-10-22 13:32:44 +02:00
@Async
void sendAdminUpdateResultsSuccessEmail(String issuerEmail, String jobId, RepositoryInterface repositoryInterface, Repository repository, Authentication authentication);
/****FAILURE UPDATE RESULTS EMAILS****/
2021-10-22 13:32:44 +02:00
@Async
void sendUserUpdateResultsFailureEmail(String issuer, String jobId, RepositoryInterface repositoryInterface, Repository repository, Authentication authentication);
@Async
void sendAdminUpdateResultsFailureEmail(String issuerEmail, String jobId, RepositoryInterface repositoryInterface, Repository repository, Authentication authentication);
/****FAILURE UPDATE INTERFACE COMPLIANCE****/
@Async
void sendUserUpdateInterfaceComplianceFailure(List<String> emails, Repository repository, RepositoryInterface repositoryInterface, InterfaceComplianceRequest request);
2021-10-22 13:32:44 +02:00
@Async
void sendAdminUpdateInterfaceComplianceFailure(Repository repository, RepositoryInterface repositoryInterface, InterfaceComplianceRequest request);
/****VALIDATION OF CONTENT PROVIDER EMAILS****/
2021-10-22 13:32:44 +02:00
@Async
void sendUserValidationResults(String issuer, String jobId, RepositoryInterface repositoryInterface, Repository repository, Authentication authentication);
2021-10-22 13:32:44 +02:00
@Async
void sendAdminValidationResults(String issuer, String jobId, RepositoryInterface repositoryInterface, Repository repository, Authentication authentication);
/****GENERAL FAILURE OF VALIDATOR****/
2021-10-22 13:32:44 +02:00
@Async
void sendAdminGeneralFailure(String issuer, String jobId, RepositoryInterface repositoryInterface, Repository repository, Authentication authentication);
2021-10-22 13:32:44 +02:00
@Async
void sendAdminUpdateRepositoryInfoEmail(Repository repository, Authentication authentication);
2021-10-22 13:32:44 +02:00
@Async
void sendUserUpdateRepositoryInfoEmail(Repository repository, Authentication authentication);
2021-10-22 13:32:44 +02:00
@Async
void sendAdminUpdateInterfaceEmail(Repository repository, String comment, RepositoryInterface repositoryInterface, Authentication authentication);
2021-10-22 13:32:44 +02:00
@Async
void sendUserUpdateInterfaceEmail(Repository repository, String comment, RepositoryInterface repositoryInterface, Authentication authentication);
2021-10-22 13:32:44 +02:00
@Async
void sendSubmitJobForValidationEmail(Authentication authentication, JobForValidation jobForValidation);
2021-10-22 13:32:44 +02:00
@Async
void sendUponJobCompletion(String repoId,
String repoInterfaceId,
int scoreUsage,
int scoreContent,
boolean isSuccess,
boolean isUpdate,
String issuerEmail,
String jobId) throws Exception;
}