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

Public Member Functions

 EntityItemContentIterator (List collection, IConstructor constructor, Writer writer, IContact contact, boolean mail, String contextPath)
 
String getContextPath ()
 
IContact getContact ()
 
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 isMail ()
 
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)
 
- Public Member Functions inherited from org.turro.collections.CollectionHtmlIterator< E, ID >
 CollectionHtmlIterator (List collection, ElephantMarker marker)
 
 CollectionHtmlIterator (List collection, ElephantMarker marker, Writer writer)
 
void setSummaryTemplate (String summaryTemplate)
 
String getSummaryTemplate ()
 
void setFullTemplate (String fullTemplate)
 
String getFullTemplate ()
 
boolean isNavigatorTop ()
 
void setNavigatorTop (boolean navigatorTop)
 
boolean isNavigatorBottom ()
 
void setNavigatorBottom (boolean navigatorBottom)
 
boolean isSearchOption ()
 
void setSearchOption (boolean searchOption)
 
boolean isForceSummary ()
 
void setForceSummary (boolean forceSummary)
 
boolean wantItem ()
 
boolean isItem ()
 
Object addAttribute (String key, Object value)
 
Writer getWriter ()
 
void load ()
 
void forceItem (ID item)
 
String getTitle ()
 
Collection< String > getMetas ()
 
void render ()
 
boolean isFirst ()
 
boolean isLast ()
 
String renderSearchEngine ()
 
String renderTree ()
 
String renderTreeSelection ()
 
boolean isEmpty ()
 
- Public Member Functions inherited from org.turro.collections.CollectionIterator< E, ID >
 CollectionIterator (List< E > collection)
 
int getPage ()
 
void setPage (int page)
 
void initClauses ()
 
List< E > getItems ()
 
int getTotalCount ()
 
List< E > getTotalItems ()
 
int item ()
 
void current (int value)
 
int current ()
 
int pages ()
 
boolean beginning ()
 
boolean end ()
 
void next ()
 
void previous ()
 

Protected Member Functions

void prepareControls (E entity, int page)
 
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 String getItemLink (E e)
 
abstract String getReadAllLink ()
 
abstract String getRestrictedLink ()
 
- Protected Member Functions inherited from org.turro.collections.CollectionHtmlIterator< E, ID >
abstract E entity (ID value)
 
abstract void renderSummary (ElephantMarker marker, E e, int page)
 
abstract void renderItem (ElephantMarker marker, E e, int page)
 
abstract String title (E e)
 
abstract Collection< String > metas (E e)
 
ID getIdentifier ()
 
void onRenderItem (E e)
 
boolean isValid (E e)
 
ID parseId (String value)
 
String stringId (ID value)
 

Additional Inherited Members

- Static Public Attributes inherited from org.turro.action.content.IContentIterator
static String PRELOAD_TMPL = "#preload"
 
- Protected Attributes inherited from org.turro.collections.CollectionHtmlIterator< E, ID >
HTMLHelper html
 
IConstructor constructor
 
ElephantMarker marker
 
- Protected Attributes inherited from org.turro.collections.CollectionIterator< E, ID >
List< E > items
 
int _total = -1
 

Detailed Description

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

Definition at line 36 of file EntityItemContentIterator.java.

Constructor & Destructor Documentation

◆ EntityItemContentIterator()

org.turro.jpa.content.EntityItemContentIterator< E, ID >.EntityItemContentIterator ( List  collection,
IConstructor  constructor,
Writer  writer,
IContact  contact,
boolean  mail,
String  contextPath 
)

Definition at line 44 of file EntityItemContentIterator.java.

45  {
46  super(collection, new ElephantMarker(constructor, mail), writer);
47  this.contextPath = Optional.ofNullable(contextPath)
48  .orElse(
49  Optional.ofNullable(constructor)
50  .map(cons -> cons.getCurrentContext())
51  .map(ctx -> ctx.getFullPath())
52  .filter(path -> !path.endsWith("/user"))
53  .orElse(null)
54  );
55  this.contact = contact;
56  this.mail = mail;
57  }

Member Function Documentation

◆ doAttachmentsCtrl()

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

◆ doCommentsCtrl()

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

◆ doDescriptionsCtrl()

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

◆ doFilesCtrl()

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

◆ doInterestCtrl()

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

◆ doPollsCtrl()

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

◆ doVotesCtrl()

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

◆ getAttachmentsCtrl()

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

Definition at line 148 of file EntityItemContentIterator.java.

148  {
149  if(allowAttachments) {
150  return doAttachmentsCtrl(e);
151  }
152  return null;
153  }
Here is the call graph for this function:

◆ getCommentsCtrl()

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

Definition at line 141 of file EntityItemContentIterator.java.

141  {
142  if(allowComments) {
143  return doCommentsCtrl(e);
144  }
145  return null;
146  }
Here is the call graph for this function:

◆ getContact()

Definition at line 63 of file EntityItemContentIterator.java.

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

◆ getContextPath()

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

