- Author
- Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g
Definition at line 53 of file Newsletter.java.
◆ checkEndRow()
boolean org.turro.publication.entity.Newsletter.checkEndRow |
( |
NewsSection |
newsSection | ) |
|
Definition at line 235 of file Newsletter.java.
236 NewsSection ns =
new TreeSet<>(newsSections).higher(newsSection);
237 return ns ==
null || !ns.isNewColumn();
◆ checkStartRow()
boolean org.turro.publication.entity.Newsletter.checkStartRow |
( |
NewsSection |
newsSection | ) |
|
Definition at line 230 of file Newsletter.java.
231 NewsSection ns =
new TreeSet<>(newsSections).lower(newsSection);
232 return ns ==
null || !ns.isNewColumn();
◆ entityId()
Object org.turro.publication.entity.Newsletter.entityId |
( |
| ) |
|
◆ generateNewsletter()
void org.turro.publication.entity.Newsletter.generateNewsletter |
( |
IContact |
contact, |
|
|
Writer |
writer |
|
) |
| throws IOException |
Definition at line 208 of file Newsletter.java.
209 writer.write(
"<#include \"/macros/site/*/buttonMacro.ftl\">\n");
210 writer.write(
"<#include \"/macros/site/*/summaryMacro.ftl\">\n");
211 writer.write(
"<#include \"/envelope/site/*/header" +
212 (Strings.isBlank(
template) ?
"" :
template) +
213 "Template.html\">\n");
215 writer.write(
"<@start_full_table \"2\" \"2\"/>\n");
217 for(NewsSection ns :
new TreeSet<>(newsSections)) {
218 if(ns.canShow(contact)) {
219 ns.generateSection(writer);
223 writer.write(
"<@end_table/>\n");
225 writer.write(
"<#include \"/envelope/site/*/footer" +
226 (Strings.isBlank(
template) ?
"" :
template) +
227 "Template.html\">\n");
◆ getCategory()
Definition at line 196 of file Newsletter.java.
197 return idCategory !=
null ? Notifications.getCategory(idCategory) :
null;
◆ getCreation()
Date org.turro.publication.entity.Newsletter.getCreation |
( |
| ) |
|
◆ getDate()
Date org.turro.publication.entity.Newsletter.getDate |
( |
| ) |
|
◆ getDateStr()
String org.turro.publication.entity.Newsletter.getDateStr |
( |
| ) |
|
Definition at line 114 of file Newsletter.java.
115 return DateFormats.format(date,
true);
◆ getId()
Long org.turro.publication.entity.Newsletter.getId |
( |
| ) |
|
◆ getIdCategory()
String org.turro.publication.entity.Newsletter.getIdCategory |
( |
| ) |
|
◆ getLang()
String org.turro.publication.entity.Newsletter.getLang |
( |
| ) |
|
◆ getNewsSections()
Set<NewsSection> org.turro.publication.entity.Newsletter.getNewsSections |
( |
| ) |
|
◆ getSendingChoice()
SendingChoice org.turro.publication.entity.Newsletter.getSendingChoice |
( |
| ) |
|
◆ getSerializerMappings()
MappingSet org.turro.publication.entity.Newsletter.getSerializerMappings |
( |
| ) |
|
Definition at line 259 of file Newsletter.java.
260 MappingSet
set =
new MappingSet();
261 set.addMapping(Newsletter.class, 1,
262 new String[] {
"id",
"creation",
"date",
"accepted",
"staticContent" },
263 new String[] {
"title",
"lang",
"template",
"idCategory",
"sendingChoice",
265 set.addMapping(NewsSection.class, 2,
266 new String[] {
"id",
"newsOrder",
"newColumn",
"width",
"useAsTrigger",
267 "hideIfEmpty",
"type" },
268 new String[] {
"body",
"wiki",
"banner" });
◆ getTemplate()
String org.turro.publication.entity.Newsletter.getTemplate |
( |
| ) |
|
◆ getTitle()
String org.turro.publication.entity.Newsletter.getTitle |
( |
| ) |
|
◆ getTrackers()
List<MailTracker> org.turro.publication.entity.Newsletter.getTrackers |
( |
| ) |
|
◆ getUnescapedTitle()
String org.turro.publication.entity.Newsletter.getUnescapedTitle |
( |
| ) |
|
◆ isAccepted()
boolean org.turro.publication.entity.Newsletter.isAccepted |
( |
| ) |
|
◆ isEmpty()
boolean org.turro.publication.entity.Newsletter.isEmpty |
( |
| ) |
|
◆ isStaticContent()
boolean org.turro.publication.entity.Newsletter.isStaticContent |
( |
| ) |
|
◆ resetGlobalContext()
void org.turro.publication.entity.Newsletter.resetGlobalContext |
( |
| ) |
|
Clears ContentContext created during newsletter generation. For example ContactActivityMap, loaded on last-activity creation.
Definition at line 251 of file Newsletter.java.
252 newsSections.forEach((ns) -> {
253 ns.resetGlobalContext();
◆ resetSections()
void org.turro.publication.entity.Newsletter.resetSections |
( |
| ) |
|
◆ setAccepted()
void org.turro.publication.entity.Newsletter.setAccepted |
( |
boolean |
accepted | ) |
|
◆ setCategory()
Definition at line 200 of file Newsletter.java.
201 idCategory = category !=
null ? category.getIdCategory() :
null;
◆ setCreation()
void org.turro.publication.entity.Newsletter.setCreation |
( |
Date |
creation | ) |
|
◆ setDate()
void org.turro.publication.entity.Newsletter.setDate |
( |
Date |
date | ) |
|
◆ setId()
void org.turro.publication.entity.Newsletter.setId |
( |
Long |
id | ) |
|
◆ setIdCategory()
void org.turro.publication.entity.Newsletter.setIdCategory |
( |
String |
idCategory | ) |
|
◆ setLang()
void org.turro.publication.entity.Newsletter.setLang |
( |
String |
lang | ) |
|
◆ setNewsSections()
void org.turro.publication.entity.Newsletter.setNewsSections |
( |
Set< NewsSection > |
newsSections | ) |
|
◆ setSendingChoice()
void org.turro.publication.entity.Newsletter.setSendingChoice |
( |
SendingChoice |
sendingChoice | ) |
|
◆ setStaticContent()
void org.turro.publication.entity.Newsletter.setStaticContent |
( |
boolean |
staticContent | ) |
|
Definition at line 90 of file Newsletter.java.
91 this.staticContent = staticContent;
◆ setTemplate()
void org.turro.publication.entity.Newsletter.setTemplate |
( |
String |
template | ) |
|
◆ setTitle()
void org.turro.publication.entity.Newsletter.setTitle |
( |
String |
title | ) |
|
Definition at line 134 of file Newsletter.java.
135 this.title = HTMLEntities.escape(title);
◆ trigger()
boolean org.turro.publication.entity.Newsletter.trigger |
( |
IContact |
contact | ) |
|
Helpers
Definition at line 188 of file Newsletter.java.
189 if(newsSections.stream().anyMatch((ns) -> (ns.isUseAsTrigger()))) {
190 return newsSections.stream().anyMatch((ns) -> (ns.isUseAsTrigger() && ns.canShow(contact)));
The documentation for this class was generated from the following file: