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

Public Member Functions

 IssueContentIterator (IConstructor constructor, Writer writer, IContact contact, boolean mail, String pubPath)
 
void setCategoryId (long categoryId)
 
void setDossierId (long dossierId)
 
void setDossierStatus (List< String > dossierStatus)
 
void setIssueTypes (List< String > issueTypes)
 
void setIssueStatus (List< String > issueStatus)
 
boolean isShowSubject ()
 
void setShowSubject (boolean showSubject)
 
IssueOrdering getOrderBy ()
 
void setOrderBy (IssueOrdering orderBy)
 
- 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, Issue e, int page)
 
void renderItem (ElephantMarker marker, Issue e, int page)
 
String entityRoot ()
 
Issue entity (Long value)
 
boolean isValid (Issue e)
 
String title (Issue e)
 
Collection< String > metas (Issue e)
 
String getTemplateRoot ()
 
Object doVotesCtrl (Issue e)
 
Object doInterestCtrl (Issue e)
 
Object doCommentsCtrl (Issue e)
 
Object doAttachmentsCtrl (Issue e)
 
Object doFilesCtrl (Issue e)
 
Object doDescriptionsCtrl (Issue e)
 
Object doPollsCtrl (Issue e)
 
String getItemLink (Issue e)
 
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 >
VisualElements loadVisuals ()
 
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)
 
ID getIdentifier ()
 
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 57 of file IssueContentIterator.java.

Constructor & Destructor Documentation

◆ IssueContentIterator()

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

Definition at line 64 of file IssueContentIterator.java.

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

Member Function Documentation

◆ doAttachmentsCtrl()

Object org.turro.dossier.content.IssueContentIterator.doAttachmentsCtrl ( Issue  e)
protected

Definition at line 330 of file IssueContentIterator.java.

330  {
331  return Entities.getController(e).configureCtrl(
332  new AttachCtrl(constructor), getContact());
333  }
Here is the call graph for this function:

◆ doCommentsCtrl()

Object org.turro.dossier.content.IssueContentIterator.doCommentsCtrl ( Issue  e)
protected

Definition at line 324 of file IssueContentIterator.java.

324  {
325  return Entities.getController(e).configureCtrl(
326  new CommentItCtrl(constructor), getContact());
327  }
Here is the call graph for this function:

◆ doDescriptionsCtrl()

Object org.turro.dossier.content.IssueContentIterator.doDescriptionsCtrl ( Issue  e)
protected

Definition at line 342 of file IssueContentIterator.java.

342  {
343  return Entities.getController(e).configureCtrl(
344  new DescribeItCtrl(constructor), getContact());
345  }
Here is the call graph for this function:

◆ doFilesCtrl()

Object org.turro.dossier.content.IssueContentIterator.doFilesCtrl ( Issue  e)
protected

Definition at line 336 of file IssueContentIterator.java.

336  {
337  return Entities.getController(e).configureCtrl(
338  new FileAttach(DossierPU.getObjectPath(e)), getContact());
339  }
Here is the call graph for this function:

◆ doInterestCtrl()

Object org.turro.dossier.content.IssueContentIterator.doInterestCtrl ( Issue  e)
protected

Definition at line 318 of file IssueContentIterator.java.

318  {
319  return Entities.getController(e).configureCtrl(
320  new StarItCtrl(constructor), getContact());
321  }
Here is the call graph for this function:

◆ doPollsCtrl()

Object org.turro.dossier.content.IssueContentIterator.doPollsCtrl ( Issue  e)
protected

Definition at line 348 of file IssueContentIterator.java.

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

◆ doVotesCtrl()

Object org.turro.dossier.content.IssueContentIterator.doVotesCtrl ( Issue  e)
protected

Definition at line 312 of file IssueContentIterator.java.

312  {
313  return Entities.getController(e).configureCtrl(
314  new VoteItCtrl(constructor), getContact());
315  }
Here is the call graph for this function:

◆ entity()

Issue org.turro.dossier.content.IssueContentIterator.entity ( Long  value)
protected

Definition at line 152 of file IssueContentIterator.java.

152  {
153  WhereClause wc = new WhereClause();
154  wc.addClause("select distinct i from Issue as i");
155  wc.addClause("join i.participants as p");
156  addCriteria(wc);
157  wc.addClause("and i.id = :id");
158  wc.addNamedValue("id", value);
159  return (Issue) dao.getSingleResultOrNull(wc);
160  }
Object getSingleResultOrNull(SqlClause sc)
Definition: Dao.java:419
Here is the call graph for this function:

◆ entityRoot()

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

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

Definition at line 147 of file IssueContentIterator.java.

147  {
148  return "issue";
149  }

◆ getCountClause()

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

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

Definition at line 116 of file IssueContentIterator.java.

116  {
117  WhereClause wc = new WhereClause();
118  wc.addClause("select count(distinct i) from Issue as i");
119  wc.addClause("join i.participants as p");
120  addCriteria(wc);
121  return wc;
122  }
Here is the call graph for this function:

◆ getItemLink()

String org.turro.dossier.content.IssueContentIterator.getItemLink ( Issue  e)
protected

Definition at line 353 of file IssueContentIterator.java.

353  {
354  return doItemLink(e, e.getId(), true);
355  }
String doItemLink(E entity, ID id, boolean obfuscated)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getOrderBy()

