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

Public Member Functions

 DossierContentIterator (IConstructor constructor, Writer writer, IContact contact, boolean mail, String pubPath)
 
void setCategoryId (long categoryId)
 
void setDossierId (long dossierId)
 
void setDossierTypes (List< String > dossierTypes)
 
void setDossierStatus (List< String > dossierStatus)
 
List< String > getProjectPhases ()
 
void setProjectPhases (List< String > projectPhases)
 
boolean isShowSubject ()
 
void setShowSubject (boolean showSubject)
 
void setAllowedCategories (String allowedCategories)
 
String getIssuePath ()
 
void setIssuePath (String issuePath)
 
PhaseHtmlFilter getPhaseFilter ()
 
void setPhaseFilter (PhaseHtmlFilter phaseFilter)
 
boolean isDirect ()
 
void setDirect (boolean direct)
 
void setRelated (Collection< IContact > related)
 
String getPendingWorths ()
 
void setPendingWorths (String pendingWorths)
 
- Public Member Functions inherited from org.turro.jpa.content.EntityDaoContentIterator< E, ID >
 EntityDaoContentIterator (Dao dao, IConstructor constructor, Writer writer, IContact contact, boolean mail, String contextPath)
 
void setSeenStatus (SeenStatusCheck seenStatus)
 
SeenStatusCheck getSeenStatus ()
 
String getId ()
 
String getContextPath ()
 
IContact getContact ()
 
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)
 
Object getForumCtrl (E e)
 
void assignDefaultsByName (String name)
 
void assignDefaultsByMacro (MacroProcessorContext context)
 
Object getParticipationCtrl (E e, ParticipationReason reason)
 
Object getSpamCtrl (E e)
 
Object getFollowCtrl (E e)
 
Object getSeenCtrl (E e)
 
Object getLikeCtrl (E e)
 
Object getApplyCtrl (E e)
 
Object getCtrlByLabel (String ctrl, E e, IContact contact)
 
- Public Member Functions inherited from org.turro.jpa.iterator.DaoHtmlIterator< E, ID >
 DaoHtmlIterator (Dao dao, ElephantMarker marker)
 
 DaoHtmlIterator (Dao dao, ElephantMarker marker, Writer writer)
 
void setSummaryTemplate (String summaryTemplate)
 
String getSummaryTemplate ()
 
void setFullTemplate (String fullTemplate)
 
String getFullTemplate ()
 
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 isAllowForum ()
 
void setAllowForum (boolean allowForum)
 
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 isAllowRanking ()
 
void setAllowRanking (boolean allowRanking)
 
boolean isAllowMatching ()
 
void setAllowMatching (boolean allowMatching)
 
boolean isDoMatching ()
 
void setDoMatching (boolean doMatching)
 
String getRankingInstance ()
 
void setRankingInstance (String rankingInstance)
 
String getMatchingInstance ()
 
void setMatchingInstance (String matchingInstance)
 
boolean isAllowSorting ()
 
void setAllowSorting (boolean allowSorting)
 
boolean isNavigatorTop ()
 
void setNavigatorTop (boolean navigatorTop)
 
boolean isNavigatorBottom ()
 
void setNavigatorBottom (boolean navigatorBottom)
 
DaoHtmlTree getNavigationTree ()
 
void setNavigationTree (DaoHtmlTree navigationTree)
 
DaoHtmlSearch getSearchEngine ()
 
void setSearchEngine (DaoHtmlSearch searchEngine)
 
boolean isSearchOption ()
 
void setSearchOption (boolean searchOption)
 
boolean isForceSummary ()
 
void setForceSummary (boolean forceSummary)
 
boolean wantItem ()
 
boolean isItem ()
 
boolean checkEntity (ID value)
 
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 ()
 
TagSet getCloudTags ()
 
TagSet getEntityTags (Object entity)
 
boolean isSeen (Object entity)
 
VisualElements getVisuals ()
 
boolean isEmpty ()
 
- Public Member Functions inherited from org.turro.jpa.iterator.DaoIterator< E, ID >
 DaoIterator (Dao dao)
 
