BrightSide Workbench Full Report + Source Code
org.turro.financials.product.www.ProductIterator Class Reference
Inheritance diagram for org.turro.financials.product.www.ProductIterator:
Collaboration diagram for org.turro.financials.product.www.ProductIterator:

Public Member Functions

 ProductIterator (IConstructor constructor, String context, String uniqueId)
 
boolean isExact ()
 
void setExact (boolean exact)
 
void setAllowInterest (boolean allowInterest)
 
void setAllowComments (boolean allowComments)
 
void setAllowVotes (boolean allowVotes)
 
void setAllowGroups (boolean allowGroups)
 
boolean isShowAttachments ()
 
void setShowAttachments (boolean showAttachments)
 
boolean isShowDescriptions ()
 
void setShowDescriptions (boolean showDescriptions)
 
boolean isOnlyPromoted ()
 
void setOnlyPromoted (boolean onlyPromoted)
 
boolean isPublishable ()
 
void setPublishable (boolean publishable)
 
String getActualParameters ()
 
- 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 ()
 
boolean isAllowComments ()
 
boolean isAllowVotes ()
 
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)
 
String title (Product e)
 
Collection< String > metas (Product 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 ProductIterator.java.

Constructor & Destructor Documentation

◆ ProductIterator()

org.turro.financials.product.www.ProductIterator.ProductIterator ( IConstructor  constructor,
String  context,
String  uniqueId 
)

Definition at line 63 of file ProductIterator.java.

63  {
64  super(new FinancialsPU(), new ElephantMarker(constructor));
65  this.context = context;
66  this.uniqueId = uniqueId;
67  DaoHtmlSearch dhs = DaoHtmlSearch.getInstance(constructor, ElephantContext.getContextVariable(constructor));
68  if(dhs != null) {
69  setSearchEngine(dhs);
70  }
71  }
void setSearchEngine(DaoHtmlSearch searchEngine)
Here is the call graph for this function:

Member Function Documentation

◆ entity()

Product org.turro.financials.product.www.ProductIterator.entity ( Long  value)
protected

Definition at line 170 of file ProductIterator.java.

170  {
171  return dao.find(Product.class, value);
172  }

◆ entityRoot()

String org.turro.financials.product.www.ProductIterator.entityRoot ( )
protected

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

Definition at line 165 of file ProductIterator.java.

165  {
166  return "product";
167  }

◆ getActualParameters()

String org.turro.financials.product.www.ProductIterator.getActualParameters ( )

Definition at line 146 of file ProductIterator.java.

146  {
147  return Strings.isBlank(actualParameters) ? "?a=b" : actualParameters;
148  }

◆ getCountClause()

WhereClause org.turro.financials.product.www.ProductIterator.getCountClause ( )
protected

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

Definition at line 139 of file ProductIterator.java.

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

◆ getWhereClause()

WhereClause org.turro.financials.product.www.ProductIterator.getWhereClause ( )
protected

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

Definition at line 130 of file ProductIterator.java.

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

◆ isExact()

boolean org.turro.financials.product.www.ProductIterator.isExact ( )

Definition at line 73 of file ProductIterator.java.

73  {
74  return exact;
75  }

◆ isOnlyPromoted()

boolean org.turro.financials.product.www.ProductIterator.isOnlyPromoted ( )

Definition at line 113 of file ProductIterator.java.

113  {
114  return onlyPromoted;
115  }

◆ isPublishable()

boolean org.turro.financials.product.www.ProductIterator.isPublishable ( )

Definition at line 121 of file ProductIterator.java.

121  {
122  return publishable;
123  }

◆ isShowAttachments()

boolean org.turro.financials.product.www.ProductIterator.isShowAttachments ( )

Definition at line 97 of file ProductIterator.java.

97  {
98  return showAttachments;
99  }

◆ isShowDescriptions()

boolean org.turro.financials.product.www.ProductIterator.isShowDescriptions ( )

Definition at line 105 of file ProductIterator.java.

105  {
106  return showDescriptions;
107  }

◆ metas()

Collection<String> org.turro.financials.product.www.ProductIterator.metas ( Product  e)
protected

Definition at line 297 of file ProductIterator.java.

297  {
298  ArrayList<RepositoryFile> files = new ArrayList<>();
299  String path = getItemLink(e, 0);
300  if(!SocialImageMap.hasImage(path)) {
301  FileAttach fa = new FileAttach(FinancialsPU.getObjectPath(e));
302  Repository repository = fa.getPublishableRepository(constructor);
303  files.addAll(repository.getRepositoryFiles("*_social.png,*_social.jpg"));
304  files.addAll(repository.getRepositoryFiles("*.png,*.jpg"));
305  }
306  String desc = DescribeItUtil.descriptionString(DescribeItUtil.DEFAULT_ID, FinancialsPU.getObjectPath(e));
307  if(desc == null) desc = e.getKeywords();
308  SocialNet sn = new SocialNet(path, e.getDescription(), desc, files);
309  return sn.getMetas();
310  }
Here is the call graph for this function:

◆ renderItem()

void org.turro.financials.product.www.ProductIterator.renderItem ( ElephantMarker  marker,
Product  e,
int  page 
)
protected

Definition at line 158 of file ProductIterator.java.

158  {
159  prepareValues(e, page, false);
160  marker.process("product", getFullTemplate());
161  actualParameters = getPageLink(page);
162  }
void process(String rootTmpl, String tmpl)
Here is the call graph for this function:

◆ renderSummary()

void org.turro.financials.product.www.ProductIterator.renderSummary ( ElephantMarker  marker,
Product  e,
int  page 
)
protected

Definition at line 151 of file ProductIterator.java.

151  {
152  prepareValues(e, page, false);
153  marker.process("product", getSummaryTemplate());
154  actualParameters = getPageLink(page);
155  }
Here is the call graph for this function:

◆ setAllowComments()

void org.turro.financials.product.www.ProductIterator.setAllowComments ( boolean  allowComments)

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

Definition at line 85 of file ProductIterator.java.

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

◆ setAllowGroups()

void org.turro.financials.product.www.ProductIterator.setAllowGroups ( boolean  allowGroups)

Definition at line 93 of file ProductIterator.java.

93  {
94  this.allowGroups = allowGroups;
95  }
Here is the caller graph for this function:

◆ setAllowInterest()

void org.turro.financials.product.www.ProductIterator.setAllowInterest ( boolean  allowInterest)

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

Definition at line 81 of file ProductIterator.java.

81  {
82  this.allowInterest = allowInterest;
83  }
Here is the caller graph for this function:

◆ setAllowVotes()

void org.turro.financials.product.www.ProductIterator.setAllowVotes ( boolean  allowVotes)

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

Definition at line 89 of file ProductIterator.java.

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

◆ setExact()

void org.turro.financials.product.www.ProductIterator.setExact ( boolean  exact)

Definition at line 77 of file ProductIterator.java.

77  {
78  this.exact = exact;
79  }

◆ setOnlyPromoted()

void org.turro.financials.product.www.ProductIterator.setOnlyPromoted ( boolean  onlyPromoted)

Definition at line 117 of file ProductIterator.java.

117  {
118  this.onlyPromoted = onlyPromoted;
119  }
Here is the caller graph for this function:

◆ setPublishable()

void org.turro.financials.product.www.ProductIterator.setPublishable ( boolean  publishable)

Definition at line 125 of file ProductIterator.java.

125  {
126  this.publishable = publishable;
127  }
Here is the caller graph for this function:

◆ setShowAttachments()

void org.turro.financials.product.www.ProductIterator.setShowAttachments ( boolean  showAttachments)

Definition at line 101 of file ProductIterator.java.

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

◆ setShowDescriptions()

void org.turro.financials.product.www.ProductIterator.setShowDescriptions ( boolean  showDescriptions)

Definition at line 109 of file ProductIterator.java.

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

◆ title()

String org.turro.financials.product.www.ProductIterator.title ( Product  e)
protected

Definition at line 292 of file ProductIterator.java.

292  {
293  return e.getDescription();
294  }
Here is the call graph for this function:

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