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 EmailControllerImpl
Email 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.Boolean
isMailConfigured()
Is the mail server configured?void
sendFilesystemExceptionEmail(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.void
sendNCBIUploadExceptionEmail(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.void
sendPasswordResetLinkEmail(User user, PasswordReset passwordReset)
Send aPasswordReset
link to aUser
void
sendPipelineStatusEmail(AnalysisSubmission submission)
Send pipeline status email to a user when a pipeline that they have launched is completed or has an errorvoid
sendProjectSyncUnauthorizedEmail(Project project)
Email user responsible for a synchronized project when the sync job's credentials expirevoid
sendSubscriptionUpdateEmail(User user, java.util.List<ProjectEvent> events)
Send a subscription email to the givenUser
containing the givenProjectEvent
svoid
sendWelcomeEmail(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:EmailControllerImpl
Send aPasswordReset
link to aUser
- Specified by:
sendPasswordResetLinkEmail
in interfaceEmailController
- Overrides:
sendPasswordResetLinkEmail
in 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:EmailControllerImpl
Send welcome email to a user who joined the platform- Specified by:
sendWelcomeEmail
in interfaceEmailController
- Overrides:
sendWelcomeEmail
in classEmailControllerImpl
- Parameters:
user
- TheUser
that was just createdsender
- TheUser
that created the new userpasswordReset
- APasswordReset
object to send an activation link
-
sendSubscriptionUpdateEmail
public void sendSubscriptionUpdateEmail(User user, java.util.List<ProjectEvent> events)
Description copied from class:EmailControllerImpl
Send a subscription email to the givenUser
containing the givenProjectEvent
s- Specified by:
sendSubscriptionUpdateEmail
in interfaceEmailController
- Overrides:
sendSubscriptionUpdateEmail
in 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.MailSendException
Description copied from class:EmailControllerImpl
Send an e-mail to the administrative user with an exception when there's a serious storage related exception.- Specified by:
sendFilesystemExceptionEmail
in interfaceEmailController
- Overrides:
sendFilesystemExceptionEmail
in 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.MailSendException
Description copied from class:EmailControllerImpl
Send 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:
sendNCBIUploadExceptionEmail
in interfaceEmailController
- Overrides:
sendNCBIUploadExceptionEmail
in 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:EmailControllerImpl
Send pipeline status email to a user when a pipeline that they have launched is completed or has an error- Specified by:
sendPipelineStatusEmail
in interfaceEmailController
- Overrides:
sendPipelineStatusEmail
in classEmailControllerImpl
- Parameters:
submission
- TheAnalysisSubmission
that the pipeline status email will be sent for
-
sendProjectSyncUnauthorizedEmail
public void sendProjectSyncUnauthorizedEmail(Project project)
Description copied from class:EmailControllerImpl
Email user responsible for a synchronized project when the sync job's credentials expire- Specified by:
sendProjectSyncUnauthorizedEmail
in interfaceEmailController
- Overrides:
sendProjectSyncUnauthorizedEmail
in classEmailControllerImpl
- Parameters:
project
- The project that sync failed for
-
isMailConfigured
public java.lang.Boolean isMailConfigured()
Description copied from class:EmailControllerImpl
Is the mail server configured?- Specified by:
isMailConfigured
in interfaceEmailController
- Overrides:
isMailConfigured
in classEmailControllerImpl
- Returns:
Boolean.TRUE
if configured,Boolean.FALSE
if not.
-
-