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

Public Member Functions

 ConvocationContentIterator (IConstructor constructor, Writer writer, IContact contact, boolean mail, String contextPath)
 
boolean isPublishable ()
 
void setPublishable (boolean publishable)
 
String getMode ()
 
void setMode (String mode)
 
boolean isAssistant (Convocation convocation, IContact contact)
 
- 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, Convocation e, int page)
 
void renderItem (ElephantMarker marker, Convocation e, int page)
 
String entityRoot ()
 
Convocation entity (String value)
 
boolean isValid (Convocation e)
 
String title (Convocation e)
 
Collection< String > metas (Convocation e)
 
String getTemplateRoot ()
 
Object doVotesCtrl (Convocation e)
 
Object doInterestCtrl (Convocation e)
 
Object doCommentsCtrl (Convocation e)
 
Object doAttachmentsCtrl (Convocation e)
 
Object doFilesCtrl (Convocation e)
 
Object doDescriptionsCtrl (Convocation e)
 
Object doPollsCtrl (Convocation e)
 
String getItemLink (Convocation 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 53 of file ConvocationContentIterator.java.

Constructor & Destructor Documentation

◆ ConvocationContentIterator()

org.turro.contacts.content.ConvocationContentIterator.ConvocationContentIterator ( IConstructor  constructor,
Writer  writer,
IContact  contact,
boolean  mail,
String  contextPath 
)

Definition at line 58 of file ConvocationContentIterator.java.

58  {
59  super(new ContactsPU(), constructor, writer, contact, mail, contextPath);
60  }

Member Function Documentation

◆ doAttachmentsCtrl()

Object org.turro.contacts.content.ConvocationContentIterator.doAttachmentsCtrl ( Convocation  e)
protected

Definition at line 234 of file ConvocationContentIterator.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.contacts.content.ConvocationContentIterator.doCommentsCtrl ( Convocation  e)
protected

Definition at line 228 of file ConvocationContentIterator.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.contacts.content.ConvocationContentIterator.doDescriptionsCtrl ( Convocation  e)
protected

Definition at line 246 of file ConvocationContentIterator.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.contacts.content.ConvocationContentIterator.doFilesCtrl ( Convocation  e)
protected

Definition at line 240 of file ConvocationContentIterator.java.

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

◆ doInterestCtrl()

Object org.turro.contacts.content.ConvocationContentIterator.doInterestCtrl ( Convocation  e)
protected

Definition at line 222 of file ConvocationContentIterator.java.

222  {
223  return Entities.getController(e).configureCtrl(
224  new StarItCtrl(constructor), getContact());
225  }
Here is the call graph for this function:

◆ doPollsCtrl()

Object org.turro.contacts.content.ConvocationContentIterator.doPollsCtrl ( Convocation  e)
protected

Definition at line 252 of file ConvocationContentIterator.java.

252  {
253  return Entities.getController(e).configureCtrl(
254  new PollsCtrl(constructor), getContact());
255  }
Here is the call graph for this function:

◆ doVotesCtrl()

Object org.turro.contacts.content.ConvocationContentIterator.doVotesCtrl ( Convocation  e)
protected

Definition at line 216 of file ConvocationContentIterator.java.

216  {
217  return Entities.getController(e).configureCtrl(
218  new VoteItCtrl(constructor), getContact());
219  }
Here is the call graph for this function:

◆ entity()

Convocation org.turro.contacts.content.ConvocationContentIterator.entity ( String  value)
protected

Definition at line 135 of file ConvocationContentIterator.java.

135  {
136  WhereClause wc = new WhereClause();
137  wc.addClause("select distinct convocation from Convocation as convocation");
138  wc.addClause("left outer join convocation.attendees attendee");
139  addCriteria(wc);
140  wc.addClause("and convocation.id = :id");
141  wc.addNamedValue("id", value);
142  return (Convocation) dao.getSingleResultOrNull(wc);
143  }
Object getSingleResultOrNull(SqlClause sc)
Definition: Dao.java:419
Here is the call graph for this function:

◆ entityRoot()

String org.turro.contacts.content.ConvocationContentIterator.entityRoot ( )
protected

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

Definition at line 130 of file ConvocationContentIterator.java.

130  {
131  return "convocation";
132  }

◆ getCountClause()

WhereClause org.turro.contacts.content.ConvocationContentIterator.getCountClause ( )
protected

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

Definition at line 97 of file ConvocationContentIterator.java.

97  {
98  WhereClause wc = new WhereClause();
99  wc.addClause("select count(distinct convocation) from Convocation as convocation");
100  wc.addClause("left outer join convocation.attendees attendee");
101  addCriteria(wc);
102  return wc;
103  }
Here is the call graph for this function:

◆ getItemLink()

String org.turro.contacts.content.ConvocationContentIterator.getItemLink ( Convocation  e)
protected

Definition at line 258 of file ConvocationContentIterator.java.

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

◆ getMode()

String org.turro.contacts.content.ConvocationContentIterator.getMode ( )

Definition at line 70 of file ConvocationContentIterator.java.

70  {
71  return mode;
72  }

◆ getReadAllLink()

String org.turro.contacts.content.ConvocationContentIterator.getReadAllLink ( )
protected

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

Definition at line 263 of file ConvocationContentIterator.java.

263  {
264  String path = getContextPath();
265  if(Strings.isBlank(path)) {
266  path = ElephantContext.getEntityWebContext("/convocation");
267  }
268  if(Strings.isBlank(path)) {
269  return getRestrictedLink();
270  }
271  return path;
272  }
Here is the call graph for this function:

◆ getRestrictedLink()

String org.turro.contacts.content.ConvocationContentIterator.getRestrictedLink ( )
protected

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

Definition at line 275 of file ConvocationContentIterator.java.

275  {
276  return "/user/convocations";
277  }
Here is the caller graph for this function:

◆ getTemplateRoot()

String org.turro.contacts.content.ConvocationContentIterator.getTemplateRoot ( )
protected

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

Definition at line 211 of file ConvocationContentIterator.java.

211  {
212  return isMail() ? "content/newsletter/sections/convocations" : "convocation";
213  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getWhereClause()

WhereClause org.turro.contacts.content.ConvocationContentIterator.getWhereClause ( )
protected

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

Definition at line 83 of file ConvocationContentIterator.java.

83  {
84  WhereClause wc = new WhereClause();
85  wc.addClause("select distinct convocation from Convocation as convocation");
86  wc.addClause("left outer join convocation.attendees attendee");
87  addCriteria(wc);
88  if("open".equals(mode)) {
89  wc.addClause("order by convocation.callDate");
90  } else {
91  wc.addClause("order by convocation.callDate desc");
92  }
93  return wc;
94  }
Here is the call graph for this function:

◆ isAssistant()

boolean org.turro.contacts.content.ConvocationContentIterator.isAssistant ( Convocation  convocation,
IContact  contact 
)

Definition at line 78 of file ConvocationContentIterator.java.

78  {
79  return convocation.isAssistant(contact);
80  }
Here is the call graph for this function:

◆ isPublishable()

boolean org.turro.contacts.content.ConvocationContentIterator.isPublishable ( )

Definition at line 62 of file ConvocationContentIterator.java.

62  {
63  return publishable;
64  }

◆ isValid()

boolean org.turro.contacts.content.ConvocationContentIterator.isValid ( Convocation  e)
protected

Definition at line 179 of file ConvocationContentIterator.java.

179  {
180  return super.isValid(e);
181  }

◆ metas()

Collection<String> org.turro.contacts.content.ConvocationContentIterator.metas ( Convocation  e)
protected

Definition at line 196 of file ConvocationContentIterator.java.

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

◆ renderItem()

void org.turro.contacts.content.ConvocationContentIterator.renderItem ( ElephantMarker  marker,
Convocation  e,
int  page 
)
protected

Definition at line 119 of file ConvocationContentIterator.java.

119  {
120  marker.put("convocation", e);
121  ConvocationCtrl cc = new ConvocationCtrl();
122  cc.setConstructor(constructor);
123  cc.setEntityPath(ContactsPU.getObjectPath(e));
124  marker.put("actions", cc);
125  prepareValues(e, page);
127  }
void process(String rootTmpl, String tmpl)
Object put(Object key, Object value)
Here is the call graph for this function:

◆ renderSummary()

void org.turro.contacts.content.ConvocationContentIterator.renderSummary ( ElephantMarker  marker,
Convocation  e,
int  page 
)
protected

Definition at line 106 of file ConvocationContentIterator.java.

106  {
107  if(e != null) {
108  marker.put("convocation", e);
109  ConvocationCtrl cc = new ConvocationCtrl();
110  cc.setConstructor(constructor);
111  cc.setEntityPath(ContactsPU.getObjectPath(e));
112  marker.put("actions", cc);
113  prepareValues(e, page);
114  }
116  }
Here is the call graph for this function:

◆ setMode()

void org.turro.contacts.content.ConvocationContentIterator.setMode ( String  mode)

Definition at line 74 of file ConvocationContentIterator.java.

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

◆ setPublishable()

void org.turro.contacts.content.ConvocationContentIterator.setPublishable ( boolean  publishable)

Definition at line 66 of file ConvocationContentIterator.java.

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

◆ title()

String org.turro.contacts.content.ConvocationContentIterator.title ( Convocation  e)
protected

Definition at line 188 of file ConvocationContentIterator.java.

188  {
189  if(!Strings.isBlank(e.getName())) {
190  return e.getName();
191  }
192  return null;
193  }
Here is the call graph for this function:

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