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

Public Member Functions

 PublicationContentIterator (IConstructor constructor, Writer writer, IContact contact, boolean mail, String pubPath)
 
void setContactId (String contactId)
 
void setGroupId (long groupId)
 
void setCategoryId (long categoryId)
 
void setLang (String lang)
 
CategoryFilter getCategoryFilter ()
 
void setCategoryFilter (CategoryFilter categoryFilter)
 
boolean isBlogger ()
 
void setBlogger (boolean blogger)
 
boolean isNotSent ()
 
void setNotSent (boolean notSent)
 
boolean isFuture ()
 
void setFuture (boolean future)
 
boolean isAnyBlogger ()
 
- 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

String title (Publication e)
 
Collection< String > metas (Publication e)
 
WhereClause getWhereClause ()
 
WhereClause getCountClause ()
 
void renderSummary (ElephantMarker marker, Publication e, int page)
 
void renderItem (ElephantMarker marker, Publication e, int page)
 
String entityRoot ()
 
Publication entity (Long value)
 
Long getIdentifier ()
 
String getTemplateRoot ()
 
Object doVotesCtrl (Publication e)
 
Object doInterestCtrl (Publication e)
 
Object doCommentsCtrl (Publication e)
 
Object doAttachmentsCtrl (Publication e)
 
Object doFilesCtrl (Publication e)
 
Object doDescriptionsCtrl (Publication e)
 
Object doPollsCtrl (Publication e)
 
String getItemLink (Publication 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)
 
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 51 of file PublicationContentIterator.java.

Constructor & Destructor Documentation

◆ PublicationContentIterator()

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

Definition at line 58 of file PublicationContentIterator.java.

58  {
59  super(new PublicationPU(), constructor, writer, contact, mail, pubPath);
60  }

Member Function Documentation

◆ doAttachmentsCtrl()

Object org.turro.publication.content.PublicationContentIterator.doAttachmentsCtrl ( Publication  e)
protected

Definition at line 290 of file PublicationContentIterator.java.

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

◆ doCommentsCtrl()

Object org.turro.publication.content.PublicationContentIterator.doCommentsCtrl ( Publication  e)
protected

Definition at line 284 of file PublicationContentIterator.java.

284  {
285  return Entities.getController(e).configureCtrl(
286  new CommentItCtrl(constructor), getContact());
287  }
Here is the call graph for this function:

◆ doDescriptionsCtrl()

Object org.turro.publication.content.PublicationContentIterator.doDescriptionsCtrl ( Publication  e)
protected

Definition at line 301 of file PublicationContentIterator.java.

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

◆ doFilesCtrl()

Object org.turro.publication.content.PublicationContentIterator.doFilesCtrl ( Publication  e)
protected

Definition at line 295 of file PublicationContentIterator.java.

295  {
296  return Entities.getController(e).configureCtrl(
297  new FileAttach(PublicationPU.getObjectPath(e)), getContact());
298  }
Here is the call graph for this function:

◆ doInterestCtrl()

Object org.turro.publication.content.PublicationContentIterator.doInterestCtrl ( Publication  e)
protected

Definition at line 278 of file PublicationContentIterator.java.

278  {
279  return Entities.getController(e).configureCtrl(
280  new StarItCtrl(constructor), getContact());
281  }
Here is the call graph for this function:

◆ doPollsCtrl()

Object org.turro.publication.content.PublicationContentIterator.doPollsCtrl ( Publication  e)
protected

Definition at line 306 of file PublicationContentIterator.java.

306  {
307  return Entities.getController(e).configureCtrl(
308  new PollsCtrl(constructor), getContact());
309  }
Here is the call graph for this function:

◆ doVotesCtrl()

Object org.turro.publication.content.PublicationContentIterator.doVotesCtrl ( Publication  e)
protected

Definition at line 273 of file PublicationContentIterator.java.

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

◆ entity()

Publication org.turro.publication.content.PublicationContentIterator.entity ( Long  value)
protected

Definition at line 172 of file PublicationContentIterator.java.

172  {
173  return dao.find(Publication.class, value);
174  }

◆ entityRoot()

String org.turro.publication.content.PublicationContentIterator.entityRoot ( )
protected

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

Definition at line 167 of file PublicationContentIterator.java.

167  {
168  return "publication";
169  }

◆ getCategoryFilter()

CategoryFilter org.turro.publication.content.PublicationContentIterator.getCategoryFilter ( )

Definition at line 78 of file PublicationContentIterator.java.

78  {
79  return categoryFilter;
80  }

◆ getCountClause()

WhereClause org.turro.publication.content.PublicationContentIterator.getCountClause ( )
protected

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

Definition at line 140 of file PublicationContentIterator.java.

140  {
141  WhereClause wc = new WhereClause();
142  wc.addClause("select count(p) from Publication as p");
143  addCriteria(wc);
144  return wc;
145  }
Here is the call graph for this function:

◆ getIdentifier()

Long org.turro.publication.content.PublicationContentIterator.getIdentifier ( )
protected

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

Definition at line 177 of file PublicationContentIterator.java.

177  {
178  Long identifier = getIDFromURL("/publication");
179  if(identifier == null) {
180  identifier = super.getIdentifier();
181  }
182  return identifier;
183  }
Here is the call graph for this function:

◆ getItemLink()

String org.turro.publication.content.PublicationContentIterator.getItemLink ( Publication  e)
protected

Definition at line 312 of file PublicationContentIterator.java.

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

◆ getReadAllLink()

String org.turro.publication.content.PublicationContentIterator.getReadAllLink ( )
protected

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

Definition at line 317 of file PublicationContentIterator.java.

