public class ObjectMailSender extends MailSender implements org.springframework.context.ApplicationListener<EventLogsMessage>
EventLogMessage
of the specified type and kind is received,
an email is sent to all users which are returned by a given query. A number
of parameters are made available to the query via a Parameters
instance.log
Constructor and Description |
---|
ObjectMailSender() |
Modifier and Type | Method and Description |
---|---|
protected void |
addUser(Set<String> addresses,
Experimenter exp) |
String |
getAction() |
Class<IObject> |
getObjectClass() |
String |
getQueryString() |
void |
onApplicationEvent(EventLogsMessage elm)
Handle an application event.
|
protected void |
sendEmail(Collection<EventLog> matches) |
void |
setAction(String action) |
void |
setObjectClass(Class<IObject> klass) |
void |
setQueryString(String queryString) |
getAllSystemUsers, getDefaultBody, getExecutor, getMailUtil, getQueryService, getRoles, getSubjectPrefix, getUserEmail, isEnabled, sendBlind, sendBlind, setDefaultBody, setEnabled, setExecutor, setMailUtil, setQueryService, setRoles, setSubjectPrefix
public String getAction()
public void setAction(String action)
public String getQueryString()
public void setQueryString(String queryString)
public void onApplicationEvent(EventLogsMessage elm)
org.springframework.context.ApplicationListener
onApplicationEvent
in interface org.springframework.context.ApplicationListener<EventLogsMessage>
elm
- the event to respond toprotected void sendEmail(Collection<EventLog> matches)
protected void addUser(Set<String> addresses, Experimenter exp)
addUser
in class MailSender
Version: 5.1.3-ice35-b52
Copyright © 2015 The University of Dundee & Open Microscopy Environment. All Rights Reserved.