19 package org.turro.forum;
21 import java.util.List;
22 import java.util.logging.Level;
23 import java.util.logging.Logger;
24 import org.apache.commons.mail.EmailException;
25 import org.turro.assistant.AssistantConstants;
26 import org.turro.assistant.ParticipationWalker;
27 import org.turro.elephant.context.ElephantContext;
28 import org.turro.elephant.db.ElephantPU;
29 import org.turro.elephant.db.WhereClause;
30 import org.turro.elephant.entities.db.Post;
31 import org.turro.elephant.entities.db.Topic;
32 import org.turro.entities.Entities;
33 import org.turro.entities.ITreeEntity;
34 import org.turro.i18n.I_;
35 import org.turro.jpa.Dao;
36 import org.turro.mail.queue.GenericElephantNotification;
37 import org.turro.mail.sender.MailQueue;
38 import org.turro.participation.ParticipationReason;
39 import org.turro.plugin.contacts.IContact;
47 public static List<Topic>
getTopics(String entityPath) {
51 wc.
addClause(
"where t.entityPath like :entityPath");
53 return dao.getResultList(wc);
72 .setReason(
I_.
get(
"Forum"))
75 .sendTemplate(
"topic",
I_.
get(
"New content"));
76 }
catch (EmailException ex) {
88 .setReason(
I_.
get(
"Forum"))
92 .sendTemplate(
"topic",
I_.
get(
"New content"));
93 }
catch (EmailException ex) {
static String participants()
void walkUpTree(ITreeEntity entity, Consumer< ITreeEntity > execute)
void createFor(Object entity, IContact contact, ParticipationReason reason)
void deleteExceptFor(Object entity, IContact contact, ParticipationReason reason)
static String logMsg(String msg)
void addClause(String clause)
void addNamedValue(String name, Object value)
static IElephantEntity getController(String path)
static void markAsUnseenExceptFor(ITreeEntity entity, IContact contact)
static List< Topic > getTopics(String entityPath)
static void notify(Topic topic)
static void markAsSeenFor(ITreeEntity entity, IContact contact)
static void notify(Post post)
static String get(String msg)
static final String GENERIC_NOTIFICATION
IMailSender setRoot(String root)