BrightSide Workbench Full Report + Source Code
org.turro.jpa.content.TreeDaoContentIterator< E, ID > Class Template Referenceabstract
Inheritance diagram for org.turro.jpa.content.TreeDaoContentIterator< E, ID >:
Collaboration diagram for org.turro.jpa.content.TreeDaoContentIterator< E, ID >:

Public Member Functions

 TreeDaoContentIterator (Dao dao, ElephantMarker marker, String contextPath, IContact contact)
 
boolean isRestricted ()
 
void setRestricted (boolean restricted)
 
boolean isAllowInterest ()
 
void setAllowInterest (boolean allowInterest)
 
boolean isAllowComments ()
 
void setAllowComments (boolean allowComments)
 
boolean isAllowVotes ()
 
void setAllowVotes (boolean allowVotes)
 
boolean isAllowDescriptions ()
 
void setAllowDescriptions (boolean allowDescriptions)
 
boolean isAllowAttachments ()
 
void setAllowAttachments (boolean allowAttachments)
 
boolean isAllowFiles ()
 
void setAllowFiles (boolean allowFiles)
 
boolean isAllowPolls ()
 
void setAllowPolls (boolean allowPolls)
 
boolean isAllowForum ()
 
void setAllowForum (boolean allowForum)
 
String getContextPath ()
 
IContact getContact ()
 
String getCssClass (String path)
 
String getSelectedItem ()
 
void renderSelected ()
 
String parseSelected ()
 
Object getVotesCtrl (E e)
 
Object getInterestCtrl (E e)
 
Object getCommentsCtrl (E e)
 
Object getAttachmentsCtrl (E e)
 
Object getFilesCtrl (E e)
 
Object getDescriptionsCtrl (E e)
 
Object getPollsCtrl (E e)
 
Object getForumCtrl (E e)
 
- Public Member Functions inherited from org.turro.jpa.iterator.DaoHtmlTree< E, ID >
 DaoHtmlTree (Dao dao, ElephantMarker marker)
 
String getTreeTemplate ()
 
void setTreeTemplate (String treeTemplate)
 
String getFullTemplate ()
 
void setFullTemplate (String fullTemplate)
 
void render ()
 
String parse ()
 
VisualElements getVisuals ()
 
- Public Member Functions inherited from org.turro.jpa.iterator.DaoTree< E, ID >
 DaoTree (Dao dao)
 
Dao getDao ()
 
void fillTree (String path)
 
void fillRoot (Item item)
 

Static Public Member Functions

static String getSelectionLink (String path)
 
static String getSelectedItem (IConstructor constructor, String pathOrigin)
 

Protected Member Functions

void setSelectedItem (String value)
 
abstract void prepareTree (ElephantMarker marker, List< Item< E, ID >> items)
 
abstract void prepareItem (ElephantMarker marker, E item)
 
abstract String getTemplateRoot ()
 
abstract Object doVotesCtrl (E e)
 
abstract Object doInterestCtrl (E e)
 
abstract Object doCommentsCtrl (E e)
 
abstract Object doAttachmentsCtrl (E e)
 
abstract Object doFilesCtrl (E e)
 
abstract Object doDescriptionsCtrl (E e)
 
abstract Object doPollsCtrl (E e)
 
abstract WhereClause getItemClause (String currPath)
 
void renderTree (ElephantMarker marker, List< Item< E, ID >> items)
 
void renderItem (ElephantMarker marker, E item)
 
String parseTree (ElephantMarker marker, List< Item< E, ID >> items)
 
String parseItem (ElephantMarker marker, E item)
 
- Protected Member Functions inherited from org.turro.jpa.iterator.DaoHtmlTree< E, ID >
VisualElements loadVisuals ()
 
- Protected Member Functions inherited from org.turro.jpa.iterator.DaoTree< E, ID >
abstract WhereClause getChildrenClause (String currPath)
 
abstract WhereClause getLeafClause (String currPath)
 

Additional Inherited Members

- Protected Attributes inherited from org.turro.jpa.iterator.DaoHtmlTree< E, ID >
IConstructor constructor
 
ElephantMarker marker
 
- Protected Attributes inherited from org.turro.jpa.iterator.DaoTree< E, ID >
Dao dao
 

Detailed Description

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

Definition at line 40 of file TreeDaoContentIterator.java.

