19 package org.turro.jpa.content;
21 import java.util.List;
23 import org.turro.action.IEntityCtrl;
24 import org.turro.action.Plugins;
25 import org.turro.collections.Item;
26 import org.turro.elephant.context.IConstructor;
27 import org.turro.elephant.db.WhereClause;
28 import org.turro.entities.Entities;
29 import org.turro.entities.IElephantEntity;
30 import org.turro.jpa.Dao;
31 import org.turro.jpa.iterator.DaoHtmlTree;
32 import org.turro.marker.ElephantMarker;
33 import org.turro.marker.MarkerHelper;
34 import org.turro.plugin.contacts.IContact;
42 private boolean restricted, allowInterest, allowComments, allowVotes,
43 allowDescriptions, allowAttachments, allowFiles, allowPolls,
45 private final String contextPath;
50 this.contextPath = contextPath;
51 this.contact = contact;
60 this.restricted = restricted;
68 this.allowInterest = allowInterest;
76 this.allowComments = allowComments;
84 this.allowVotes = allowVotes;
88 return allowDescriptions;
92 this.allowDescriptions = allowDescriptions;
96 return allowAttachments;
100 this.allowAttachments = allowAttachments;
108 this.allowFiles = allowFiles;
116 this.allowPolls = allowPolls;
124 this.allowForum = allowForum;
143 if(path ==
null || selected ==
null) {
145 }
else if(path.equals(selected)) {
147 }
else if(selected.startsWith(path)) {
154 private void processParameters() {
194 if(selected !=
null) {
204 if(selected !=
null) {
static< T > T loadImplementation(Class< T > jclass)
static IElephantEntity getController(String path)
Object getSingleResultOrNull(SqlClause sc)
abstract WhereClause getItemClause(String currPath)
void setSelectedItem(String value)
abstract void prepareItem(ElephantMarker marker, E item)
void setAllowAttachments(boolean allowAttachments)
void setAllowPolls(boolean allowPolls)
abstract Object doPollsCtrl(E e)
String parseItem(ElephantMarker marker, E item)
Object getAttachmentsCtrl(E e)
void setAllowDescriptions(boolean allowDescriptions)
abstract Object doCommentsCtrl(E e)
boolean isAllowDescriptions()
void setAllowComments(boolean allowComments)
Object getInterestCtrl(E e)
static String getSelectionLink(String path)
abstract void prepareTree(ElephantMarker marker, List< Item< E, ID >> items)
static String getSelectedItem(IConstructor constructor, String pathOrigin)
boolean isAllowAttachments()
boolean isAllowComments()
void setAllowForum(boolean allowForum)
void setAllowInterest(boolean allowInterest)
String parseTree(ElephantMarker marker, List< Item< E, ID >> items)
void setRestricted(boolean restricted)
abstract Object doVotesCtrl(E e)
Object getCommentsCtrl(E e)
String getCssClass(String path)
void renderItem(ElephantMarker marker, E item)
abstract Object doDescriptionsCtrl(E e)
void setAllowFiles(boolean allowFiles)
abstract String getTemplateRoot()
abstract Object doAttachmentsCtrl(E e)
boolean isAllowInterest()
TreeDaoContentIterator(Dao dao, ElephantMarker marker, String contextPath, IContact contact)
void renderTree(ElephantMarker marker, List< Item< E, ID >> items)
abstract Object doInterestCtrl(E e)
Object getDescriptionsCtrl(E e)
abstract Object doFilesCtrl(E e)
void setAllowVotes(boolean allowVotes)
void process(String rootTmpl, String tmpl)
String parse(String rootTmpl, String tmpl)
Object put(Object key, Object value)
static KeyValueMap getObfuscatedParameters()
static String setObfuscatedPars(String parameters)
void setEntityPath(String entityPath)
void setConstructor(IConstructor constructor)
void setTemplate(String template)
void setSessionAttribute(String key, Object value)
Object getSessionAttribute(String key)
Object configureCtrl(Object ctrl, IContact contact)