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

Public Member Functions

 ContractContentIterator (IConstructor constructor, Writer writer, IContact contact, boolean mail, String pubPath)
 
int getType ()
 
void setType (int type)
 
boolean isCheckParticipation ()
 
void setCheckParticipation (boolean checkParticipation)
 
int getStatus ()
 
void setStatus (int status)
 
int count ()
 
Collection< Contractitems ()
 
Object getPortfolioCtrl (Contract e)
 
- 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, Contract e, int page)
 
void renderItem (ElephantMarker marker, Contract e, int page)
 
String entityRoot ()
 
Contract entity (Long value)
 
boolean isValid (Contract e)
 
String title (Contract e)
 
Collection< String > metas (Contract e)
 
String getTemplateRoot ()
 
Object doVotesCtrl (Contract e)
 
Object doInterestCtrl (Contract e)
 
Object doCommentsCtrl (Contract e)
 
Object doAttachmentsCtrl (Contract e)
 
Object doFilesCtrl (Contract e)
 
Object doDescriptionsCtrl (Contract e)
 
Object doPollsCtrl (Contract e)
 
String getItemLink (Contract 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 >
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 52 of file ContractContentIterator.java.

Constructor & Destructor Documentation

◆ ContractContentIterator()

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

Definition at line 57 of file ContractContentIterator.java.

57  {
58  super(new FinancialsPU(), constructor, writer, contact, mail, pubPath);
59  this.checkParticipation = true;
60  }

Member Function Documentation

◆ count()

int org.turro.financials.content.ContractContentIterator.count ( )

Definition at line 86 of file ContractContentIterator.java.

86  {
87  return getTotalCount();
88  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ doAttachmentsCtrl()

Object org.turro.financials.content.ContractContentIterator.doAttachmentsCtrl ( Contract  e)
protected

Definition at line 234 of file ContractContentIterator.java.

234  {
235  return Entities.getController(e).configureCtrl(
236  new AttachCtrl(constructor), getContact());
237  }
Here is the call graph for this function:

◆ doCommentsCtrl()

Object org.turro.financials.content.ContractContentIterator.doCommentsCtrl ( Contract  e)
protected

Definition at line 228 of file ContractContentIterator.java.

228  {
229  return Entities.getController(e).configureCtrl(
230  new CommentItCtrl(constructor), getContact());
231  }
Here is the call graph for this function:

◆ doDescriptionsCtrl()

Object org.turro.financials.content.ContractContentIterator.doDescriptionsCtrl ( Contract  e)
protected

Definition at line 246 of file ContractContentIterator.java.

246  {
247  return Entities.getController(e).configureCtrl(
248  new DescribeItCtrl(constructor), getContact());
249  }
Here is the call graph for this function:

◆ doFilesCtrl()

Object org.turro.financials.content.ContractContentIterator.doFilesCtrl ( Contract  e)
protected

Definition at line 240 of file ContractContentIterator.java.

240  {
241  return Entities.getController(e).configureCtrl(
242  new FileAttach(FinancialsPU.getObjectPath(e)), getContact());
243  }
Here is the call graph for this function:

◆ doInterestCtrl()

Object org.turro.financials.content.ContractContentIterator.doInterestCtrl ( Contract  e)
protected

Definition at line 223 of file ContractContentIterator.java.

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

◆ doPollsCtrl()

Object org.turro.financials.content.ContractContentIterator.doPollsCtrl ( Contract  e)
protected

Definition at line 252 of file ContractContentIterator.java.

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

◆ doVotesCtrl()

Object org.turro.financials.content.ContractContentIterator.doVotesCtrl ( Contract  e)
protected

Definition at line 218 of file ContractContentIterator.java.

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

◆ entity()

Contract org.turro.financials.content.ContractContentIterator.entity ( Long  value)
protected

Definition at line 139 of file ContractContentIterator.java.

139  {
140  return dao.find(Contract.class, value);
141  }

◆ entityRoot()

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

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

Definition at line 134 of file ContractContentIterator.java.

134  {
135  return "contract";
136  }

◆ getCountClause()

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

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

Definition at line 107 of file ContractContentIterator.java.

107  {
108  WhereClause wc = new WhereClause();
109  wc.addClause("select count(distinct ctc) from Contract ctc");
110  if(checkParticipation) {
111  wc.addClause("left join ctc.participants par");
112  }
113  addCriteria(wc);
114  return wc;
115  }
Here is the call graph for this function:

◆ getItemLink()

String org.turro.financials.content.ContractContentIterator.getItemLink ( Contract  e)
protected

Definition at line 257 of file ContractContentIterator.java.

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

◆ getPortfolioCtrl()

Object org.turro.financials.content.ContractContentIterator.getPortfolioCtrl ( Contract  e)

Definition at line 277 of file ContractContentIterator.java.

277  {
278  return new ContractPortfolio(e);
279  }

◆ getReadAllLink()

String org.turro.financials.content.ContractContentIterator.getReadAllLink ( )
protected

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

Definition at line 262 of file ContractContentIterator.java.

262  {
263  String path = getContextPath();
264  if(Strings.isBlank(path)) {
265  return getRestrictedLink();
266  }
267  return path;
268  }
Here is the call graph for this function:

◆ getRestrictedLink()

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

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

Definition at line 271 of file ContractContentIterator.java.

271  {
272  return "/user/contracts";
273  }
Here is the caller graph for this function:

◆ getStatus()

int org.turro.financials.content.ContractContentIterator.getStatus ( )

Definition at line 78 of file ContractContentIterator.java.

78  {
79  return status;
80  }

◆ getTemplateRoot()

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

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

Definition at line 213 of file ContractContentIterator.java.

213  {
214  return isMail() ? "content/newsletter/sections/contracts" : "contract";
215  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getType()

int org.turro.financials.content.ContractContentIterator.getType ( )

Definition at line 62 of file ContractContentIterator.java.

62  {
63  return type;
64  }

◆ getWhereClause()

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

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

Definition at line 95 of file ContractContentIterator.java.

95  {
96  WhereClause wc = new WhereClause();
97  wc.addClause("select distinct ctc from Contract ctc");
98  if(checkParticipation) {
99  wc.addClause("left join ctc.participants par");
100  }
101  addCriteria(wc);
102  wc.addClause("order by ctc.name");
103  return wc;
104  }
Here is the call graph for this function:

◆ isCheckParticipation()

boolean org.turro.financials.content.ContractContentIterator.isCheckParticipation ( )

Definition at line 70 of file ContractContentIterator.java.

70  {
71  return checkParticipation;
72  }

◆ isValid()

boolean org.turro.financials.content.ContractContentIterator.isValid ( Contract  e)
protected

Definition at line 144 of file ContractContentIterator.java.

144  {
145  return super.isValid(e) && (!checkParticipation || e.getIParticipants().contains(getContact()));
146  }
Here is the call graph for this function:

◆ items()

Collection<Contract> org.turro.financials.content.ContractContentIterator.items ( )

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

Definition at line 90 of file ContractContentIterator.java.

90  {
91  return getTotalItems();
92  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ metas()

Collection<String> org.turro.financials.content.ContractContentIterator.metas ( Contract  e)
protected

Definition at line 199 of file ContractContentIterator.java.

199  {
200  ArrayList<RepositoryFile> files = new ArrayList<>();
201  String path = getItemLink(e);
202  if(!SocialImageMap.hasImage(path)) {
203  FileAttach fa = new FileAttach(FinancialsPU.getObjectPath(e));
204  Repository repository = fa.getPublishableRepository(constructor);
205  files.addAll(repository.getRepositoryFiles("*_social.png,*_social.jpg"));
206  files.addAll(repository.getRepositoryFiles("*.png,*.jpg"));
207  }
208  SocialNet sn = new SocialNet(path, e.getName(), e.getFullDescription(), files);
209  return sn.getMetas();
210  }
Here is the call graph for this function:

◆ renderItem()

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

Definition at line 127 of file ContractContentIterator.java.

127  {
128  marker.put("contract", e);
129  prepareValues(e, page);
131  }
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.ContractContentIterator.renderSummary ( ElephantMarker  marker,
Contract  e,
int  page 
)
protected

Definition at line 118 of file ContractContentIterator.java.

118  {
119  if(e != null) {
120  marker.put("contract", e);
121  prepareValues(e, page);
122  }
124  }
Here is the call graph for this function:

◆ setCheckParticipation()

void org.turro.financials.content.ContractContentIterator.setCheckParticipation ( boolean  checkParticipation)

Definition at line 74 of file ContractContentIterator.java.

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

◆ setStatus()

void org.turro.financials.content.ContractContentIterator.setStatus ( int  status)

Definition at line 82 of file ContractContentIterator.java.

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

◆ setType()

void org.turro.financials.content.ContractContentIterator.setType ( int  type)

Definition at line 66 of file ContractContentIterator.java.

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

◆ title()

String org.turro.financials.content.ContractContentIterator.title ( Contract  e)
protected

Definition at line 194 of file ContractContentIterator.java.

194  {
195  return e.getFullDescription();
196  }
Here is the call graph for this function:

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