Constructor & Destructor Documentation

◆ TreeDaoContentIterator()

org.turro.jpa.content.TreeDaoContentIterator< E, ID >.TreeDaoContentIterator ( Dao  dao,
ElephantMarker  marker,
String  contextPath,
IContact  contact 
)

Definition at line 48 of file TreeDaoContentIterator.java.

48  {
49  super(dao, marker);
50  this.contextPath = contextPath;
51  this.contact = contact;
52  processParameters();
53  }

Member Function Documentation

◆ doAttachmentsCtrl()

abstract Object org.turro.jpa.content.TreeDaoContentIterator< E, ID >.doAttachmentsCtrl ( e)
abstractprotected
Here is the caller graph for this function:

◆ doCommentsCtrl()

abstract Object org.turro.jpa.content.TreeDaoContentIterator< E, ID >.doCommentsCtrl ( e)
abstractprotected
Here is the caller graph for this function:

◆ doDescriptionsCtrl()

abstract Object org.turro.jpa.content.TreeDaoContentIterator< E, ID >.doDescriptionsCtrl ( e)
abstractprotected
Here is the caller graph for this function:

◆ doFilesCtrl()

abstract Object org.turro.jpa.content.TreeDaoContentIterator< E, ID >.doFilesCtrl ( e)
abstractprotected
Here is the caller graph for this function:

◆ doInterestCtrl()

abstract Object org.turro.jpa.content.TreeDaoContentIterator< E, ID >.doInterestCtrl ( e)
abstractprotected
Here is the caller graph for this function:

◆ doPollsCtrl()

abstract Object org.turro.jpa.content.TreeDaoContentIterator< E, ID >.doPollsCtrl ( e)
abstractprotected
Here is the caller graph for this function:

◆ doVotesCtrl()

abstract Object org.turro.jpa.content.TreeDaoContentIterator< E, ID >.doVotesCtrl ( e)
abstractprotected
Here is the caller graph for this function:

◆ getAttachmentsCtrl()

Object org.turro.jpa.content.TreeDaoContentIterator< E, ID >.getAttachmentsCtrl ( e)

Definition at line 269 of file TreeDaoContentIterator.java.

269  {
270  if(isAllowAttachments()) {
271  return doAttachmentsCtrl(e);
272  }
273  return null;
274  }
Here is the call graph for this function:

◆ getCommentsCtrl()

Object org.turro.jpa.content.TreeDaoContentIterator< E, ID >.getCommentsCtrl ( e)

Definition at line 262 of file TreeDaoContentIterator.java.

262  {
263  if(isAllowComments()) {
264  return doCommentsCtrl(e);
265  }
266  return null;
267  }
Here is the call graph for this function:

◆ getContact()

Definition at line 131 of file TreeDaoContentIterator.java.

131  {
132  return contact;
133  }
Here is the caller graph for this function:

◆ getContextPath()

String org.turro.jpa.content.TreeDaoContentIterator< E, ID >.getContextPath ( )

Definition at line 127 of file TreeDaoContentIterator.java.

127  {
128  return contextPath;
129  }

◆ getCssClass()

String org.turro.jpa.content.TreeDaoContentIterator< E, ID >.getCssClass ( String  path)

Definition at line 141 of file TreeDaoContentIterator.java.

141  {
142  String selected = getSelectedItem();
143  if(path == null || selected == null) {
144  return "";
145  } else if(path.equals(selected)) {
146  return "active";
147  } else if(selected.startsWith(path)) {
148  return "inpath";
149  } else {
150  return "";
151  }
152  }
Here is the call graph for this function:

◆ getDescriptionsCtrl()

Object org.turro.jpa.content.TreeDaoContentIterator< E, ID >.getDescriptionsCtrl ( e)

Definition at line 283 of file TreeDaoContentIterator.java.

283  {
284  if(isAllowDescriptions()) {
285  return doDescriptionsCtrl(e);
286  }
287  return null;
288  }
Here is the call graph for this function:

◆ getFilesCtrl()

Object org.turro.jpa.content.TreeDaoContentIterator< E, ID >.getFilesCtrl ( e)

Definition at line 276 of file TreeDaoContentIterator.java.

276  {
277  if(isAllowFiles()) {
278  return doFilesCtrl(e);
279  }
280  return null;
281  }
Here is the call graph for this function:

