BrightSide Workbench Full Report + Source Code
org.turro.dossier.issue.WebIssuesNotification Class Reference

Public Member Functions

 WebIssuesNotification (ContactList contacts, Long category, Long dossier, Long days, String template)
 
void sendMail (IConstructor constructor) throws EmailException
 
String create (IConstructor constructor, Issue issue, String email) throws Exception
 
String create (IConstructor constructor, String redir, String email) throws Exception
 
VoteItInfo votes (Issue issue, IContact contact)
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 52 of file WebIssuesNotification.java.

Constructor & Destructor Documentation

◆ WebIssuesNotification()

org.turro.dossier.issue.WebIssuesNotification.WebIssuesNotification ( ContactList  contacts,
Long  category,
Long  dossier,
Long  days,
String  template 
)

Definition at line 58 of file WebIssuesNotification.java.

58  {
59  this.contacts = contacts;
60  this.category = category;
61  this.dossier = dossier;
62  this.days = days;
63  this.template = template;
64  }

Member Function Documentation

◆ create() [1/2]

String org.turro.dossier.issue.WebIssuesNotification.create ( IConstructor  constructor,
Issue  issue,
String  email 
) throws Exception

Definition at line 89 of file WebIssuesNotification.java.

89  {
90  return create(constructor, issue.getIssueURL(), email);
91  }
String create(IConstructor constructor, Issue issue, String email)

◆ create() [2/2]

String org.turro.dossier.issue.WebIssuesNotification.create ( IConstructor  constructor,
String  redir,
String  email 
) throws Exception

Definition at line 93 of file WebIssuesNotification.java.

93  {
94  HashMap<String, String> values = new HashMap<>();
95  values.put(Actions.USER_PAR, email);
96  values.put(Actions.REDIR_PAR, URLEncoder.encode(redir, "UTF-8"));
97  return Actions.createAction(values, days.intValue(), false);
98  }

◆ sendMail()

void org.turro.dossier.issue.WebIssuesNotification.sendMail ( IConstructor  constructor) throws EmailException

Definition at line 66 of file WebIssuesNotification.java.

66  {
67  List<Issue> issues = getIssues();
68  if(issues != null && !issues.isEmpty()) {
69  MailMessagePool pool = MailProviders.instance().getPool(constructor, "Dossier");
70  if(pool != null) {
71  for(IContact contact : contacts) {
72  MailMessageTemplate mmt = MailMessageTemplate.of(pool.getProvider());
73  mmt.setSubject(getSubject(constructor));
74  mmt.addTo(contact.getConnector(IUser.CONNECTOR_EMAIL), contact.getName());
75  ElephantMarker em = new ElephantMarker(constructor, true);
76  em.put("issues", issues);
77  em.put("contact", contact);
78  em.put("email", contact.getConnector(IUser.CONNECTOR_EMAIL));
79  em.put("dateActivity", new CheckDate().addDays(-days.intValue()).getDate());
80  em.put("link", this);
81  mmt.setMessage(em, template, contact);
82  pool.addToPool(mmt);
83  }
84  }
85  pool.sendPool();
86  }
87  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ votes()

VoteItInfo org.turro.dossier.issue.WebIssuesNotification.votes ( Issue  issue,
IContact  contact 
)

Definition at line 100 of file WebIssuesNotification.java.

100  {
101  return VoteItUtil.info(DossierPU.getObjectPath(issue), contact);
102  }
Here is the call graph for this function:

The documentation for this class was generated from the following file: