Class TestEmailController
- java.lang.Object
-
- ca.corefacility.bioinformatics.irida.service.impl.EmailControllerImpl
-
- ca.corefacility.bioinformatics.irida.service.impl.TestEmailController
-
- All Implemented Interfaces:
EmailController
@Component @Profile({"it","test"}) public class TestEmailController extends EmailControllerImplEmail controller used for testing. Does not really send emails.
-
-
Field Summary
-
Fields inherited from class ca.corefacility.bioinformatics.irida.service.impl.EmailControllerImpl
FRAGMENT_NAMES, PIPELINE_STATUS_TEMPLATE, RESET_TEMPLATE, SUBSCRIPTION_TEMPLATE, SYNC_EXPIRED_TEMPLATE, WELCOME_TEMPLATE
-
-
Constructor Summary
Constructors Constructor Description TestEmailController()TestEmailController(WebEmailConfig.ConfigurableJavaMailSender javaMailSender, org.thymeleaf.TemplateEngine templateEngine, org.springframework.context.MessageSource messageSource)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.BooleanisMailConfigured()Is the mail server configured?voidsendFilesystemExceptionEmail(java.lang.String adminEmailAddress, java.lang.Exception rootCause)Send an e-mail to the administrative user with an exception when there's a serious storage related exception.voidsendNCBIUploadExceptionEmail(java.lang.String adminEmailAddress, java.lang.Exception rootCause, java.lang.Long submissionId)Send an email to the administrators with an exception when there's an error uploading data or getting upload status from NCBI's SRA.voidsendPasswordResetLinkEmail(User user, PasswordReset passwordReset)Send aPasswordResetlink to aUservoidsendPipelineStatusEmail(AnalysisSubmission submission)Send pipeline status email to a user when a pipeline that they have launched is completed or has an errorvoidsendProjectSyncUnauthorizedEmail(Project project)Email user responsible for a synchronized project when the sync job's credentials expirevoidsendSubscriptionUpdateEmail(User user, java.util.List<ProjectEvent> events)Send a subscription email to the givenUsercontaining the givenProjectEventsvoidsendWelcomeEmail(User user, User sender, PasswordReset passwordReset)Send welcome email to a user who joined the platform
-
-
-
Constructor Detail
-
TestEmailController
@Autowired public TestEmailController(WebEmailConfig.ConfigurableJavaMailSender javaMailSender, @Qualifier("emailTemplateEngine") org.thymeleaf.TemplateEngine templateEngine, org.springframework.context.MessageSource messageSource)
-
TestEmailController
public TestEmailController()
-
-
Method Detail
-
sendPasswordResetLinkEmail
public void sendPasswordResetLinkEmail(User user, PasswordReset passwordReset)
Description copied from class:EmailControllerImplSend aPasswordResetlink to aUser- Specified by:
sendPasswordResetLinkEmailin interfaceEmailController- Overrides:
sendPasswordResetLinkEmailin classEmailControllerImpl- Parameters:
user- The user for the resetpasswordReset- the reset object
-
sendWelcomeEmail
public void sendWelcomeEmail(User user, User sender, PasswordReset passwordReset)
Description copied from class:EmailControllerImplSend welcome email to a user who joined the platform- Specified by:
sendWelcomeEmailin interfaceEmailController- Overrides:
sendWelcomeEmailin classEmailControllerImpl- Parameters:
user- TheUserthat was just createdsender- TheUserthat created the new userpasswordReset- APasswordResetobject to send an activation link
-
sendSubscriptionUpdateEmail
public void sendSubscriptionUpdateEmail(User user, java.util.List<ProjectEvent> events)
Description copied from class:EmailControllerImplSend a subscription email to the givenUsercontaining the givenProjectEvents- Specified by:
sendSubscriptionUpdateEmailin interfaceEmailController- Overrides:
sendSubscriptionUpdateEmailin classEmailControllerImpl- Parameters:
user- The user to emailevents- the events to send to the user
-
sendFilesystemExceptionEmail
public void sendFilesystemExceptionEmail(java.lang.String adminEmailAddress, java.lang.Exception rootCause) throws org.springframework.mail.MailSendExceptionDescription copied from class:EmailControllerImplSend an e-mail to the administrative user with an exception when there's a serious storage related exception.- Specified by:
sendFilesystemExceptionEmailin interfaceEmailController- Overrides:
sendFilesystemExceptionEmailin classEmailControllerImpl- Parameters:
adminEmailAddress- the address to which notifications should be sent.rootCause- the exception to send to the user.- Throws:
org.springframework.mail.MailSendException- if the email failed to send
-
sendNCBIUploadExceptionEmail
public void sendNCBIUploadExceptionEmail(java.lang.String adminEmailAddress, java.lang.Exception rootCause, java.lang.Long submissionId) throws org.springframework.mail.MailSendExceptionDescription copied from class:EmailControllerImplSend an email to the administrators with an exception when there's an error uploading data or getting upload status from NCBI's SRA.- Specified by:
sendNCBIUploadExceptionEmailin interfaceEmailController- Overrides:
sendNCBIUploadExceptionEmailin classEmailControllerImpl- Parameters:
adminEmailAddress- Address of the admin to email torootCause- exception to display in the emailsubmissionId- the ID of the NCBI export submission that failed- Throws:
org.springframework.mail.MailSendException- If there's an error sending the message
-
sendPipelineStatusEmail
public void sendPipelineStatusEmail(AnalysisSubmission submission)
Description copied from class:EmailControllerImplSend pipeline status email to a user when a pipeline that they have launched is completed or has an error- Specified by:
sendPipelineStatusEmailin interfaceEmailController- Overrides:
sendPipelineStatusEmailin classEmailControllerImpl- Parameters:
submission- TheAnalysisSubmissionthat the pipeline status email will be sent for
-
sendProjectSyncUnauthorizedEmail
public void sendProjectSyncUnauthorizedEmail(Project project)
Description copied from class:EmailControllerImplEmail user responsible for a synchronized project when the sync job's credentials expire- Specified by:
sendProjectSyncUnauthorizedEmailin interfaceEmailController- Overrides:
sendProjectSyncUnauthorizedEmailin classEmailControllerImpl- Parameters:
project- The project that sync failed for
-
isMailConfigured
public java.lang.Boolean isMailConfigured()
Description copied from class:EmailControllerImplIs the mail server configured?- Specified by:
isMailConfiguredin interfaceEmailController- Overrides:
isMailConfiguredin classEmailControllerImpl- Returns:
Boolean.TRUEif configured,Boolean.FALSEif not.
-
-