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

71 lines
4.0 KiB
Java

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.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;
/****USER REGISTRATION REQUEST EMAILS****/
void sendAdminRegistrationEmail(Repository repository, Authentication authentication) throws Exception;
void sendUserRegistrationEmail(Repository repository, Authentication authentication) throws Exception;
/****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;
void sendAdminUpdateRepositoryEmail(Repository repository, Authentication authentication) throws Exception;
void sendUserUpdateRepositoryEmail(Repository repository, Authentication authentication) throws Exception;
void sendSubmitJobForValidationEmail(Authentication authentication, JobForValidation jobForValidation) throws Exception;
void sendUponJobCompletion(String repoId,
String repoInterfaceId,
int scoreUsage,
int scoreContent,
boolean isSuccess,
boolean isUpdate,
String issuerEmail,
String jobId) throws Exception;
}