BrightSide Workbench Full Report + Source Code
org.turro.forum.Forums Class Reference

Static Public Member Functions

static List< TopicgetTopics (String entityPath)
 
static void markAsUnseenExceptFor (ITreeEntity entity, IContact contact)
 
static void markAsSeenFor (ITreeEntity entity, IContact contact)
 
static void notify (Topic topic)
 
static void notify (Post post)
 

Detailed Description

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

Definition at line 45 of file Forums.java.

Member Function Documentation

◆ getTopics()

static List<Topic> org.turro.forum.Forums.getTopics ( String  entityPath)
static

Definition at line 47 of file Forums.java.

47  {
48  Dao dao = new ElephantPU();
49  WhereClause wc = new WhereClause();
50  wc.addClause("select t from Topic as t");
51  wc.addClause("where t.entityPath like :entityPath");
52  wc.addNamedValue("entityPath", entityPath);
53  return dao.getResultList(wc);
54  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ markAsSeenFor()

static void org.turro.forum.Forums.markAsSeenFor ( ITreeEntity  entity,
IContact  contact 
)
static

Definition at line 61 of file Forums.java.

61  {
62  ParticipationWalker walker = new ParticipationWalker();
63  walker.walkDownTree(entity, e -> walker.createFor(e, contact, ParticipationReason.REASON_SEEN));
64  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ markAsUnseenExceptFor()

static void org.turro.forum.Forums.markAsUnseenExceptFor ( ITreeEntity  entity,
IContact  contact 
)
static

Definition at line 56 of file Forums.java.

56  {
57  ParticipationWalker walker = new ParticipationWalker();
58  walker.walkUpTree(entity, e -> walker.deleteExceptFor(e, contact, ParticipationReason.REASON_SEEN));
59  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ notify() [1/2]

static void org.turro.forum.Forums.notify ( Post  post)
static

Definition at line 81 of file Forums.java.

81  {
82  try {
83  Topic topic = post.getTopic();
84  new MailQueue()
85  .setRoot("/forum")
86  .addByEntity(post, AssistantConstants.participants())
87  .setCategory(GenericElephantNotification.GENERIC_NOTIFICATION)
88  .setReason(I_.get("Forum"))
89  .put("topic", topic)
90  .put("post", post)
91  .put("entityUrl", Entities.getController(topic).getEntityUrl())
92  .sendTemplate("topic", I_.get("New content"));
93  } catch (EmailException ex) {
94  Logger.getLogger(Forums.class.getName()).log(Level.SEVERE, ElephantContext.logMsg(null), ex);
95  }
96  }
Here is the call graph for this function:

◆ notify() [2/2]

static void org.turro.forum.Forums.notify ( Topic  topic)
static

Definition at line 66 of file Forums.java.

66  {
67  try {
68  new MailQueue()
69  .setRoot("/forum")
70  .addByEntity(topic, AssistantConstants.participants())
71  .setCategory(GenericElephantNotification.GENERIC_NOTIFICATION)
72  .setReason(I_.get("Forum"))
73  .put("topic", topic)
74  .put("entityUrl", Entities.getController(topic).getEntityUrl())
75  .sendTemplate("topic", I_.get("New content"));
76  } catch (EmailException ex) {
77  Logger.getLogger(Forums.class.getName()).log(Level.SEVERE, ElephantContext.logMsg(null), ex);
78  }
79  }
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: