BrightSide Workbench Full Report + Source Code
org.turro.newsletter.mail.NewsletterSenderTask Class Reference
Inheritance diagram for org.turro.newsletter.mail.NewsletterSenderTask:
Collaboration diagram for org.turro.newsletter.mail.NewsletterSenderTask:

Public Member Functions

void execute ()
 
boolean isSystem ()
 
String getName ()
 
String getDataLabel ()
 
- Public Member Functions inherited from org.turro.scheduler.task.AbstractTask
void setConstructor (IConstructor constructor)
 
void setSettings (TaskSettings settings)
 
IConstructor getConstructor ()
 
TaskSettings getSettings ()
 
void setLastExecuted (Date lastExecuted)
 
boolean isDone ()
 
boolean shouldRun (Date now)
 
void doRun (Motor motor)
 
void stop ()
 
void run ()
 
String getColor ()
 
String getIcon ()
 
String getDescription ()
 
int compareTo (AbstractTask o)
 

Detailed Description

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

Definition at line 33 of file NewsletterSenderTask.java.

Member Function Documentation

◆ execute()

void org.turro.newsletter.mail.NewsletterSenderTask.execute ( )

Reimplemented from org.turro.scheduler.task.AbstractTask.

Definition at line 36 of file NewsletterSenderTask.java.

36  {
37  try {
38  KeyValueMap kvm = new KeyValueMap(getSettings().getData());
39  Newsletter newsletter = null;
40  if(kvm.containsKey("NewsID")) {
41  newsletter = getDao().find(Newsletter.class, kvm.get(Long.class, "NewsID"));
42  }
43  if(newsletter != null && newsletter.isAccepted()) {
44  new NewsletterSendToSubscribers(newsletter).send();
45  }
46  } catch(Exception ex) {
47  WebLoggers.severe(this).exception(ex).log();
48  }
49  }
Here is the call graph for this function:

◆ getDataLabel()

String org.turro.newsletter.mail.NewsletterSenderTask.getDataLabel ( )

Reimplemented from org.turro.scheduler.task.AbstractTask.

Definition at line 62 of file NewsletterSenderTask.java.

62  {
63  return "NewsID;CategoryID;Context;QueueID";
64  }

◆ getName()

String org.turro.newsletter.mail.NewsletterSenderTask.getName ( )

Reimplemented from org.turro.scheduler.task.AbstractTask.

Definition at line 57 of file NewsletterSenderTask.java.

57  {
58  return I_.get("Newsletter sender");
59  }
Here is the call graph for this function:

◆ isSystem()

boolean org.turro.newsletter.mail.NewsletterSenderTask.isSystem ( )

Reimplemented from org.turro.scheduler.task.AbstractTask.

Definition at line 52 of file NewsletterSenderTask.java.

52  {
53  return false;
54  }

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