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

Public Member Functions

 OldDirectoryContentIterator (IConstructor constructor, Writer writer, IContact contact, boolean mail, String contextPath)
 
- 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, Contact e, int page)
 
void renderItem (ElephantMarker marker, Contact e, int page)
 
String entityRoot ()
 
Contact entity (String value)
 
boolean isValid (Contact e)
 
String title (Contact e)
 
Collection< String > metas (Contact e)
 
String getTemplateRoot ()
 
Object doVotesCtrl (Contact e)
 
Object doInterestCtrl (Contact e)
 
Object doCommentsCtrl (Contact e)
 
Object doAttachmentsCtrl (Contact e)
 
Object doFilesCtrl (Contact e)
 
Object doDescriptionsCtrl (Contact e)
 
Object doPollsCtrl (Contact e)
 
String getItemLink (Contact 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 OldDirectoryContentIterator.java.

Constructor & Destructor Documentation

◆ OldDirectoryContentIterator()

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

Definition at line 55 of file OldDirectoryContentIterator.java.

55  {
56  super(new ContactsPU(), constructor, writer, contact, mail, contextPath);
57  }

Member Function Documentation

◆ doAttachmentsCtrl()

Object org.turro.contacts.content.OldDirectoryContentIterator.doAttachmentsCtrl ( Contact  e)
protected

Definition at line 193 of file OldDirectoryContentIterator.java.

193  {
194  return Entities.getController(e).configureCtrl(
195  new AttachCtrl(constructor), getContact());
196  }
Here is the call graph for this function:

◆ doCommentsCtrl()

Object org.turro.contacts.content.OldDirectoryContentIterator.doCommentsCtrl ( Contact  e)
protected

Definition at line 187 of file OldDirectoryContentIterator.java.

187  {
188  return Entities.getController(e).configureCtrl(
189  new CommentItCtrl(constructor), getContact());
190  }
Here is the call graph for this function:

◆ doDescriptionsCtrl()

Object org.turro.contacts.content.OldDirectoryContentIterator.doDescriptionsCtrl ( Contact  e)
protected

Definition at line 205 of file OldDirectoryContentIterator.java.

205  {
206  return Entities.getController(e).configureCtrl(
207  new DescribeItCtrl(constructor), getContact());
208  }
Here is the call graph for this function:

◆ doFilesCtrl()

Object org.turro.contacts.content.OldDirectoryContentIterator.doFilesCtrl ( Contact  e)
protected

Definition at line 199 of file OldDirectoryContentIterator.java.

199  {
200  return Entities.getController(e).configureCtrl(
201  new FileAttach(ContactsPU.getObjectPath(e)), getContact());
202  }
Here is the call graph for this function:

◆ doInterestCtrl()

Object org.turro.contacts.content.OldDirectoryContentIterator.doInterestCtrl ( Contact  e)
protected

Definition at line 181 of file OldDirectoryContentIterator.java.

181  {
182  return Entities.getController(e).configureCtrl(
183  new StarItCtrl(constructor), getContact());
184  }
Here is the call graph for this function:

◆ doPollsCtrl()

Object org.turro.contacts.content.OldDirectoryContentIterator.doPollsCtrl ( Contact  e)
protected

Definition at line 211 of file OldDirectoryContentIterator.java.

211  {
212  return Entities.getController(e).configureCtrl(
213  new PollsCtrl(constructor), getContact());
214  }
Here is the call graph for this function:

◆ doVotesCtrl()

Object org.turro.contacts.content.OldDirectoryContentIterator.doVotesCtrl ( Contact  e)
protected

Definition at line 175 of file OldDirectoryContentIterator.java.

175  {
176  return Entities.getController(e).configureCtrl(
177  new VoteItCtrl(constructor), getContact());
178  }
Here is the call graph for this function:

◆ entity()

Contact org.turro.contacts.content.OldDirectoryContentIterator.entity ( String  value)
protected

Definition at line 102 of file OldDirectoryContentIterator.java.

102  {
103  WhereClause wc = new WhereClause();
104  wc.addClause("select distinct contact from Contact as contact");
105  wc.addClause("left outer join contact.syndications syndication");
106  wc.addClause("left outer join contact.connectors connector with connector.description like '%Directory%'");
107  addCriteria(wc);
108  wc.addClause("and contact.id = :id");
109  wc.addNamedValue("id", value);
110  return (Contact) dao.getSingleResultOrNull(wc);
111  }
Object getSingleResultOrNull(SqlClause sc)
Definition: Dao.java:419
Here is the call graph for this function:

◆ entityRoot()

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

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

Definition at line 97 of file OldDirectoryContentIterator.java.

97  {
98  return "contact";
99  }

◆ getCountClause()

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

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

Definition at line 71 of file OldDirectoryContentIterator.java.

71  {
72  WhereClause wc = new WhereClause();
73  wc.addClause("select count(distinct contact) from Contact as contact");
74  wc.addClause("left outer join contact.syndications syndication");
75  wc.addClause("left outer join contact.connectors connector with connector.description like '%Directory%'");
76  addCriteria(wc);
77  return wc;
78  }
Here is the call graph for this function:

◆ getItemLink()

String org.turro.contacts.content.OldDirectoryContentIterator.getItemLink ( Contact  e)
protected

Definition at line 217 of file OldDirectoryContentIterator.java.

217  {
218  return doItemLink(e, e.getId(), true);
219  }
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.contacts.content.OldDirectoryContentIterator.getReadAllLink ( )
protected

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

Definition at line 222 of file OldDirectoryContentIterator.java.

222  {
223  String path = getContextPath();
224  if(Strings.isBlank(path)) {
225  path = ElephantContext.getEntityWebContext("/directory");
226  }
227  if(Strings.isBlank(path)) {
228  return getRestrictedLink();
229  }
230  return path;
231  }
Here is the call graph for this function:

◆ getRestrictedLink()

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

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

Definition at line 234 of file OldDirectoryContentIterator.java.

234  {
235  return "/user/directory";
236  }
Here is the caller graph for this function:

◆ getTemplateRoot()

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

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

Definition at line 170 of file OldDirectoryContentIterator.java.

170  {
171  return isMail() ? "content/newsletter/sections/directory" : "directory";
172  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getWhereClause()

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

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

Definition at line 60 of file OldDirectoryContentIterator.java.

60  {
61  WhereClause wc = new WhereClause();
62  wc.addClause("select distinct contact from Contact as contact");
63  wc.addClause("left outer join contact.syndications syndication");
64  wc.addClause("left outer join contact.connectors connector with connector.description like '%Directory%'");
65  addCriteria(wc);
66  wc.addClause("order by contact.name");
67  return wc;
68  }
Here is the call graph for this function:

◆ isValid()

boolean org.turro.contacts.content.OldDirectoryContentIterator.isValid ( Contact  e)
protected

Definition at line 138 of file OldDirectoryContentIterator.java.

138  {
139  return super.isValid(e);
140  }

◆ metas()

Collection<String> org.turro.contacts.content.OldDirectoryContentIterator.metas ( Contact  e)
protected

Definition at line 155 of file OldDirectoryContentIterator.java.

155  {
156  ArrayList<RepositoryFile> files = new ArrayList<>();
157  String path = getItemLink(e);
158  if(!SocialImageMap.hasImage(path)) {
159  FileAttach fa = new FileAttach(ContactsPU.getObjectPath(e));
160  Repository repository = fa.getPublishableRepository(constructor);
161  files.addAll(repository.getRepositoryFiles("*_social.png,*_social.jpg"));
162  files.addAll(repository.getRepositoryFiles("*.png,*.jpg"));
163  }
164  SocialNet sn;
165  sn = new SocialNet(path, e.getName(), e.getName(), files);
166  return sn.getMetas();
167  }
Here is the call graph for this function:

◆ renderItem()

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

Definition at line 90 of file OldDirectoryContentIterator.java.

Here is the call graph for this function:

◆ renderSummary()

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

Definition at line 81 of file OldDirectoryContentIterator.java.

81  {
82  if(e != null) {
83  marker.put("contact", e);
84  prepareValues(e, page);
85  }
87  }
Here is the call graph for this function:

◆ title()

String org.turro.contacts.content.OldDirectoryContentIterator.title ( Contact  e)
protected

Definition at line 147 of file OldDirectoryContentIterator.java.

147  {
148  if(!Strings.isBlank(e.getName())) {
149  return e.getName();
150  }
151  return null;
152  }
Here is the call graph for this function:

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