IssueOrdering org.turro.dossier.content.IssueContentIterator.getOrderBy ( )

Definition at line 97 of file IssueContentIterator.java.

97  {
98  return orderBy;
99  }

◆ getReadAllLink()

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

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

Definition at line 358 of file IssueContentIterator.java.

358  {
359  String path = getContextPath();
360  if(Strings.isBlank(path)) {
361  return getRestrictedLink();
362  }
363  return path;
364  }
Here is the call graph for this function:

◆ getRestrictedLink()

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

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

Definition at line 367 of file IssueContentIterator.java.

367  {
368  return "/user/myissues";
369  }
Here is the caller graph for this function:

◆ getTemplateRoot()

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

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

Definition at line 307 of file IssueContentIterator.java.

307  {
308  return isMail() ? "content/newsletter/sections/issues" : "issue";
309  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getWhereClause()

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

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

Definition at line 106 of file IssueContentIterator.java.

106  {
107  WhereClause wc = new WhereClause();
108  wc.addClause("select distinct i from Issue as i");
109  wc.addClause("join i.participants as p");
110  addCriteria(wc);
111  wc.addClause(IssueOrdering.ORDER_BY_ACTIVITY.getOrderBy());
112  return wc;
113  }
Here is the call graph for this function:

◆ isShowSubject()

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

Definition at line 89 of file IssueContentIterator.java.

89  {
90  return showSubject;
91  }

◆ isValid()

boolean org.turro.dossier.content.IssueContentIterator.isValid ( Issue  e)
protected

Definition at line 214 of file IssueContentIterator.java.

214  {
215  if(isRestricted() && e != null) {
216  return all || new IssueWrapper(e).isFullParticipant();
217  } else {
218  return super.isValid(e);
219  }
220  }
Here is the call graph for this function:

◆ metas()

Collection<String> org.turro.dossier.content.IssueContentIterator.metas ( Issue  e)
protected

Definition at line 293 of file IssueContentIterator.java.

293  {
294  ArrayList<RepositoryFile> files = new ArrayList<>();
295  String path = getItemLink(e);
296  if(!SocialImageMap.hasImage(path)) {
297  FileAttach fa = new FileAttach(DossierPU.getObjectPath(e));
298  Repository repository = fa.getPublishableRepository(constructor);
299  files.addAll(repository.getRepositoryFiles("*_social.png,*_social.jpg"));
300  files.addAll(repository.getRepositoryFiles("*.png,*.jpg"));
301  }
302  SocialNet sn = new SocialNet(path, e.getDescription(), e.getFullDescription(), files);
303  return sn.getMetas();
304  }
Here is the call graph for this function:

◆ renderItem()

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

Definition at line 139 of file IssueContentIterator.java.

139  {
140  marker.put("issue", e);
141  prepareValues(e, page);
142  marker.put("restricted", isRestricted());
144  }
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.IssueContentIterator.renderSummary ( ElephantMarker  marker,
Issue  e,
int  page 
)
protected

Definition at line 125 of file IssueContentIterator.java.

125  {
126  if(e != null) {
127  marker.put("issue", e);
128  marker.put("newCategory", e.getDossier().getCategory().getId() != lastCategoryId);
129  marker.put("newDossier", e.getDossier().getId() != lastDosierId);
130  lastCategoryId = e.getDossier().getCategory().getId();
131  lastDosierId = e.getDossier().getId();
132  prepareValues(e, page);
133  marker.put("restricted", isRestricted());
134  }
136  }
Here is the call graph for this function:

◆ setCategoryId()

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

Definition at line 69 of file IssueContentIterator.java.

69  {
70  this.categoryId = categoryId;
71  }
Here is the caller graph for this function:

◆ setDossierId()

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

Definition at line 73 of file IssueContentIterator.java.

73  {
74  this.dossierId = dossierId;
75  }
Here is the caller graph for this function:

◆ setDossierStatus()

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

Definition at line 77 of file IssueContentIterator.java.

77  {
78  this.dossierStatus = dossierStatus;
79  }

◆ setIssueStatus()

void org.turro.dossier.content.IssueContentIterator.setIssueStatus ( List< String >  issueStatus)

Definition at line 85 of file IssueContentIterator.java.

85  {
86  this.issueStatus = issueStatus;
87  }
Here is the caller graph for this function:

◆ setIssueTypes()

void org.turro.dossier.content.IssueContentIterator.setIssueTypes ( List< String >  issueTypes)

Definition at line 81 of file IssueContentIterator.java.

81  {
82  this.issueTypes = issueTypes;
83  }

◆ setOrderBy()

void org.turro.dossier.content.IssueContentIterator.setOrderBy ( IssueOrdering  orderBy)

Definition at line 101 of file IssueContentIterator.java.

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

◆ setShowSubject()

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

Definition at line 93 of file IssueContentIterator.java.

93  {
94  this.showSubject = showSubject;
95  }

◆ title()

String org.turro.dossier.content.IssueContentIterator.title ( Issue  e)
protected

Definition at line 285 of file IssueContentIterator.java.

285  {
286  if(!Strings.isBlank(e.getFullDescription(showSubject))) {
287  return e.getFullDescription(showSubject);
288  }
289  return null;
290  }
Here is the call graph for this function:

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