Class ObjectMailSender

  • All Implemented Interfaces:
    java.util.EventListener, org.springframework.context.ApplicationListener<EventLogsMessage>

    public class ObjectMailSender
    extends MailSender
    implements org.springframework.context.ApplicationListener<EventLogsMessage>
    When an 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.
    • Constructor Detail

      • ObjectMailSender

        public ObjectMailSender()
    • Method Detail

      • getAction

        public java.lang.String getAction()
      • setAction

        public void setAction​(java.lang.String action)
      • getObjectClass

        public java.lang.Class<ome.model.IObject> getObjectClass()
      • setObjectClass

        public void setObjectClass​(java.lang.Class<ome.model.IObject> klass)
      • getQueryString

        public java.lang.String getQueryString()
      • setQueryString

        public void setQueryString​(java.lang.String queryString)
      • onApplicationEvent

        public void onApplicationEvent​(EventLogsMessage elm)
        Specified by:
        onApplicationEvent in interface org.springframework.context.ApplicationListener<EventLogsMessage>
      • sendEmail

        protected void sendEmail​(java.util.Collection<ome.model.meta.EventLog> matches)
      • addUser

        protected void addUser​(java.util.Set<java.lang.String> addresses,
                               ome.model.meta.Experimenter exp)
        Overrides:
        addUser in class MailSender