int getPage ()
 
void setPage (int page)
 
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

WhereClause getWhereClause ()
 
WhereClause getCountClause ()
 
void renderSummary (ElephantMarker marker, Dossier e, int page)
 
void renderItem (ElephantMarker marker, Dossier e, int page)
 
String entityRoot ()
 
Dossier entity (Long value)
 
Long getIdentifier ()
 
boolean isValid (Dossier e)
 
VisualElements loadVisuals ()
 
String title (Dossier e)
 
Collection< String > metas (Dossier e)
 
String getTemplateRoot ()
 
Object doVotesCtrl (Dossier e)
 
Object doInterestCtrl (Dossier e)
 
Object doCommentsCtrl (Dossier e)
 
Object doAttachmentsCtrl (Dossier e)
 
Object doFilesCtrl (Dossier e)
 
Object doDescriptionsCtrl (Dossier e)
 
Object doPollsCtrl (Dossier e)
 
String getItemLink (Dossier dossier)
 
String getReadAllLink ()
 
String getRestrictedLink ()
 
- Protected Member Functions inherited from org.turro.jpa.content.EntityDaoContentIterator< E, ID >
void prepareControls (E entity, int page)
 
String doItemLink (E entity, ID id, boolean obfuscated)
 
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.jpa.iterator.DaoHtmlIterator< 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)
 
void renderForbidden (ElephantMarker marker, int page)
 
ID getIDFromURL (String root)
 
void preload ()
 
boolean isValid (E e)
 
boolean canShow (E e)
 
ID parseId (String value)
 
String stringId (ID value)
 
- Protected Member Functions inherited from org.turro.jpa.iterator.DaoIterator< E, ID >
void initClauses ()
 

Additional Inherited Members

- Static Public Attributes inherited from org.turro.action.content.IContentIterator
static String PRELOAD_TMPL = "#preload"
 
- Protected Attributes inherited from org.turro.jpa.iterator.DaoHtmlIterator< E, ID >
HTMLHelper html
 
IConstructor constructor
 
ElephantMarker marker
 
DaoHtmlSearch searchEngine
 
DaoHtmlTree navigationTree
 
- Protected Attributes inherited from org.turro.jpa.iterator.DaoIterator< E, ID >
List< E > items
 
Dao dao
 
int _total = -1
 

Detailed Description

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

Definition at line 81 of file DossierContentIterator.java.

Constructor & Destructor Documentation

◆ DossierContentIterator()

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

Definition at line 91 of file DossierContentIterator.java.

91  {
92  super(new DossierPU(), constructor, writer, contact, mail, pubPath);
93  this.all = contact.getPermissions().isInRole("dossier:all");
94  }
Here is the call graph for this function:

Member Function Documentation

◆ doAttachmentsCtrl()

Object org.turro.dossier.content.DossierContentIterator.doAttachmentsCtrl ( Dossier  e)
protected

Definition at line 528 of file DossierContentIterator.java.

528  {
529  return Entities.getController(e).configureCtrl(
530  new AttachCtrl(constructor), getContact());
531  }
Here is the call graph for this function:

◆ doCommentsCtrl()

Object org.turro.dossier.content.DossierContentIterator.doCommentsCtrl ( Dossier  e)
protected

Definition at line 522 of file DossierContentIterator.java.

522  {
523  return Entities.getController(e).configureCtrl(
524  new CommentItCtrl(constructor), getContact());
525  }
Here is the call graph for this function:

◆ doDescriptionsCtrl()

Object org.turro.dossier.content.DossierContentIterator.doDescriptionsCtrl ( Dossier  e)
protected

Definition at line 540 of file DossierContentIterator.java.

540  {
541  return Entities.getController(e).configureCtrl(
542  new DescribeItCtrl(constructor), getContact());
543  }
Here is the call graph for this function:

◆ doFilesCtrl()

Object org.turro.dossier.content.DossierContentIterator.doFilesCtrl ( Dossier  e)
protected

Definition at line 534 of file DossierContentIterator.java.

