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

Public Member Functions

String getName ()
 
void run ()
 
String getDataLabel ()
 
- Public Member Functions inherited from org.turro.scheduler.motor.DefaultTask
boolean isSystem ()
 
boolean isDone ()
 
boolean isActive ()
 
void setActive (boolean active)
 
Constraints getConstraints ()
 
IConstructor getConstructor ()
 
String getData ()
 
void setData (String data)
 
String getDescription ()
 
void setDescription (String value)
 
Date getEndDate ()
 
void setEndDate (Date endDate)
 
String getImplementation ()
 
void setImplementation (String value)
 
Date getStartDate ()
 
void setStartDate (Date startDate)
 
void setLastExecuted (Date lastExecuted)
 
boolean shouldRun (Date now)
 
void doRun (Motor motor)
 
void stop ()
 
void readXML (Element root)
 
void writeXML (Element root)
 
- Public Member Functions inherited from org.turro.elephant.impl.abstracts.AbstractImplementation
 AbstractImplementation ()
 
void setElement (IElement element)
 
void setConstructor (IConstructor constructor)
 
void setConfiguration (Element configuration)
 
KeyValueMap getAttributes ()
 
Long getLongAttribute (String key)
 

Additional Inherited Members

- Protected Attributes inherited from org.turro.elephant.impl.abstracts.AbstractImplementation
IElement iel
 
IConstructor constructor
 
Element configuration
 
Map attributes
 

Detailed Description

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

Definition at line 35 of file PublicationSender.java.

Member Function Documentation

◆ getDataLabel()

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

Reimplemented from org.turro.scheduler.motor.DefaultTask.

Definition at line 69 of file PublicationSender.java.

69  {
70  return I_.get("Category ID");
71  }
Here is the call graph for this function:

◆ getName()

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

Reimplemented from org.turro.scheduler.motor.DefaultTask.

Definition at line 41 of file PublicationSender.java.

41  {
42  return I_.get("Publication sender");
43  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ run()

void org.turro.publication.util.PublicationSender.run ( )

Reimplemented from org.turro.scheduler.motor.DefaultTask.

Definition at line 46 of file PublicationSender.java.

46  {
47  try {
48  parseData();
49 
50  Dao dao = new PublicationPU();
51 
52  PublicationCategory pubcat = dao.find(PublicationCategory.class, Long.valueOf(idCat));
53 
54  if(pubcat != null) {
55  List<Publication> pubs = PublicationCategories.getNotSentPublications(pubcat.getId());
56 
57  if(!pubs.isEmpty()) {
58  new PublicationNotification(constructor, path, pubs, pubcat).send();
59 
60  PublicationCategories.markAsSentPublications(pubcat.getId());
61  }
62  }
63  } catch(Exception ex) {
64  Logger.getLogger(PublicationSender.class.getName()).log(Level.SEVERE, ElephantContext.logMsg(null), ex);
65  }
66  }
Here is the call graph for this function:

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