Definition at line 59 of file EntityItemContentIterator.java.

59  {
60  return contextPath;
61  }
Here is the caller graph for this function:

◆ getDescriptionsCtrl()

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

Definition at line 162 of file EntityItemContentIterator.java.

162  {
163  if(allowDescriptions) {
164  return doDescriptionsCtrl(e);
165  }
166  return null;
167  }
Here is the call graph for this function:

◆ getFilesCtrl()

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

Definition at line 155 of file EntityItemContentIterator.java.

155  {
156  if(allowFiles) {
157  return doFilesCtrl(e);
158  }
159  return null;
160  }
Here is the call graph for this function:

◆ getInterestCtrl()

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

Definition at line 134 of file EntityItemContentIterator.java.

134  {
135  if(allowInterest) {
136  return doInterestCtrl(e);
137  }
138  return null;
139  }
Here is the call graph for this function:

◆ getItemLink()

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

◆ getPollsCtrl()

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

Definition at line 169 of file EntityItemContentIterator.java.

169  {
170  if(allowPolls) {
171  return doPollsCtrl(e);
172  }
173  return null;
174  }
Here is the call graph for this function:

◆ getReadAllLink()

◆ getRestrictedLink()

◆ getTemplateRoot()

◆ getVotesCtrl()

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

Definition at line 127 of file EntityItemContentIterator.java.

127  {
128  if(allowVotes) {
129  return doVotesCtrl(e);
130  }
131  return null;
132  }
Here is the call graph for this function:

◆ isAllowAttachments()

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

Definition at line 99 of file EntityItemContentIterator.java.

99  {
100  return allowAttachments;
101  }

◆ isAllowComments()

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

Definition at line 75 of file EntityItemContentIterator.java.

75  {
76  return allowComments;
77  }

◆ isAllowDescriptions()

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

Definition at line 91 of file EntityItemContentIterator.java.

91  {
92  return allowDescriptions;
93  }

◆ isAllowFiles()

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

Definition at line 107 of file EntityItemContentIterator.java.

107  {
108  return allowFiles;
109  }

◆ isAllowInterest()

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

Definition at line 67 of file EntityItemContentIterator.java.

67  {
68  return allowInterest;
69  }

◆ isAllowPolls()

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

Definition at line 115 of file EntityItemContentIterator.java.

115  {
116  return allowPolls;
117  }

◆ isAllowVotes()

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

Definition at line 83 of file EntityItemContentIterator.java.

83  {
84  return allowVotes;
85  }

◆ isMail()

Definition at line 123 of file EntityItemContentIterator.java.

123  {
124  return mail;
125  }
Here is the caller graph for this function:

◆ prepareControls()

void org.turro.jpa.content.EntityItemContentIterator< E, ID >.prepareControls ( entity,
int  page 
)
protected

Definition at line 176 of file EntityItemContentIterator.java.

176  {
177  marker.put("entiter", this);
178  if(!marker.contains("iee")) {
179  IElephantEntity iee = Entities.getController(entity);
180  if(!(iee instanceof EmptyController)) {
181  marker.put("iee", iee);
182  }
183  }
184  if(isMail()) {
185  marker.put("itemLink", "{liveref:" + getItemLink(entity) + "}");
186  marker.put("allLink", "{liveref:" + getReadAllLink() + "}");
187  marker.put("restrictedLink", "{liveref:" + getRestrictedLink() + "}");
188  } else {
189  marker.put("itemLink", getItemLink(entity));
190  marker.put("allLink", getReadAllLink());
191  marker.put("restrictedLink", getRestrictedLink());
192  }
193  }
Object put(Object key, Object value)
Here is the call graph for this function:

◆ setAllowAttachments()

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

Definition at line 103 of file EntityItemContentIterator.java.

103  {
104  this.allowAttachments = allowAttachments;
105  }
Here is the caller graph for this function:

◆ setAllowComments()

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

Definition at line 79 of file EntityItemContentIterator.java.

79  {
80  this.allowComments = allowComments;
81  }
Here is the caller graph for this function:

◆ setAllowDescriptions()

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

Definition at line 95 of file EntityItemContentIterator.java.

95  {
96  this.allowDescriptions = allowDescriptions;
97  }
Here is the caller graph for this function:

◆ setAllowFiles()

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

Definition at line 111 of file EntityItemContentIterator.java.

111  {
112  this.allowFiles = allowFiles;
113  }

◆ setAllowInterest()

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

Definition at line 71 of file EntityItemContentIterator.java.

71  {
72  this.allowInterest = allowInterest;
73  }
Here is the caller graph for this function:

◆ setAllowPolls()

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

Definition at line 119 of file EntityItemContentIterator.java.

119  {
120  this.allowPolls = allowPolls;
121  }
Here is the caller graph for this function:

◆ setAllowVotes()

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

Definition at line 87 of file EntityItemContentIterator.java.

87  {
88  this.allowVotes = allowVotes;
89  }
Here is the caller graph for this function:

The documentation for this class was generated from the following file: