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

Public Member Functions

 ProductContentIterator (IConstructor constructor, Writer writer, IContact contact, boolean mail, String pubPath)
 
boolean isExact ()
 
void setExact (boolean exact)
 
void setAllowGroups (boolean allowGroups)
 
boolean isOnlyPromoted ()
 
void setOnlyPromoted (boolean onlyPromoted)
 
boolean isPublishable ()
 
void setPublishable (boolean publishable)
 
boolean isFullSearch ()
 
void setFullSearch (boolean fullSearch)
 
- 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, Product e, int page)
 
void renderItem (ElephantMarker marker, Product e, int page)
 
String entityRoot ()
 
Product entity (Long value)
 
boolean isValid (Product e)
 
String title (Product e)
 
Collection< String > metas (Product e)
 
String getTemplateRoot ()
 
Object doVotesCtrl (Product e)
 
Object doInterestCtrl (Product e)
 
Object doCommentsCtrl (Product e)
 
Object doAttachmentsCtrl (Product e)
 
Object doFilesCtrl (Product e)
 
Object doDescriptionsCtrl (Product e)
 
Object doPollsCtrl (Product e)
 
String getItemLink (Product 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 59 of file ProductContentIterator.java.

Constructor & Destructor Documentation

◆ ProductContentIterator()

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

Definition at line 63 of file ProductContentIterator.java.

63  {
64  super(new FinancialsPU(), constructor, writer, contact, mail, pubPath);
65  }

Member Function Documentation

◆ doAttachmentsCtrl()

Object org.turro.financials.content.ProductContentIterator.doAttachmentsCtrl ( Product  e)
protected

Definition at line 286 of file ProductContentIterator.java.

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

◆ doCommentsCtrl()

Object org.turro.financials.content.ProductContentIterator.doCommentsCtrl ( Product  e)
protected

Definition at line 280 of file ProductContentIterator.java.

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

◆ doDescriptionsCtrl()

Object org.turro.financials.content.ProductContentIterator.doDescriptionsCtrl ( Product  e)
protected

Definition at line 298 of file ProductContentIterator.java.

298  {
299  return Entities.getController(e).configureCtrl(
300  new DescribeItCtrl(constructor), getContact());
301  }
Here is the call graph for this function:

◆ doFilesCtrl()

Object org.turro.financials.content.ProductContentIterator.doFilesCtrl ( Product  e)
protected

Definition at line 292 of file ProductContentIterator.java.

292  {
293  return Entities.getController(e).configureCtrl(
294  new FileAttach(FinancialsPU.getObjectPath(e)), getContact());
295  }
Here is the call graph for this function:

◆ doInterestCtrl()

Object org.turro.financials.content.ProductContentIterator.doInterestCtrl ( Product  e)
protected

Definition at line 274 of file ProductContentIterator.java.

274  {
275  return Entities.getController(e).configureCtrl(
276  new StarItCtrl(constructor), getContact());
277  }
Here is the call graph for this function:

◆ doPollsCtrl()

Object org.turro.financials.content.ProductContentIterator.doPollsCtrl ( Product  e)
protected

Definition at line 304 of file ProductContentIterator.java.

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

◆ doVotesCtrl()

Object org.turro.financials.content.ProductContentIterator.doVotesCtrl ( Product  e)
protected

Definition at line 268 of file ProductContentIterator.java.

268  {
269  return Entities.getController(e).configureCtrl(
270  new VoteItCtrl(constructor), getContact());
271  }
Here is the call graph for this function:

◆ entity()

Product org.turro.financials.content.ProductContentIterator.entity ( Long  value)
protected

Definition at line 143 of file ProductContentIterator.java.

143  {
144  return dao.find(Product.class, value);
145  }

◆ entityRoot()

String org.turro.financials.content.ProductContentIterator.entityRoot ( )
protected

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

Definition at line 138 of file ProductContentIterator.java.

138  {
139  return "product";
140  }

◆ getCountClause()

WhereClause org.turro.financials.content.ProductContentIterator.getCountClause ( )
protected

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

Definition at line 114 of file ProductContentIterator.java.

114  {
115  WhereClause wc = new WhereClause();
116  wc.addClause("select count({distinct p}) from Product as p");
117  addCriteria(wc);
118  return wc;
119  }
Here is the call graph for this function:

◆ getItemLink()

String org.turro.financials.content.ProductContentIterator.getItemLink ( Product  e)
protected

Definition at line 310 of file ProductContentIterator.java.

310  {
311  return doItemLink(e, e.getId(), true);
312  }
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.financials.content.ProductContentIterator.getReadAllLink ( )
protected

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

Definition at line 315 of file ProductContentIterator.java.

315  {
316  String path = getContextPath();
317  if(Strings.isBlank(path)) {
318  return getRestrictedLink();
319  }
320  return path;
321  }
Here is the call graph for this function:

◆ getRestrictedLink()

String org.turro.financials.content.ProductContentIterator.getRestrictedLink ( )
protected

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

Definition at line 324 of file ProductContentIterator.java.

324  {
325  return "/user/products";
326  }
Here is the caller graph for this function:

◆ getTemplateRoot()

String org.turro.financials.content.ProductContentIterator.getTemplateRoot ( )
protected

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

Definition at line 263 of file ProductContentIterator.java.

263  {
264  return isMail() ? "content/newsletter/sections/products" : "product";
265  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getWhereClause()

WhereClause org.turro.financials.content.ProductContentIterator.getWhereClause ( )
protected

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

Definition at line 104 of file ProductContentIterator.java.

104  {
105  WhereClause wc = new WhereClause();
106  wc.addClause("select distinct {p} from Product as p");
107  addCriteria(wc);
108  if(!wc.isUseNative()) wc.addClause("order by p.description");
109  wc.setResultClass(Product.class);
110  return wc;
111  }
Here is the call graph for this function:

◆ isExact()

boolean org.turro.financials.content.ProductContentIterator.isExact ( )

Definition at line 67 of file ProductContentIterator.java.

67  {
68  return exact;
69  }

◆ isFullSearch()

boolean org.turro.financials.content.ProductContentIterator.isFullSearch ( )

Definition at line 95 of file ProductContentIterator.java.

95  {
96  return fullSearch;
97  }

◆ isOnlyPromoted()

boolean org.turro.financials.content.ProductContentIterator.isOnlyPromoted ( )

Definition at line 79 of file ProductContentIterator.java.

79  {
80  return onlyPromoted;
81  }

◆ isPublishable()

boolean org.turro.financials.content.ProductContentIterator.isPublishable ( )

Definition at line 87 of file ProductContentIterator.java.

87  {
88  return publishable;
89  }

◆ isValid()

boolean org.turro.financials.content.ProductContentIterator.isValid ( Product  e)
protected

Definition at line 148 of file ProductContentIterator.java.

148  {
149  return super.isValid(e);
150  }

◆ metas()

Collection<String> org.turro.financials.content.ProductContentIterator.metas ( Product  e)
protected

Definition at line 247 of file ProductContentIterator.java.

247  {
248  ArrayList<RepositoryFile> files = new ArrayList<>();
249  String path = getItemLink(e);
250  if(!SocialImageMap.hasImage(path)) {
251  FileAttach fa = new FileAttach(FinancialsPU.getObjectPath(e));
252  Repository repository = fa.getPublishableRepository(constructor);
253  files.addAll(repository.getRepositoryFiles("*_social.png,*_social.jpg"));
254  files.addAll(repository.getRepositoryFiles("*.png,*.jpg"));
255  }
256  String desc = DescribeItUtil.descriptionString(DescribeItUtil.DEFAULT_ID, FinancialsPU.getObjectPath(e));
257  if(desc == null) desc = e.getKeywords();
258  SocialNet sn = new SocialNet(path, e.getDescription(), desc, files);
259  return sn.getMetas();
260  }
Here is the call graph for this function:

◆ renderItem()

void org.turro.financials.content.ProductContentIterator.renderItem ( ElephantMarker  marker,
Product  e,
int  page 
)
protected

Definition at line 131 of file ProductContentIterator.java.

131  {
132  marker.put("product", e);
133  prepareValues(e, page);
135  }
void process(String rootTmpl, String tmpl)
Object put(Object key, Object value)
Here is the call graph for this function:

◆ renderSummary()

void org.turro.financials.content.ProductContentIterator.renderSummary ( ElephantMarker  marker,
Product  e,
int  page 
)
protected

Definition at line 122 of file ProductContentIterator.java.

122  {
123  if(e != null) {
124  marker.put("product", e);
125  prepareValues(e, page);
126  }
128  }
Here is the call graph for this function:

◆ setAllowGroups()

void org.turro.financials.content.ProductContentIterator.setAllowGroups ( boolean  allowGroups)

Definition at line 75 of file ProductContentIterator.java.

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

◆ setExact()

void org.turro.financials.content.ProductContentIterator.setExact ( boolean  exact)

Definition at line 71 of file ProductContentIterator.java.

71  {
72  this.exact = exact;
73  }

◆ setFullSearch()

void org.turro.financials.content.ProductContentIterator.setFullSearch ( boolean  fullSearch)

Definition at line 99 of file ProductContentIterator.java.

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

◆ setOnlyPromoted()

void org.turro.financials.content.ProductContentIterator.setOnlyPromoted ( boolean  onlyPromoted)

Definition at line 83 of file ProductContentIterator.java.

83  {
84  this.onlyPromoted = onlyPromoted;
85  }
Here is the caller graph for this function:

◆ setPublishable()

void org.turro.financials.content.ProductContentIterator.setPublishable ( boolean  publishable)

Definition at line 91 of file ProductContentIterator.java.

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

◆ title()

String org.turro.financials.content.ProductContentIterator.title ( Product  e)
protected

Definition at line 242 of file ProductContentIterator.java.

242  {
243  return e.getDescription();
244  }
Here is the call graph for this function:

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