◆ getForumCtrl()

Object org.turro.jpa.content.TreeDaoContentIterator< E, ID >.getForumCtrl ( e)

Definition at line 297 of file TreeDaoContentIterator.java.

297  {
298  if(isAllowForum()) {
299  IEntityCtrl ecf = Plugins.loadImplementation(IEntityCtrl.class, "forum-ctrl");
300  if(ecf != null) {
301  IElephantEntity iee = Entities.getController(e);
302  ecf.setConstructor(constructor);
303  ecf.setEntityPath(iee.getPath());
304  ecf.setTemplate("related");
305  marker.put("forum", ecf);
306  return iee.configureCtrl(ecf, getContact());
307  }
308  }
309  return null;
310  }
Object put(Object key, Object value)
Here is the call graph for this function:

◆ getInterestCtrl()

Object org.turro.jpa.content.TreeDaoContentIterator< E, ID >.getInterestCtrl ( e)

Definition at line 255 of file TreeDaoContentIterator.java.

255  {
256  if(isAllowInterest()) {
257  return doInterestCtrl(e);
258  }
259  return null;
260  }
Here is the call graph for this function:

◆ getItemClause()

abstract WhereClause org.turro.jpa.content.TreeDaoContentIterator< E, ID >.getItemClause ( String  currPath)
abstractprotected

Reimplemented in org.turro.alliance.www.CategoriesTree, and org.turro.dossier.www.CategoriesTree.

Here is the caller graph for this function:

◆ getPollsCtrl()

Object org.turro.jpa.content.TreeDaoContentIterator< E, ID >.getPollsCtrl ( e)

Definition at line 290 of file TreeDaoContentIterator.java.

290  {
291  if(isAllowPolls()) {
292  return doPollsCtrl(e);
293  }
294  return null;
295  }
Here is the call graph for this function:

◆ getSelectedItem() [1/2]

String org.turro.jpa.content.TreeDaoContentIterator< E, ID >.getSelectedItem ( )

Definition at line 167 of file TreeDaoContentIterator.java.

