Launch Alerts Implementation

There are three types of alerts:

  • plos alerts
  • weekly plosone alerts (of all ingested articles for the week)
  • monthly plosone alerts (on specific categories)

Specification

Preferences

We'll have the following preferences:

  • alertsEmailAddress - The email address to send the alerts to
  • alertsJournals - List of journal_frequency alerts a user is interested in (see below). This includes plosone_weekly and plosone_monthly if the user is interested in either of these alerts
  • alertsCategories - List of categories the user is interested in for the monthly plosone alert.

Journals and Frequency

Alerts for journals can be requested weekly and/or monthly. Thus, the following values are valid for the alertsJournals preference:

  • plosone_monthly
  • plosone_weekly
  • biology_monthly
  • biology_weekly
  • clinical_trials_monthly
  • clinical_trials_weekly
  • computational_biology_monthly
  • computational_biology_weekly
  • genetics_monthly
  • genetics_weekly
  • medicine_monthly
  • medicine_weekly
  • pathogens_monthly
  • pathogens_weekly

Categories

TBD

Implementation

plos alerts

A script will be provided to extract email and journal_frequency information into a text file. This can be used to generate the alerts.

Weekly plosone alerts

The script for the plos alerts will provide the list of users interested in this alert.

A script will be provided to extract the XML containing the articles ingested between any 2 dates.

Montly plosone alerts

These will run automatically based on the quartz configuration in topaz.xml:

<topaz>
  <scheduler>
    <jobs>
      <job name="sendalerts" group="topaz">
        <class>org.topazproject.ws.alerts.impl.SendAlertsJob</class>
        <cron>0 0 2 ? * FRI</cron> <!-- 2am Fridays -->
      </job>
...

Usage

This snippet is from the alerts-integration tests:

    UserPreference[] prefs = new UserPreference[3];
    prefs[0] = new UserPreference();
    prefs[0].setName("alertsJournals");
    prefs[0].setValues(new String[] { "plosone_monthly", "biology_weekly" });
    prefs[1] = new UserPreference();
    prefs[1].setName("alertsCategories");
    prefs[1].setValues(new String[] { "Biotechnology", "Development" });
    prefs[2] = new UserPreference();
    prefs[2].setName("alertsEmailAddress");
    prefs[2].setValues(new String[] { "ebrown@topazproject.org" });
    this.prefService.setPreferences("alerts", this.userId, prefs);