BrightSide Workbench Full Report + Source Code
org.turro.zul.convocation.ConvocationSender Class Reference
Inheritance diagram for org.turro.zul.convocation.ConvocationSender:
Collaboration diagram for org.turro.zul.convocation.ConvocationSender:

Public Member Functions

 ConvocationSender (Convocation entity, IContact contact)
 
 ConvocationSender (Convocation entity, AssistantSet assistants)
 
String createAttendantQrCode (IContact contact, Convocation convocation)
 
- Public Member Functions inherited from org.turro.mail.queue.QueuedSender
 QueuedSender ()
 
void send ()
 
void pause ()
 
void run ()
 

Static Public Member Functions

static AssistantSet getAsAssistants (Convocation convocation)
 
- Static Public Member Functions inherited from org.turro.mail.queue.QueuedSender
static AtomicCounter getCounter ()
 

Protected Member Functions

void doSend ()
 

Detailed Description

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

Definition at line 70 of file ConvocationSender.java.

Constructor & Destructor Documentation

◆ ConvocationSender() [1/2]

org.turro.zul.convocation.ConvocationSender.ConvocationSender ( Convocation  entity,
IContact  contact 
)

Definition at line 76 of file ConvocationSender.java.

76  {
77  this.entity = entity;
78  this.assistants = null;
79  this.contact = contact;
80  }

◆ ConvocationSender() [2/2]

org.turro.zul.convocation.ConvocationSender.ConvocationSender ( Convocation  entity,
AssistantSet  assistants 
)

Definition at line 82 of file ConvocationSender.java.

82  {
83  this.entity = entity;
84  this.assistants = assistants;
85  this.contact = null;
86  }

Member Function Documentation

◆ createAttendantQrCode()

String org.turro.zul.convocation.ConvocationSender.createAttendantQrCode ( IContact  contact,
Convocation  convocation 
)

Definition at line 205 of file ConvocationSender.java.

205  {
206  return ConvocationCtrl.createAttendantQrCodeURL(Application.getApplication().getConstructor(), contact, convocation);
207  }
Here is the call graph for this function:

◆ doSend()

void org.turro.zul.convocation.ConvocationSender.doSend ( )
protected

Reimplemented from org.turro.mail.queue.QueuedSender.

Definition at line 89 of file ConvocationSender.java.

89  {
90  final List<File> tmpFiles = new ArrayList<>();
91  MailMessagePool pool = MailProviders.instance().getGeneric(Application.getApplication().getConstructor());
92  if(pool != null) {
93  String organizerEmail = null;
94  if(entity.getOrganizer() != null) {
95  Connector c = entity.getOrganizer().getConnectorMap().get(IUser.CONNECTOR_EMAIL);
96  if(c != null) {
97  organizerEmail = c.getValue();
98  }
99  }
100  if(contact != null) {
101  createMail(new Assistant(contact, entity), tmpFiles, organizerEmail, pool);
102  } else {
103  IAgreements agreements = Plugins.loadImplementation(IAgreements.class, "agreements");
104  NotificationCategory nc = Notifications.getCategory(GenericElephantNotification.GENERIC_NOTIFICATION);
105  for(Assistant assistant : assistants) {
106  agreements.setContact(assistant.contact);
107  if(agreements.canSendEmails(nc)) {
108  createMail(assistant, tmpFiles, organizerEmail, pool);
109  }
110  }
111  }
112  pool.sendPool((m) -> {
113  for(File f : tmpFiles) {
114  f.delete();
115  }
116  });
117  SystemLogger.getInstance().doLog(SystemLogType.LOG_INFO, entity, "sent", organizerEmail);
118  }
119  }
Map< String, Connector > getConnectorMap()
Definition: Contact.java:499
Here is the call graph for this function:

◆ getAsAssistants()

static AssistantSet org.turro.zul.convocation.ConvocationSender.getAsAssistants ( Convocation  convocation)
static

Definition at line 209 of file ConvocationSender.java.

209  {
210  AssistantSet assistants = new AssistantSet();
211  for(Attendee att : convocation.getAttendees()) {
212  assistants.addContact(att.getIContact(), convocation);
213  }
214  return assistants;
215  }
Here is the call graph for this function:
Here is the caller graph for this function:

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