18 package org.turro.dossier.issue;
20 import java.util.Date;
21 import java.util.List;
22 import java.util.logging.Level;
23 import java.util.logging.Logger;
24 import org.apache.commons.mail.EmailException;
25 import org.turro.action.Contacts;
26 import org.turro.dossier.db.DossierPU;
27 import org.turro.dossier.entity.IssueStatus;
28 import org.turro.elephant.context.ElephantContext;
29 import org.turro.elephant.db.WhereClause;
30 import org.turro.i18n.I_;
31 import org.turro.plugin.contacts.ContactList;
32 import org.turro.plugin.contacts.IContact;
33 import org.turro.scheduler.motor.DefaultTask;
43 return I_.
get(
"My issues notifier");
49 for(String idContact : getParticipants()) {
58 }
catch (EmailException ex) {
64 private List<String> getParticipants() {
65 Date now =
new Date();
67 wc.
addClause(
"select distinct ip.idContact from IssueParticipant as ip");
68 wc.
addClause(
"where ip.issue.status <> :status");
70 wc.
addClause(
"and (ip.issue.startDate is null or ip.issue.startDate <= :date)");
void addToQueue(IConstructor constructor)
static String logMsg(String msg)
void addClause(String clause)
void addNamedValue(String name, Object value)
static String get(String msg)