167  {
168  return (String) constructor.getSessionAttribute(contextPath + "-selected-tree-item");
169  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getSelectedItem() [2/2]

static String org.turro.jpa.content.TreeDaoContentIterator< E, ID >.getSelectedItem ( IConstructor  constructor,
String  pathOrigin 
)
static

Definition at line 171 of file TreeDaoContentIterator.java.

171  {
172  return (String) constructor.getSessionAttribute(pathOrigin + "-selected-tree-item");
173  }
Here is the call graph for this function:

◆ getSelectionLink()

static String org.turro.jpa.content.TreeDaoContentIterator< E, ID >.getSelectionLink ( String  path)
static

Definition at line 137 of file TreeDaoContentIterator.java.

137  {
138  return MarkerHelper.setObfuscatedPars("selected=" + path);
139  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getTemplateRoot()

abstract String org.turro.jpa.content.TreeDaoContentIterator< E, ID >.getTemplateRoot ( )
abstractprotected

Reimplemented in org.turro.alliance.www.CategoriesTree, and org.turro.dossier.www.CategoriesTree.

Here is the caller graph for this function:

◆ getVotesCtrl()

Object org.turro.jpa.content.TreeDaoContentIterator< E, ID >.getVotesCtrl ( e)

Definition at line 248 of file TreeDaoContentIterator.java.

248  {
249  if(isAllowVotes()) {
250  return doVotesCtrl(e);
251  }
252  return null;
253  }
Here is the call graph for this function:

◆ isAllowAttachments()

boolean org.turro.jpa.content.TreeDaoContentIterator< E, ID >.isAllowAttachments ( )

Definition at line 95 of file TreeDaoContentIterator.java.

95  {
96  return allowAttachments;
97  }
Here is the caller graph for this function:

◆ isAllowComments()

boolean org.turro.jpa.content.TreeDaoContentIterator< E, ID >.isAllowComments ( )

Definition at line 71 of file TreeDaoContentIterator.java.

71  {
72  return allowComments;
73  }
Here is the caller graph for this function:

◆ isAllowDescriptions()

boolean org.turro.jpa.content.TreeDaoContentIterator< E, ID >.isAllowDescriptions ( )

Definition at line 87 of file TreeDaoContentIterator.java.

87  {
88  return allowDescriptions;
89  }
Here is the caller graph for this function:

◆ isAllowFiles()

boolean org.turro.jpa.content.TreeDaoContentIterator< E, ID >.isAllowFiles ( )

Definition at line 103 of file TreeDaoContentIterator.java.

103  {
104  return allowFiles;
105  }
Here is the caller graph for this function:

◆ isAllowForum()

boolean org.turro.jpa.content.TreeDaoContentIterator< E, ID >.isAllowForum ( )

Definition at line 119 of file TreeDaoContentIterator.java.

119  {
120  return allowForum;
121  }
Here is the caller graph for this function:

◆ isAllowInterest()

boolean org.turro.jpa.content.TreeDaoContentIterator< E, ID >.isAllowInterest ( )

Definition at line 63 of file TreeDaoContentIterator.java.

63  {
64  return allowInterest;
65  }
Here is the caller graph for this function:

◆ isAllowPolls()

boolean org.turro.jpa.content.TreeDaoContentIterator< E, ID >.isAllowPolls ( )

Definition at line 111 of file TreeDaoContentIterator.java.

111  {
112  return allowPolls;
113  }
Here is the caller graph for this function:

◆ isAllowVotes()

boolean org.turro.jpa.content.TreeDaoContentIterator< E, ID >.isAllowVotes ( )

Definition at line 79 of file TreeDaoContentIterator.java.

79  {
80  return allowVotes;
81  }
Here is the caller graph for this function:

◆ isRestricted()

boolean org.turro.jpa.content.TreeDaoContentIterator< E, ID >.isRestricted ( )

Definition at line 55 of file TreeDaoContentIterator.java.

55  {
56  return restricted;
57  }
Here is the caller graph for this function:

◆ parseItem()

String org.turro.jpa.content.TreeDaoContentIterator< E, ID >.parseItem ( ElephantMarker  marker,
item 
)
protected

Reimplemented from org.turro.jpa.iterator.DaoHtmlTree< E, ID >.

Definition at line 239 of file TreeDaoContentIterator.java.

239  {
240  marker.put("item", item);
241  marker.put("tree", this);
242  prepareItem(marker, item);
244  }
abstract void prepareItem(ElephantMarker marker, E item)
String parse(String rootTmpl, String tmpl)
Here is the call graph for this function:

◆ parseSelected()

String org.turro.jpa.content.TreeDaoContentIterator< E, ID >.parseSelected ( )

Reimplemented from org.turro.jpa.iterator.DaoHtmlTree< E, ID >.

Definition at line 202 of file TreeDaoContentIterator.java.

202  {
204  if(selected != null) {
205  marker.put("iterator", this);
206  marker.put("item", selected);
208  }
209  return "";
210  }
Object getSingleResultOrNull(SqlClause sc)
Definition: Dao.java:419
abstract WhereClause getItemClause(String currPath)
Here is the call graph for this function:

◆ parseTree()

String org.turro.jpa.content.TreeDaoContentIterator< E, ID >.parseTree ( ElephantMarker  marker,
List< Item< E, ID >>  items 
)
protected

Reimplemented from org.turro.jpa.iterator.DaoHtmlTree< E, ID >.

Definition at line 230 of file TreeDaoContentIterator.java.

230  {
231  marker.put("context", contextPath);
232  marker.put("items", items);
233  marker.put("tree", this);
234  prepareTree(marker, items);
236  }
abstract void prepareTree(ElephantMarker marker, List< Item< E, ID >> items)
Here is the call graph for this function:

◆ prepareItem()

abstract void org.turro.jpa.content.TreeDaoContentIterator< E, ID >.prepareItem ( ElephantMarker  marker,
item 
)
abstractprotected
Here is the caller graph for this function:

◆ prepareTree()

abstract void org.turro.jpa.content.TreeDaoContentIterator< E, ID >.prepareTree ( ElephantMarker  marker,
List< Item< E, ID >>  items 
)
abstractprotected
Here is the caller graph for this function:

◆ renderItem()

void org.turro.jpa.content.TreeDaoContentIterator< E, ID >.renderItem ( ElephantMarker  marker,
item 
)
protected

Reimplemented from org.turro.jpa.iterator.DaoHtmlTree< E, ID >.

Definition at line 222 of file TreeDaoContentIterator.java.

222  {
223  marker.put("item", item);
224  marker.put("tree", this);
225  prepareItem(marker, item);
227  }
void process(String rootTmpl, String tmpl)
Here is the call graph for this function:

◆ renderSelected()

void org.turro.jpa.content.TreeDaoContentIterator< E, ID >.renderSelected ( )

Reimplemented from org.turro.jpa.iterator.DaoHtmlTree< E, ID >.

Definition at line 192 of file TreeDaoContentIterator.java.

192  {
194  if(selected != null) {
195  marker.put("iterator", this);
196  marker.put("item", selected);
198  }
199  }
Here is the call graph for this function:

◆ renderTree()

void org.turro.jpa.content.TreeDaoContentIterator< E, ID >.renderTree ( ElephantMarker  marker,
List< Item< E, ID >>  items 
)
protected

Reimplemented from org.turro.jpa.iterator.DaoHtmlTree< E, ID >.

Definition at line 213 of file TreeDaoContentIterator.java.

213  {
214  marker.put("context", contextPath);
215  marker.put("items", items);
216  marker.put("tree", this);
217  prepareTree(marker, items);
219  }
Here is the call graph for this function:

◆ setAllowAttachments()

void org.turro.jpa.content.TreeDaoContentIterator< E, ID >.setAllowAttachments ( boolean  allowAttachments)

Definition at line 99 of file TreeDaoContentIterator.java.

99  {
100  this.allowAttachments = allowAttachments;
101  }
Here is the caller graph for this function:

◆ setAllowComments()

void org.turro.jpa.content.TreeDaoContentIterator< E, ID >.setAllowComments ( boolean  allowComments)

Definition at line 75 of file TreeDaoContentIterator.java.

75  {
76  this.allowComments = allowComments;
77  }
Here is the caller graph for this function:

◆ setAllowDescriptions()

void org.turro.jpa.content.TreeDaoContentIterator< E, ID >.setAllowDescriptions ( boolean  allowDescriptions)

Definition at line 91 of file TreeDaoContentIterator.java.

91  {
92  this.allowDescriptions = allowDescriptions;
93  }
Here is the caller graph for this function:

◆ setAllowFiles()

void org.turro.jpa.content.TreeDaoContentIterator< E, ID >.setAllowFiles ( boolean  allowFiles)

Definition at line 107 of file TreeDaoContentIterator.java.

107  {
108  this.allowFiles = allowFiles;
109  }

◆ setAllowForum()

void org.turro.jpa.content.TreeDaoContentIterator< E, ID >.setAllowForum ( boolean  allowForum)

Definition at line 123 of file TreeDaoContentIterator.java.

123  {
124  this.allowForum = allowForum;
125  }
Here is the caller graph for this function:

◆ setAllowInterest()

void org.turro.jpa.content.TreeDaoContentIterator< E, ID >.setAllowInterest ( boolean  allowInterest)

Definition at line 67 of file TreeDaoContentIterator.java.

67  {
68  this.allowInterest = allowInterest;
69  }
Here is the caller graph for this function:

◆ setAllowPolls()

void org.turro.jpa.content.TreeDaoContentIterator< E, ID >.setAllowPolls ( boolean  allowPolls)

Definition at line 115 of file TreeDaoContentIterator.java.

115  {
116  this.allowPolls = allowPolls;
117  }

◆ setAllowVotes()

void org.turro.jpa.content.TreeDaoContentIterator< E, ID >.setAllowVotes ( boolean  allowVotes)

Definition at line 83 of file TreeDaoContentIterator.java.

83  {
84  this.allowVotes = allowVotes;
85  }
Here is the caller graph for this function:

◆ setRestricted()

void org.turro.jpa.content.TreeDaoContentIterator< E, ID >.setRestricted ( boolean  restricted)

Definition at line 59 of file TreeDaoContentIterator.java.

59  {
60  this.restricted = restricted;
61  }
Here is the caller graph for this function:

◆ setSelectedItem()

void org.turro.jpa.content.TreeDaoContentIterator< E, ID >.setSelectedItem ( String  value)
protected

Definition at line 161 of file TreeDaoContentIterator.java.

161  {
162  if(value != null) {
163  constructor.setSessionAttribute(contextPath + "-selected-tree-item", value);
164  }
165  }
void setSessionAttribute(String key, Object value)
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: