BrightSide Workbench Full Report + Source Code
org.turro.dossier.content.KnowledgeBaseContentIterator Class Reference
Inheritance diagram for org.turro.dossier.content.KnowledgeBaseContentIterator:
Collaboration diagram for org.turro.dossier.content.KnowledgeBaseContentIterator:

Public Member Functions

 KnowledgeBaseContentIterator (IConstructor constructor, Writer writer, IContact contact, boolean mail, String pubPath)
 
boolean isShowSubject ()
 
void setShowSubject (boolean showSubject)
 
- Public Member Functions inherited from org.turro.jpa.content.EntityItemContentIterator< E, ID >
 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 renderSummary (ElephantMarker marker, IssueWrapper e, int page)
 
void renderItem (ElephantMarker marker, IssueWrapper e, int page)
 
IssueWrapper entity (Long value)
 
boolean isValid (IssueWrapper e)
 
String title (IssueWrapper e)
 
Collection< String > metas (IssueWrapper e)
 
String getTemplateRoot ()
 
Object doVotesCtrl (IssueWrapper e)
 
Object doInterestCtrl (IssueWrapper e)
 
Object doCommentsCtrl (IssueWrapper e)
 
Object doAttachmentsCtrl (IssueWrapper e)
 
Object doFilesCtrl (IssueWrapper e)
 
Object doDescriptionsCtrl (IssueWrapper e)
 
Object doPollsCtrl (IssueWrapper e)
 
String getItemLink (IssueWrapper e)
 
String getReadAllLink ()
 
String getRestrictedLink ()
 
- Protected Member Functions inherited from org.turro.jpa.content.EntityItemContentIterator< E, ID >
void prepareControls (E entity, int page)
 
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)
 
- 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 57 of file KnowledgeBaseContentIterator.java.

Constructor & Destructor Documentation

◆ KnowledgeBaseContentIterator()

org.turro.dossier.content.KnowledgeBaseContentIterator.KnowledgeBaseContentIterator ( IConstructor  constructor,
Writer  writer,
IContact  contact,
boolean  mail,
String  pubPath 
)

Definition at line 62 of file KnowledgeBaseContentIterator.java.

62  {
63  super(getKnowledgeBase(contact), constructor, writer, contact, mail, pubPath);
64  this.all = contact.getPermissions().isInRole("issue:all");
65  }
Here is the call graph for this function:

Member Function Documentation

◆ doAttachmentsCtrl()

Object org.turro.dossier.content.KnowledgeBaseContentIterator.doAttachmentsCtrl ( IssueWrapper  e)
protected

Definition at line 214 of file KnowledgeBaseContentIterator.java.

214  {
215  return Entities.getController(e.getIssue()).configureCtrl(
216  new AttachCtrl(constructor), getContact());
217  }
Here is the call graph for this function:

◆ doCommentsCtrl()

Object org.turro.dossier.content.KnowledgeBaseContentIterator.doCommentsCtrl ( IssueWrapper  e)
protected

Definition at line 208 of file KnowledgeBaseContentIterator.java.

208  {
209  return Entities.getController(e.getIssue()).configureCtrl(
210  new CommentItCtrl(constructor), getContact());
211  }
Here is the call graph for this function:

◆ doDescriptionsCtrl()

Object org.turro.dossier.content.KnowledgeBaseContentIterator.doDescriptionsCtrl ( IssueWrapper  e)
protected

Definition at line 226 of file KnowledgeBaseContentIterator.java.

226  {
227  return Entities.getController(e.getIssue()).configureCtrl(
228  new DescribeItCtrl(constructor), getContact());
229  }
Here is the call graph for this function:

◆ doFilesCtrl()

Object org.turro.dossier.content.KnowledgeBaseContentIterator.doFilesCtrl ( IssueWrapper  e)
protected

Definition at line 220 of file KnowledgeBaseContentIterator.java.

220  {
221  return Entities.getController(e.getIssue()).configureCtrl(
222  new FileAttach(DossierPU.getObjectPath(e.getIssue())), getContact());
223  }
Here is the call graph for this function:

◆ doInterestCtrl()

Object org.turro.dossier.content.KnowledgeBaseContentIterator.doInterestCtrl ( IssueWrapper  e)
protected

Definition at line 202 of file KnowledgeBaseContentIterator.java.

202  {
203  return Entities.getController(e.getIssue()).configureCtrl(
204  new StarItCtrl(constructor), getContact());
205  }
Here is the call graph for this function:

◆ doPollsCtrl()

Object org.turro.dossier.content.KnowledgeBaseContentIterator.doPollsCtrl ( IssueWrapper  e)
protected

Definition at line 232 of file KnowledgeBaseContentIterator.java.

232  {
233  throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
234  }

◆ doVotesCtrl()

Object org.turro.dossier.content.KnowledgeBaseContentIterator.doVotesCtrl ( IssueWrapper  e)
protected

Definition at line 196 of file KnowledgeBaseContentIterator.java.