534  {
535  return Entities.getController(e).configureCtrl(
536  new FileAttach(DossierPU.getObjectPath(e)), getContact());
537  }
Here is the call graph for this function:

◆ doInterestCtrl()

Object org.turro.dossier.content.DossierContentIterator.doInterestCtrl ( Dossier  e)
protected

Definition at line 516 of file DossierContentIterator.java.

516  {
517  return Entities.getController(e).configureCtrl(
518  new StarItCtrl(constructor), getContact());
519  }
Here is the call graph for this function:

◆ doPollsCtrl()

Object org.turro.dossier.content.DossierContentIterator.doPollsCtrl ( Dossier  e)
protected

Definition at line 546 of file DossierContentIterator.java.

546  {
547  return Entities.getController(e).configureCtrl(
548  new PollsCtrl(constructor), getContact());
549  }
Here is the call graph for this function:

◆ doVotesCtrl()

Object org.turro.dossier.content.DossierContentIterator.doVotesCtrl ( Dossier  e)
protected

Definition at line 510 of file DossierContentIterator.java.

510  {
511  return Entities.getController(e).configureCtrl(
512  new VoteItCtrl(constructor), getContact());
513  }
Here is the call graph for this function:

◆ entity()

Dossier org.turro.dossier.content.DossierContentIterator.entity ( Long  value)
protected

Definition at line 225 of file DossierContentIterator.java.

225  {
226  WhereClause wc = new WhereClause();
227  wc.addClause("select distinct dossier from Dossier as dossier");
228  wc.addClause("left outer join dossier.participants participant");
229  wc.addClause("left outer join dossier.project project");
230  addCriteria(wc, true);
231  wc.addClause("and dossier.id = :id");
232  wc.addNamedValue("id", value);
233  return (Dossier) dao.getSingleResultOrNull(wc);
234  }
Object getSingleResultOrNull(SqlClause sc)
Definition: Dao.java:419
Here is the call graph for this function:

◆ entityRoot()

String org.turro.dossier.content.DossierContentIterator.entityRoot ( )
protected

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

Definition at line 220 of file DossierContentIterator.java.

220  {
221  return "dossier";
222  }

◆ getCountClause()

WhereClause org.turro.dossier.content.DossierContentIterator.getCountClause ( )
protected

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

Definition at line 186 of file DossierContentIterator.java.

186  {
187  WhereClause wc = new WhereClause();
188  wc.addClause("select count(distinct dossier) from Dossier as dossier");
189  wc.addClause("left outer join dossier.participants participant");
190  wc.addClause("left outer join dossier.project project");
191  addCriteria(wc, true);
192  return wc;
193  }
Here is the call graph for this function:

◆ getIdentifier()

Long org.turro.dossier.content.DossierContentIterator.getIdentifier ( )
protected

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

Definition at line 237 of file DossierContentIterator.java.

237  {
238  Long identifier = getIDFromURL("/dossier");
239  if(identifier == null) {
240  identifier = super.getIdentifier();
241  }
242  return identifier;
243  }
Here is the call graph for this function:

◆ getIssuePath()

String org.turro.dossier.content.DossierContentIterator.getIssuePath ( )

Definition at line 132 of file DossierContentIterator.java.

132  {
133  return issuePath;
134  }

◆ getItemLink()

String org.turro.dossier.content.DossierContentIterator.getItemLink ( Dossier  dossier)
protected

Definition at line 552 of file DossierContentIterator.java.

552  {
553  if(getContextPath() == null) {
554  String link = dossier.getDossierURL();
555  if(link != null) {
556  return ElephantContext.getRootWebPath() + link;
557  }
558  }
559  return doItemLink(dossier, dossier.getId(), true);
560  }
String doItemLink(E entity, ID id, boolean obfuscated)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getPendingWorths()

String org.turro.dossier.content.DossierContentIterator.getPendingWorths ( )

Definition at line 160 of file DossierContentIterator.java.

160  {
161  return pendingWorths;
162  }

◆ getPhaseFilter()

PhaseHtmlFilter org.turro.dossier.content.DossierContentIterator.getPhaseFilter ( )