317  {
318  String path = getContextPath();
319  if(Strings.isBlank(path)) {
320  path = ElephantContext.getEntityWebContext("/publication");
321  }
322  return path;
323  }
Here is the call graph for this function:

◆ getRestrictedLink()

String org.turro.publication.content.PublicationContentIterator.getRestrictedLink ( )
protected

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

Definition at line 326 of file PublicationContentIterator.java.

326  {
327  return null;
328  }

◆ getTemplateRoot()

String org.turro.publication.content.PublicationContentIterator.getTemplateRoot ( )
protected

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

Definition at line 268 of file PublicationContentIterator.java.

268  {
269  return isMail() ? "content/newsletter/sections/publications" : "publication";
270  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getWhereClause()

WhereClause org.turro.publication.content.PublicationContentIterator.getWhereClause ( )
protected

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

Definition at line 131 of file PublicationContentIterator.java.

131  {
132  WhereClause wc = new WhereClause();
133  wc.addClause("select distinct p from Publication as p");
134  addCriteria(wc);
135  wc.addClause("order by p.date desc");
136  return wc;
137  }
Here is the call graph for this function:

◆ isAnyBlogger()

boolean org.turro.publication.content.PublicationContentIterator.isAnyBlogger ( )

Definition at line 147 of file PublicationContentIterator.java.

147  {
148  return PublicationCategory.isAnyBlogger(getContact());
149  }
Here is the call graph for this function:

◆ isBlogger()

boolean org.turro.publication.content.PublicationContentIterator.isBlogger ( )

Definition at line 86 of file PublicationContentIterator.java.

86  {
87  return blogger;
88  }

◆ isFuture()

boolean org.turro.publication.content.PublicationContentIterator.isFuture ( )

Definition at line 102 of file PublicationContentIterator.java.

102  {
103  return future;
104  }

◆ isNotSent()

boolean org.turro.publication.content.PublicationContentIterator.isNotSent ( )

Definition at line 94 of file PublicationContentIterator.java.

94  {
95  return notSent;
96  }

◆ metas()

Collection<String> org.turro.publication.content.PublicationContentIterator.metas ( Publication  e)
protected

Definition at line 116 of file PublicationContentIterator.java.

116  {
117  ArrayList<RepositoryFile> files = new ArrayList<>();
118  String path = getItemLink(e);
119  if(!SocialImageMap.hasImage(path)) {
120  FileAttach fa = new FileAttach(PublicationPU.getObjectPath(e));
121  files.addAll(fa.getPublishableRepository(constructor).getRepositoryFiles("/topmost", "*.png,*.jpg"));
122  files.addAll(fa.getPublishableRepository(constructor).getRepositoryFiles("/priorized", "*.png,*.jpg"));
123  files.addAll(fa.getPublishableRepository(constructor).getRepositoryFiles("/included", "*.png,*.jpg"));
124  files.addAll(fa.getPublishableRepository(constructor).getRepositoryFiles("/", "*.png,*.jpg"));
125  }
126  SocialNet sn = new SocialNet(path, e.getTitle(), e.getSummary(), files);
127  return sn.getMetas();
128  }
Here is the call graph for this function:

◆ renderItem()

void org.turro.publication.content.PublicationContentIterator.renderItem ( ElephantMarker  marker,
Publication  e,
int  page 
)
protected

Definition at line 160 of file PublicationContentIterator.java.

Here is the call graph for this function:

◆ renderSummary()

void org.turro.publication.content.PublicationContentIterator.renderSummary ( ElephantMarker  marker,
Publication  e,
int  page 
)
protected

Definition at line 152 of file PublicationContentIterator.java.

152  {
153  if(e != null) {
154  prepareValues(e, page);
155  }
157  }
Here is the call graph for this function:

◆ setBlogger()

void org.turro.publication.content.PublicationContentIterator.setBlogger ( boolean  blogger)

Definition at line 90 of file PublicationContentIterator.java.

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

◆ setCategoryFilter()

void org.turro.publication.content.PublicationContentIterator.setCategoryFilter ( CategoryFilter  categoryFilter)

Definition at line 82 of file PublicationContentIterator.java.

82  {
83  this.categoryFilter = categoryFilter;
84  }

◆ setCategoryId()

void org.turro.publication.content.PublicationContentIterator.setCategoryId ( long  categoryId)

Definition at line 70 of file PublicationContentIterator.java.

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

◆ setContactId()

void org.turro.publication.content.PublicationContentIterator.setContactId ( String  contactId)

Definition at line 62 of file PublicationContentIterator.java.

62  {
63  this.contactId = contactId;
64  }

◆ setFuture()

void org.turro.publication.content.PublicationContentIterator.setFuture ( boolean  future)

Definition at line 106 of file PublicationContentIterator.java.

106  {
107  this.future = future;
108  }
Here is the caller graph for this function:

◆ setGroupId()

void org.turro.publication.content.PublicationContentIterator.setGroupId ( long  groupId)

Definition at line 66 of file PublicationContentIterator.java.

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

◆ setLang()

void org.turro.publication.content.PublicationContentIterator.setLang ( String  lang)

Definition at line 74 of file PublicationContentIterator.java.

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

◆ setNotSent()

void org.turro.publication.content.PublicationContentIterator.setNotSent ( boolean  notSent)

Definition at line 98 of file PublicationContentIterator.java.

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

◆ title()

String org.turro.publication.content.PublicationContentIterator.title ( Publication  e)
protected

Definition at line 111 of file PublicationContentIterator.java.

111  {
112  return e.getTitle();
113  }
Here is the call graph for this function:

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