Interface EmailController
-
- All Known Implementing Classes:
EmailControllerImpl
,TestEmailController
public interface EmailController
Interface describing methods for emailing information to the user
-
-
Method Summary
All Methods Instance Methods Abstract 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
-
-
-
Method Detail
-
sendWelcomeEmail
void sendWelcomeEmail(User user, User sender, PasswordReset passwordReset) throws org.springframework.mail.MailSendException
Send welcome email to a user who joined the platform- Parameters:
user
- TheUser
that was just createdsender
- TheUser
that created the new userpasswordReset
- APasswordReset
object to send an activation link- Throws:
org.springframework.mail.MailSendException
- if the email failed to send
-
sendPasswordResetLinkEmail
void sendPasswordResetLinkEmail(User user, PasswordReset passwordReset) throws org.springframework.mail.MailSendException
Send aPasswordReset
link to aUser
- Parameters:
user
- The user for the resetpasswordReset
- the reset object- Throws:
org.springframework.mail.MailSendException
- if the email failed to send
-
sendSubscriptionUpdateEmail
void sendSubscriptionUpdateEmail(User user, java.util.List<ProjectEvent> events) throws org.springframework.mail.MailSendException
Send a subscription email to the givenUser
containing the givenProjectEvent
s- Parameters:
user
- The user to emailevents
- the events to send to the user- Throws:
org.springframework.mail.MailSendException
- if the email failed to send
-
sendFilesystemExceptionEmail
void sendFilesystemExceptionEmail(java.lang.String adminEmailAddress, java.lang.Exception rootCause) throws org.springframework.mail.MailSendException
Send an e-mail to the administrative user with an exception when there's a serious storage related exception.- 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
void sendNCBIUploadExceptionEmail(java.lang.String adminEmailAddress, java.lang.Exception rootCause, java.lang.Long submissionId) throws org.springframework.mail.MailSendException
Send an email to the administrators with an exception when there's an error uploading data or getting upload status from NCBI's SRA.- 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
-
isMailConfigured
java.lang.Boolean isMailConfigured()
Is the mail server configured?- Returns:
Boolean.TRUE
if configured,Boolean.FALSE
if not.
-
sendPipelineStatusEmail
void sendPipelineStatusEmail(AnalysisSubmission submission) throws org.springframework.mail.MailSendException
Send pipeline status email to a user when a pipeline that they have launched is completed or has an error- Parameters:
submission
- TheAnalysisSubmission
that the pipeline status email will be sent for- Throws:
org.springframework.mail.MailSendException
- if the email failed to send
-
sendProjectSyncUnauthorizedEmail
void sendProjectSyncUnauthorizedEmail(Project project)
Email user responsible for a synchronized project when the sync job's credentials expire- Parameters:
project
- The project that sync failed for
-
-