Package ome.services.mail
Class MailSender
- java.lang.Object
-
- ome.services.mail.MailSender
-
- Direct Known Subclasses:
FailedLoginMailSender
,ObjectMailSender
,ServerDownMailSender
public class MailSender extends java.lang.Object
Basic bean with setter injection that can be used as a base class for other senders.
-
-
Field Summary
Fields Modifier and Type Field Description protected org.slf4j.Logger
log
-
Constructor Summary
Constructors Constructor Description MailSender()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addUser(java.util.Set<java.lang.String> addresses, ome.model.meta.Experimenter exp)
protected java.util.Set<java.lang.String>
getAllSystemUsers(boolean newTx)
java.lang.String
getDefaultBody()
Executor
getExecutor()
MailUtil
getMailUtil()
ome.api.IQuery
getQueryService()
ome.system.Roles
getRoles()
java.lang.String
getSubjectPrefix()
protected java.lang.String
getUserEmail(java.lang.String user)
boolean
isEnabled()
protected void
sendBlind(java.util.Set<java.lang.String> addresses, java.lang.String subject)
protected void
sendBlind(java.util.Set<java.lang.String> addresses, java.lang.String subject, java.lang.String body)
void
setDefaultBody(java.lang.String defaultBody)
void
setEnabled(boolean enabled)
void
setExecutor(Executor executor)
void
setMailUtil(MailUtil util)
void
setQueryService(ome.api.IQuery query)
void
setRoles(ome.system.Roles roles)
void
setSubjectPrefix(java.lang.String subjectPrefix)
-
-
-
Method Detail
-
isEnabled
public boolean isEnabled()
-
setEnabled
public void setEnabled(boolean enabled)
-
getExecutor
public Executor getExecutor()
-
setExecutor
public void setExecutor(Executor executor)
-
getMailUtil
public MailUtil getMailUtil()
-
setMailUtil
public void setMailUtil(MailUtil util)
-
getQueryService
public ome.api.IQuery getQueryService()
-
setQueryService
public void setQueryService(ome.api.IQuery query)
-
getRoles
public ome.system.Roles getRoles()
-
setRoles
public void setRoles(ome.system.Roles roles)
-
getSubjectPrefix
public java.lang.String getSubjectPrefix()
-
setSubjectPrefix
public void setSubjectPrefix(java.lang.String subjectPrefix)
-
getDefaultBody
public java.lang.String getDefaultBody()
-
setDefaultBody
public void setDefaultBody(java.lang.String defaultBody)
-
sendBlind
protected void sendBlind(java.util.Set<java.lang.String> addresses, java.lang.String subject)
-
sendBlind
protected void sendBlind(java.util.Set<java.lang.String> addresses, java.lang.String subject, java.lang.String body)
-
getUserEmail
protected java.lang.String getUserEmail(java.lang.String user)
-
addUser
protected void addUser(java.util.Set<java.lang.String> addresses, ome.model.meta.Experimenter exp)
-
getAllSystemUsers
protected java.util.Set<java.lang.String> getAllSystemUsers(boolean newTx)
-
-