18 package org.turro.publication.www;
20 import java.io.IOException;
21 import java.util.List;
22 import org.turro.string.ObjectString;
23 import org.turro.elephant.context.ElephantContext;
24 import org.turro.elephant.context.IConstructor;
25 import org.turro.i18n.I_;
26 import org.turro.publication.db.PublicationPU;
27 import org.turro.publication.entity.Publication;
28 import org.turro.publication.entity.PublicationCategory;
29 import org.turro.publication.util.PublicationCategories;
30 import org.turro.publication.zul.portal.PublicationContent;
31 import org.zkoss.lang.Strings;
40 private String context, sclass, contactId, summaryTemplate, fullTemplate;
41 private boolean showTitle, showSummary, showDetails, showBody;
42 private long groupId, categoryId, publicationId;
46 if(!Strings.isBlank(summaryTemplate) || !Strings.isBlank(fullTemplate)) {
61 }
else if(publicationId != 0) {
64 pub, sclass, showTitle, showDetails, showSummary, showBody,
66 I_.
get(
"See all"), constructor);
69 count, groupId, categoryId, contactId,
true);
71 list, sclass, showTitle, showDetails, showSummary, showBody,
81 return "<div class='rss_feed'>" +
83 "/print_" + context +
"?rss'>" +
85 "/_internal/system/images/feed.png'/>" +
90 this.summaryTemplate = summaryTemplate;
94 this.fullTemplate = fullTemplate;
98 this.categoryId = (Long) ObjectString.parseNativeString(categoryId, Long.class,
true);
102 this.constructor = constructor;
106 this.contactId = contactId;
110 this.context = context;
114 this.count = (Integer) ObjectString.parseNativeString(count, Integer.class,
true);
118 this.groupId = (Long) ObjectString.parseNativeString(groupId, Long.class,
true);
122 this.publicationId = (Long) ObjectString.parseNativeString(publicationId, Long.class,
true);
126 this.sclass = sclass;
130 this.showBody =
"true".equals(showBody);
134 this.showDetails =
"true".equals(showDetails);
138 this.showSummary =
"true".equals(showSummary);
142 this.showTitle =
"true".equals(showTitle);
static String getRootResourcePath()
static String getRootWebPath()
static String get(String msg)
void setFullTemplate(String fullTemplate)
void setNavigatorBottom(boolean navigatorBottom)
void setSummaryTemplate(String summaryTemplate)
void setNavigatorTop(boolean navigatorTop)
static List< Publication > getPublicationsBy(int max, long group, long category, String idContact, boolean accepted)
String getCategoryTitle()
void setShowBody(String showBody)
void setShowTitle(String showTitle)
void setSummaryTemplate(String summaryTemplate)
void setPublicationId(String publicationId)
void setContext(String context)
void setCategoryId(String categoryId)
void setSclass(String sclass)
void setShowDetails(String showDetails)
void setCount(String count)
void setContactId(String contactId)
void setFullTemplate(String fullTemplate)
void setGroupId(String groupId)
void setConstructor(IConstructor constructor)
void setShowSummary(String showSummary)
void setContactId(String contactId)
void setCategoryId(long categoryId)
void setGroupId(long groupId)
static String getPublicationsStr(List< Publication > publications, String sclass, boolean title, boolean details, boolean summary, boolean body, String path, boolean asMail, String readAll, IConstructor constructor)
static String getPublicationStr(Publication publication, String sclass, boolean title, boolean details, boolean summary, boolean body, String path, boolean asMail, String readAll, IConstructor constructor)
void setOut(PrintWriter out)