BrightSide Workbench Full Report + Source Code
org.turro.publication.util.PublicationSenderTask Class Reference
Inheritance diagram for org.turro.publication.util.PublicationSenderTask:
Collaboration diagram for org.turro.publication.util.PublicationSenderTask:

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 34 of file PublicationSenderTask.java.

Member Function Documentation

◆ execute()

void org.turro.publication.util.PublicationSenderTask.execute ( )

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

Definition at line 40 of file PublicationSenderTask.java.

40  {
41  try {
42  parseData();
43 
44  Dao dao = new PublicationPU();
45 
46  PublicationCategory pubcat = dao.find(PublicationCategory.class, Long.valueOf(idCat));
47 
48  if(pubcat != null) {
49  List<Publication> pubs = PublicationCategories.getNotSentPublications(pubcat.getId());
50 
51  if(!pubs.isEmpty()) {
52  new PublicationNotification(getConstructor(), path, pubs, pubcat).send();
53 
54  PublicationCategories.markAsSentPublications(pubcat.getId());
55  }
56  }
57  } catch(Exception ex) {
58  WebLoggers.severe(this).exception(ex).log();
59  }
60  }
Here is the call graph for this function:

◆ getDataLabel()

String org.turro.publication.util.PublicationSenderTask.getDataLabel ( )

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

Definition at line 73 of file PublicationSenderTask.java.

73  {
74  return I_.get("Category ID");
75  }
Here is the call graph for this function:

◆ getName()

String org.turro.publication.util.PublicationSenderTask.getName ( )

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

Definition at line 68 of file PublicationSenderTask.java.

68  {
69  return I_.get("Publication sender");
70  }
Here is the call graph for this function:

◆ isSystem()

boolean org.turro.publication.util.PublicationSenderTask.isSystem ( )

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

Definition at line 63 of file PublicationSenderTask.java.

63  {
64  return false;
65  }

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