196  {
197  return Entities.getController(e.getIssue()).configureCtrl(
198  new VoteItCtrl(constructor), getContact());
199  }
Here is the call graph for this function:

◆ entity()

IssueWrapper org.turro.dossier.content.KnowledgeBaseContentIterator.entity ( Long  value)
protected

Definition at line 94 of file KnowledgeBaseContentIterator.java.

94  {
95  for(IssueWrapper wrapper : collection) {
96  if(wrapper.getIssue().getId().equals(value)) {
97  return wrapper;
98  }
99  }
100  return null;
101  }

◆ getItemLink()

String org.turro.dossier.content.KnowledgeBaseContentIterator.getItemLink ( IssueWrapper  e)
protected

Definition at line 237 of file KnowledgeBaseContentIterator.java.

237  {
238  return getReadAllLink() + "?item=" + e.getIssue().getId();
239  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getReadAllLink()

String org.turro.dossier.content.KnowledgeBaseContentIterator.getReadAllLink ( )
protected

Reimplemented from org.turro.jpa.content.EntityItemContentIterator< E, ID >.

Definition at line 242 of file KnowledgeBaseContentIterator.java.

242  {
243  if(Strings.isBlank(getContextPath())) {
244  return getRestrictedLink();
245  }
246  return getContextPath();
247  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getRestrictedLink()

String org.turro.dossier.content.KnowledgeBaseContentIterator.getRestrictedLink ( )
protected

Reimplemented from org.turro.jpa.content.EntityItemContentIterator< E, ID >.

Definition at line 250 of file KnowledgeBaseContentIterator.java.

250  {
251  return "/user/kbase";
252  }
Here is the caller graph for this function:

◆ getTemplateRoot()

String org.turro.dossier.content.KnowledgeBaseContentIterator.getTemplateRoot ( )
protected

Reimplemented from org.turro.jpa.content.EntityItemContentIterator< E, ID >.

Definition at line 191 of file KnowledgeBaseContentIterator.java.

191  {
192  return isMail() ? "content/newsletter/sections/knowledgeBase" : "issue";
193  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isShowSubject()

boolean org.turro.dossier.content.KnowledgeBaseContentIterator.isShowSubject ( )

Definition at line 67 of file KnowledgeBaseContentIterator.java.

67  {
68  return showSubject;
69  }

◆ isValid()

boolean org.turro.dossier.content.KnowledgeBaseContentIterator.isValid ( IssueWrapper  e)
protected

Definition at line 104 of file KnowledgeBaseContentIterator.java.

104  {
105  if(e != null) {
106  return all || e.getIssue().isKnowledgeBase() || e.isFullParticipant();
107  } else {
108  return super.isValid(e);
109  }
110  }
Here is the call graph for this function:

◆ metas()

Collection<String> org.turro.dossier.content.KnowledgeBaseContentIterator.metas ( IssueWrapper  e)
protected

Definition at line 165 of file KnowledgeBaseContentIterator.java.

165  {
166  ArrayList<RepositoryFile> files = new ArrayList<>();
167  String path = getItemLink(e);
168  if(!SocialImageMap.hasImage(path)) {
169  FileAttach fa = new FileAttach(DossierPU.getObjectPath(e));
170  Repository repository = fa.getPublishableRepository(constructor);
171  files.addAll(repository.getRepositoryFiles("*_social.png,*_social.jpg"));
172  files.addAll(repository.getRepositoryFiles("*.png,*.jpg"));
173  }
174  SocialNet sn = new SocialNet(path, e.getIssue().getDescription(), e.getIssue().getFullDescription(), files);
175  return sn.getMetas();
176  }
Here is the call graph for this function:

◆ renderItem()

void org.turro.dossier.content.KnowledgeBaseContentIterator.renderItem ( ElephantMarker  marker,
IssueWrapper  e,
int  page 
)
protected

Definition at line 86 of file KnowledgeBaseContentIterator.java.

Here is the call graph for this function:

◆ renderSummary()

void org.turro.dossier.content.KnowledgeBaseContentIterator.renderSummary ( ElephantMarker  marker,
IssueWrapper  e,
int  page 
)
protected

Definition at line 76 of file KnowledgeBaseContentIterator.java.

76  {
77  if(e != null) {
78  marker.put("issue", e.getIssue());
79  marker.put("wrapper", e);
80  prepareValues(e, page);
81  }
83  }
Here is the call graph for this function:

◆ setShowSubject()

void org.turro.dossier.content.KnowledgeBaseContentIterator.setShowSubject ( boolean  showSubject)

Definition at line 71 of file KnowledgeBaseContentIterator.java.

71  {
72  this.showSubject = showSubject;
73  }

◆ title()

String org.turro.dossier.content.KnowledgeBaseContentIterator.title ( IssueWrapper  e)
protected

Definition at line 157 of file KnowledgeBaseContentIterator.java.

157  {
158  if(!Strings.isBlank(e.getIssue().getFullDescription(showSubject))) {
159  return e.getIssue().getFullDescription(showSubject);
160  }
161  return null;
162  }
Here is the call graph for this function:

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