BrightSide Workbench Full Report + Source Code
org.turro.mail.queue.AssistantQueueUtils Class Reference

Static Public Member Functions

static void addFromCategory (String idCategory, AssistantSet assistants)
 
static void addFromCategoryWithAgreements (String idCategory, AssistantSet assistants)
 

Detailed Description

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

Definition at line 37 of file AssistantQueueUtils.java.

Member Function Documentation

◆ addFromCategory()

static void org.turro.mail.queue.AssistantQueueUtils.addFromCategory ( String  idCategory,
AssistantSet  assistants 
)
static

Definition at line 39 of file AssistantQueueUtils.java.

39  {
40  if(!Strings.isBlank(idCategory)) {
41  QueueManager qm = new QueueManager();
42  Collection<QueueOptions> subs = qm.getSubcribers(idCategory);
43  for(QueueOptions qo : subs) {
44  if(qo.getIdContact() != null && !QueuePeriod.DONT_SEND.equals(qo.getPeriod())) {
45  IContact c = Contacts.getContactById(qo.getIdContact());
46  if(c.isWebUser()) {
47  assistants.addContact(c, null);
48  }
49  }
50  }
51  }
52  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ addFromCategoryWithAgreements()

static void org.turro.mail.queue.AssistantQueueUtils.addFromCategoryWithAgreements ( String  idCategory,
AssistantSet  assistants 
)
static

Definition at line 54 of file AssistantQueueUtils.java.

54  {
55  if(!Strings.isBlank(idCategory)) {
56  IAgreements agreements = Plugins.loadImplementation(IAgreements.class, "agreements");
57  NotificationCategory nc = Notifications.getCategory(idCategory);
58  QueueManager qm = new QueueManager();
59  Collection<QueueOptions> subs = qm.getSubcribers(idCategory);
60  for(QueueOptions qo : subs) {
61  if(qo.getIdContact() != null && !QueuePeriod.DONT_SEND.equals(qo.getPeriod())) {
62  IContact c = Contacts.getContactById(qo.getIdContact());
63  if(c.isWebUser()) {
64  agreements.setContact(c);
65  if(agreements.canSendEmails(nc)) {
66  assistants.addContact(c, null);
67  }
68  }
69  }
70  }
71  }
72  }
Here is the call graph for this function:

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