public class Email extends BioModuleImpl
| Modifier and Type | Field and Description |
|---|---|
static String |
CLUSTER_HOST
Config String property: "cluster.host"The cluster host URL used for SSH and SCP connections. |
protected static String |
EMAIL_ENCRYPTED_PASSWORD
Config String property: "mail.encryptedPassword"The Base 64 encrypted password is stored in the Config file using this property. |
protected static String |
EMAIL_FROM
Config String property: "mail.from"Admin email address used to send user pipeline notifications. |
protected static String |
EMAIL_HOST
|
protected static String |
EMAIL_PORT
|
protected static String |
EMAIL_SMTP_AUTH
Config Boolean property: "mail.smtp.auth"Session SMTP authorization flag, set to "Y" if required by
"mail.smtp.host" |
protected static String |
EMAIL_START_TLS_ENABLE
Config Boolean property: "mail.smtp.starttls.enable"Session SMTP TLS enable flag, set to "Y" if required by
"mail.smtp.host" |
protected static String |
EMAIL_TO
Config List property: "mail.to" This property defines the email recipients |
GZIP_EXT, LOG_EXT, PDF_EXT, RETURN, SH_EXT, TAB_DELIM, TSV_EXT, TXT_EXTMAIN_SCRIPT_PREFIX, OUTPUT_DIR, TEMP_DIR| Constructor and Description |
|---|
Email() |
| Modifier and Type | Method and Description |
|---|---|
void |
checkDependencies()
Verify required email
Config properties exist and are properly formatted. |
protected static String |
encrypt(String password)
Encrypt clear-text password
|
static void |
encryptAndStoreEmailPassword()
Read clear-text password by call to
RuntimeParamUtil.getAdminEmailPassword()Encrypt password by call to encrypt(String) |
void |
executeTask()
|
protected javax.mail.Session |
getSession()
Build an authenticated javax.mail.Session using
Config email properties |
String |
getSummary()
Summary simply reports the status.
|
cacheInputFiles, cleanUp, compareTo, equals, findModuleInputFiles, getFileCache, getID, getInputFiles, getModuleDir, getOutputDir, getPostRequisiteModules, getPreRequisiteModules, getTempDir, init, isValidInputModule, toString, validateFileNameUniquepublic static final String CLUSTER_HOST
Config String property: "cluster.host"protected static final String EMAIL_ENCRYPTED_PASSWORD
Config String property: "mail.encryptedPassword"protected static final String EMAIL_FROM
Config String property: "mail.from"protected static final String EMAIL_HOST
protected static final String EMAIL_PORT
protected static final String EMAIL_SMTP_AUTH
Config Boolean property: "mail.smtp.auth"Session SMTP authorization flag, set to "Y" if required by
"mail.smtp.host"protected static final String EMAIL_START_TLS_ENABLE
Config Boolean property: "mail.smtp.starttls.enable"Session SMTP TLS enable flag, set to "Y" if required by
"mail.smtp.host"protected static final String EMAIL_TO
Config List property: "mail.to" This property defines the email recipientspublic void checkDependencies()
throws Exception
Config properties exist and are properly formatted.
Config.EMAIL_HOST
Config.EMAIL_PORT
Config.EMAIL_SMTP_AUTH
Config.EMAIL_START_TLS_ENABLE
Config.EMAIL_ENCRYPTED_PASSWORD
Config.EMAIL_FROM is a valid email address
Config.EMAIL_TO is a valid email address
checkDependencies in interface BioModulecheckDependencies in class BioModuleImplException - thrown if missing or invalid dependencies are foundpublic void executeTask()
throws Exception
Config."mail.to"executeTask in interface BioModuleexecuteTask in class BioModuleImplException - thrown if the module is unable to complete is taskpublic String getSummary() throws Exception
getSummary in interface BioModulegetSummary in class BioModuleImplException - if any error occursprotected javax.mail.Session getSession()
throws Exception
Config email propertiespublic static void encryptAndStoreEmailPassword()
throws Exception
RuntimeParamUtil.getAdminEmailPassword()encrypt(String)Exception - if unable to encrypt or store passwordprotected static String encrypt(String password) throws GeneralSecurityException, UnsupportedEncodingException
password - Clear-text passwordGeneralSecurityException - Encryption errorUnsupportedEncodingException - Encryption error