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

Public Member Functions

 ContractIterator (IConstructor constructor, String pubPath)
 
boolean isPublicOnly ()
 
void setPublicOnly (boolean publicOnly)
 
int getType ()
 
void setType (int type)
 
boolean isCheckParticipation ()
 
void setCheckParticipation (boolean checkParticipation)
 
int count ()
 
Collection< Contractitems ()
 
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 ()
 
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)
 
- 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 46 of file ContractIterator.java.

Constructor & Destructor Documentation

◆ ContractIterator()

org.turro.financials.contract.www.ContractIterator.ContractIterator ( IConstructor  constructor,
String  pubPath 
)

Definition at line 52 of file ContractIterator.java.

52  {
53  super(new FinancialsPU(), new ElephantMarker(constructor));
54  this.pubPath = pubPath;
55  this.checkParticipation = true;
56  }

Member Function Documentation

◆ count()

int org.turro.financials.contract.www.ContractIterator.count ( )

Definition at line 82 of file ContractIterator.java.

82  {
83  return getTotalCount();
84  }
Here is the call graph for this function:

◆ entity()

Contract org.turro.financials.contract.www.ContractIterator.entity ( Long  value)
protected

Definition at line 141 of file ContractIterator.java.

141  {
142  return dao.find(Contract.class, value);
143  }

◆ entityRoot()

String org.turro.financials.contract.www.ContractIterator.entityRoot ( )
protected

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

Definition at line 136 of file ContractIterator.java.

136  {
137  return "contract";
138  }

◆ getActualParameters()

String org.turro.financials.contract.www.ContractIterator.getActualParameters ( )

Definition at line 113 of file ContractIterator.java.

113  {
114  return Strings.isBlank(actualParameters) ? "?a=b" : actualParameters;
115  }

◆ getCountClause()

WhereClause org.turro.financials.contract.www.ContractIterator.getCountClause ( )
protected

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

Definition at line 103 of file ContractIterator.java.

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

◆ getType()

int org.turro.financials.contract.www.ContractIterator.getType ( )

Definition at line 66 of file ContractIterator.java.

66  {
67  return type;
68  }

◆ getWhereClause()

WhereClause org.turro.financials.contract.www.ContractIterator.getWhereClause ( )
protected

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

Definition at line 91 of file ContractIterator.java.

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

◆ isCheckParticipation()

boolean org.turro.financials.contract.www.ContractIterator.isCheckParticipation ( )

Definition at line 74 of file ContractIterator.java.

74  {
75  return checkParticipation;
76  }

◆ isPublicOnly()

boolean org.turro.financials.contract.www.ContractIterator.isPublicOnly ( )

Definition at line 58 of file ContractIterator.java.

58  {
59  return publicOnly;
60  }

◆ isValid()

boolean org.turro.financials.contract.www.ContractIterator.isValid ( Contract  e)
protected

Definition at line 146 of file ContractIterator.java.

146  {
147  return super.isValid(e) && (!checkParticipation || e.getIParticipants().contains(Authentication.getIContact()));
148  }
Here is the call graph for this function:

◆ items()

Collection<Contract> org.turro.financials.contract.www.ContractIterator.items ( )

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

Definition at line 86 of file ContractIterator.java.

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

◆ metas()

Collection<String> org.turro.financials.contract.www.ContractIterator.metas ( Contract  e)
protected

Definition at line 212 of file ContractIterator.java.

212  {
213  ArrayList<RepositoryFile> files = new ArrayList<>();
214  String path = getItemLink(e, 0);
215  if(!SocialImageMap.hasImage(path)) {
216  FileAttach fa = new FileAttach(FinancialsPU.getObjectPath(e));
217  Repository repository = fa.getPublishableRepository(constructor);
218  files.addAll(repository.getRepositoryFiles("*_social.png,*_social.jpg"));
219  files.addAll(repository.getRepositoryFiles("*.png,*.jpg"));
220  }
221  SocialNet sn = new SocialNet(path, e.getName(), e.getFullDescription(), files);
222  return sn.getMetas();
223  }
Here is the call graph for this function:

◆ renderItem()

void org.turro.financials.contract.www.ContractIterator.renderItem ( ElephantMarker  marker,
Contract  e,
int  page 
)
protected

Definition at line 128 of file ContractIterator.java.

128  {
129  marker.put("contract", e);
130  prepareValues(e, page, false);
131  marker.process("contract", getFullTemplate());
132  actualParameters = getPageLink(page);
133  }
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.contract.www.ContractIterator.renderSummary ( ElephantMarker  marker,
Contract  e,
int  page 
)
protected

Definition at line 118 of file ContractIterator.java.

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

◆ setCheckParticipation()

void org.turro.financials.contract.www.ContractIterator.setCheckParticipation ( boolean  checkParticipation)

Definition at line 78 of file ContractIterator.java.

78  {
79  this.checkParticipation = checkParticipation;
80  }

◆ setPublicOnly()

void org.turro.financials.contract.www.ContractIterator.setPublicOnly ( boolean  publicOnly)

Definition at line 62 of file ContractIterator.java.

62  {
63  this.publicOnly = publicOnly;
64  }
Here is the caller graph for this function:

◆ setType()

void org.turro.financials.contract.www.ContractIterator.setType ( int  type)

Definition at line 70 of file ContractIterator.java.

70  {
71  this.type = type;
72  }

◆ title()

String org.turro.financials.contract.www.ContractIterator.title ( Contract  e)
protected

Definition at line 207 of file ContractIterator.java.

207  {
208  return e.getFullDescription();
209  }
Here is the call graph for this function:

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