Definition at line 140 of file DossierContentIterator.java.

140  {
141  return phaseFilter;
142  }

◆ getProjectPhases()

List<String> org.turro.dossier.content.DossierContentIterator.getProjectPhases ( )

Definition at line 112 of file DossierContentIterator.java.

112  {
113  return projectPhases;
114  }

◆ getReadAllLink()

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

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

Definition at line 563 of file DossierContentIterator.java.

563  {
564  String path = getContextPath();
565  if(Strings.isBlank(path)) {
566  path = ElephantContext.getEntityWebContext("/" + getTypePath());
567  }
568  if(Strings.isBlank(path)) {
569  return getRestrictedLink();
570  }
571  return path;
572  }
Here is the call graph for this function:

◆ getRestrictedLink()

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

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

Definition at line 575 of file DossierContentIterator.java.

575  {
576  return "/user/my" + getTypePath() + "s";
577  }
Here is the caller graph for this function:

◆ getTemplateRoot()

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

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

Definition at line 505 of file DossierContentIterator.java.

505  {
506  return isMail() ? "content/newsletter/sections/dossiers" : "dossier";
507  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getWhereClause()

WhereClause org.turro.dossier.content.DossierContentIterator.getWhereClause ( )
protected

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

Definition at line 169 of file DossierContentIterator.java.

169  {
170  WhereClause wc = new WhereClause();
171  wc.addClause("select distinct dossier from Dossier as dossier");
172  wc.addClause("left outer join dossier.participants participant");
173  wc.addClause("left outer join dossier.project project");
174  return Statistics.load(constructor, "DossierRanking", "DossierContactMatching", wc)
175  .allowMatching(isAllowMatching())
176  .allowRanking(isAllowRanking())
177  .doMatching(isDoMatching())
178  .setContact(getContact())
179  .setEntityFields("dossier", "id")
180  .setDefaultSorting("dossier.description")
181  .onCriteria(w -> addCriteria(w, true))
182  .getClause();
183  }
Here is the call graph for this function:

◆ isDirect()

boolean org.turro.dossier.content.DossierContentIterator.isDirect ( )

Definition at line 148 of file DossierContentIterator.java.

148  {
149  return direct;
150  }

◆ isShowSubject()

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

Definition at line 120 of file DossierContentIterator.java.

120  {
121  return showSubject;
122  }

◆ isValid()

boolean org.turro.dossier.content.DossierContentIterator.isValid ( Dossier  e)
protected

Definition at line 337 of file DossierContentIterator.java.

337  {
338  if(isRestricted() && e != null) {
339  return all || e.getFullParticipants().isParticipant(getContact());
340  } else {
341  return super.isValid(e);
342  }
343  }
Here is the call graph for this function:

◆ loadVisuals()

VisualElements org.turro.dossier.content.DossierContentIterator.loadVisuals ( )
protected

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

Definition at line 346 of file DossierContentIterator.java.

346  {
347  return DossierVisualElements.load();
348  }
Here is the call graph for this function:

◆ metas()

Collection<String> org.turro.dossier.content.DossierContentIterator.metas ( Dossier  e)
protected

Definition at line 437 of file DossierContentIterator.java.

437  {
438  ArrayList<RepositoryFile> files = new ArrayList<>();
439  String path = getItemLink(e);
440  if(!SocialImageMap.hasImage(path)) {
441  FileAttach fa = new FileAttach(DossierPU.getObjectPath(e));
442  Repository repository = fa.getPublishableRepository(constructor);
443  files.addAll(repository.getRepositoryFiles("*_social.png,*_social.jpg"));
444  files.addAll(repository.getRepositoryFiles("*.png,*.jpg"));
445  }
446  SocialNet sn;
447  if(e.getProject() != null) {
448  sn = new SocialNet(path, e.getDescription(), e.getProject().getGoal(), files);
449  } else {
450  sn = new SocialNet(path, e.getDescription(), e.getFullDescription(), files);
451  }
452  return sn.getMetas();
453  }
Here is the call graph for this function:

◆ renderItem()

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

Definition at line 212 of file DossierContentIterator.java.

212  {
213  marker.put("dossier", e);
214  prepareValues(e, page);
215  marker.put("restricted", isRestricted());
217  }
void process(String rootTmpl, String tmpl)
Object put(Object key, Object value)
Here is the call graph for this function:

◆ renderSummary()

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

Definition at line 196 of file DossierContentIterator.java.

196  {
197  if(e != null) {
198  marker.put("dossier", e);
199  if(e.getCategory() != null) {
200  marker.put("newCategory", e.getCategory().getId() != lastCategoryId);
201  lastCategoryId = e.getCategory().getId();
202  } else {
203  lastCategoryId = 0;
204  }
205  prepareValues(e, page);
206  marker.put("restricted", isRestricted());
207  }
209  }
Here is the call graph for this function:

◆ setAllowedCategories()

void org.turro.dossier.content.DossierContentIterator.setAllowedCategories ( String  allowedCategories)

Definition at line 128 of file DossierContentIterator.java.

128  {
129  this.allowedCategories = allowedCategories;
130  }
Here is the caller graph for this function:

◆ setCategoryId()

void org.turro.dossier.content.DossierContentIterator.setCategoryId ( long  categoryId)

Definition at line 96 of file DossierContentIterator.java.

96  {
97  this.categoryId = categoryId;
98  }

◆ setDirect()

void org.turro.dossier.content.DossierContentIterator.setDirect ( boolean  direct)

Definition at line 152 of file DossierContentIterator.java.

152  {
153  this.direct = direct;
154  }
Here is the caller graph for this function:

◆ setDossierId()

void org.turro.dossier.content.DossierContentIterator.setDossierId ( long  dossierId)

Definition at line 100 of file DossierContentIterator.java.

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

◆ setDossierStatus()

void org.turro.dossier.content.DossierContentIterator.setDossierStatus ( List< String >  dossierStatus)

Definition at line 108 of file DossierContentIterator.java.

108  {
109  this.dossierStatus = dossierStatus;
110  }
Here is the caller graph for this function:

◆ setDossierTypes()

void org.turro.dossier.content.DossierContentIterator.setDossierTypes ( List< String >  dossierTypes)

Definition at line 104 of file DossierContentIterator.java.

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

◆ setIssuePath()

void org.turro.dossier.content.DossierContentIterator.setIssuePath ( String  issuePath)

Definition at line 136 of file DossierContentIterator.java.

136  {
137  this.issuePath = issuePath;
138  }

◆ setPendingWorths()

void org.turro.dossier.content.DossierContentIterator.setPendingWorths ( String  pendingWorths)

Definition at line 164 of file DossierContentIterator.java.

164  {
165  this.pendingWorths = pendingWorths;
166  }

◆ setPhaseFilter()

void org.turro.dossier.content.DossierContentIterator.setPhaseFilter ( PhaseHtmlFilter  phaseFilter)

Definition at line 144 of file DossierContentIterator.java.

144  {
145  this.phaseFilter = phaseFilter;
146  }

◆ setProjectPhases()

void org.turro.dossier.content.DossierContentIterator.setProjectPhases ( List< String >  projectPhases)

Definition at line 116 of file DossierContentIterator.java.

116  {
117  this.projectPhases = projectPhases;
118  }

◆ setRelated()

void org.turro.dossier.content.DossierContentIterator.setRelated ( Collection< IContact related)

Definition at line 156 of file DossierContentIterator.java.

156  {
157  this.related = related;
158  }
Here is the caller graph for this function:

◆ setShowSubject()

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

Definition at line 124 of file DossierContentIterator.java.

124  {
125  this.showSubject = showSubject;
126  }

◆ title()

String org.turro.dossier.content.DossierContentIterator.title ( Dossier  e)
protected

Definition at line 429 of file DossierContentIterator.java.

429  {
430  if(!Strings.isBlank(e.getFullDescription(showSubject))) {
431  return e.getFullDescription(showSubject);
432  }
433  return null;
434  }
Here is the call graph for this function:

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