Changes between Initial Version and Version 1 of Ticket #592, comment 28
- Timestamp:
- May 22, 2014, 10:21:15 AM (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #592, comment 28
initial v1 5 5 3. New data access object class/file `EmailConfig.java` in `src/net/sf/basedb/labenv/dao/` added. It contains private instance variables and corresponding public accessor methods for the attributes in the "`emailconfig`" block in configuration file `labenv-config.xml`. 6 6 4. Java class/file `LabenvironmentConfiguration.java` in `src/net/sf/basedb/labenv/` updated in private method `void fetchConfiguration()` to read the new e-mail settings from configuration file `labenv-config.xml`, and store the values in new private instance variable `EmailConfig emailConfig` with corresponding public accessor method. 7 5. New utility class/file `MailUtil.ja r` in `src/net/sf/basedb/labenv/util/` added. It contains a minimal set-up for sending e-mails.7 5. New utility class/file `MailUtil.java` in `src/net/sf/basedb/labenv/util/` added. It contains a minimal set-up for sending e-mails. 8 8 6. Class/file `Labenvironment.java` in `src/net/sf/basedb/labenv/` updated:[[BR]]a. Public method `void checkAlarms(String labSensorUrl, Date measurementTime, Double temperature, Double humidity)` updated for an activated alarm to call new private method `List<String> fetchEmailAddressList(LabSensorAlarmConfig alarm)` to obtain an e-mail list for the alarm in question, and then call new private method `void notification(String toAddress, String sensorName, String alarmText)` to send e-mails to the addresses in the list.[[BR]]b. New private method `List<String> fetchEmailAddressList(LabSensorAlarmConfig alarm)` added. It returns a list of e-mail addresses for the alarm, or `null` if none could be found.[[BR]]c. New private method `void notification(String toAddress, String sensorName, String alarmText)` added. It calls public method `void sendMail(...)` in `MailUtil` to try to send a notification e-mail to address `toAddress`.