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

Public Member Functions

 ProjectContentIterator (IConstructor constructor, Writer writer, IContact contact, boolean mail, String pubPath)
 
String getProjectUrl (WsMember member, AxProject project)
 
- 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, AxProject e, int page)
 
void renderItem (ElephantMarker marker, AxProject e, int page)
 
String entityRoot ()
 
AxProject entity (ProcedenceId value)
 
ProcedenceId getIdentifier ()
 
String title (AxProject e)
 
Collection< String > metas (AxProject e)
 
String getTemplateRoot ()
 
Object doVotesCtrl (AxProject e)
 
Object doInterestCtrl (AxProject e)
 
Object doCommentsCtrl (AxProject e)
 
Object doAttachmentsCtrl (AxProject e)
 
Object doFilesCtrl (AxProject e)
 
Object doDescriptionsCtrl (AxProject e)
 
Object doPollsCtrl (AxProject e)
 
String getItemLink (AxProject project)
 
String getReadAllLink ()
 
String getRestrictedLink ()
 
String stringId (ProcedenceId value)
 
ProcedenceId parseId (String value)
 
- 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)
 
void preload ()
 
boolean isValid (E e)
 
boolean canShow (E e)
 
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 52 of file ProjectContentIterator.java.

Constructor & Destructor Documentation

◆ ProjectContentIterator()

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

Definition at line 56 of file ProjectContentIterator.java.

56  {
57  super(new AlliancePU(), constructor, writer, contact, mail, pubPath);
58  }

Member Function Documentation

◆ doAttachmentsCtrl()

Object org.turro.alliance.content.ProjectContentIterator.doAttachmentsCtrl ( AxProject  e)
protected

Definition at line 231 of file ProjectContentIterator.java.

231  {
232  return null;
233  }

◆ doCommentsCtrl()

Object org.turro.alliance.content.ProjectContentIterator.doCommentsCtrl ( AxProject  e)
protected

Definition at line 226 of file ProjectContentIterator.java.

226  {
227  return null;
228  }

◆ doDescriptionsCtrl()

Object org.turro.alliance.content.ProjectContentIterator.doDescriptionsCtrl ( AxProject  e)
protected

Definition at line 241 of file ProjectContentIterator.java.

241  {
242  return null;
243  }

◆ doFilesCtrl()

Object org.turro.alliance.content.ProjectContentIterator.doFilesCtrl ( AxProject  e)
protected

Definition at line 236 of file ProjectContentIterator.java.

236  {
237  return null;
238  }

◆ doInterestCtrl()

Object org.turro.alliance.content.ProjectContentIterator.doInterestCtrl ( AxProject  e)
protected

Definition at line 221 of file ProjectContentIterator.java.

221  {
222  return null;
223  }

◆ doPollsCtrl()

Object org.turro.alliance.content.ProjectContentIterator.doPollsCtrl ( AxProject  e)
protected

Definition at line 246 of file ProjectContentIterator.java.

246  {
247  return null;
248  }

◆ doVotesCtrl()

Object org.turro.alliance.content.ProjectContentIterator.doVotesCtrl ( AxProject  e)
protected

Definition at line 216 of file ProjectContentIterator.java.

216  {
217  return null;
218  }

◆ entity()

AxProject org.turro.alliance.content.ProjectContentIterator.entity ( ProcedenceId  value)
protected

Definition at line 130 of file ProjectContentIterator.java.

130  {
131  WhereClause wc = new WhereClause();
132  wc.addClause("select distinct project from AxProject as project");
133  wc.addClause("join AxCategory as category on project.categoryId = category.categoryId");
134  wc.addClause("left outer join project.participations participant");
135  wc.addClause("where 1=1");
136  addCriteria(wc, true);
137  wc.addClause("and project.projectId = :id");
138  wc.addNamedValue("id", value);
139  return (AxProject) dao.getSingleResultOrNull(wc);
140  }
Object getSingleResultOrNull(SqlClause sc)
Definition: Dao.java:419
Here is the call graph for this function:

◆ entityRoot()

String org.turro.alliance.content.ProjectContentIterator.entityRoot ( )
protected

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

Definition at line 125 of file ProjectContentIterator.java.

125  {
126  return "axproject";
127  }

◆ getCountClause()

WhereClause org.turro.alliance.content.ProjectContentIterator.getCountClause ( )
protected

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

Definition at line 89 of file ProjectContentIterator.java.

89  {
90  WhereClause wc = new WhereClause();
91  wc.addClause("select count(distinct project) from AxProject as project");
92  wc.addClause("join AxCategory as category on project.categoryId = category.categoryId");
93  wc.addClause("left outer join project.participations participant");
94  wc.addClause("where 1=1");
95  addCriteria(wc, true);
96  wc.addClause("order by project.creation desc");
97  return wc;
98  }
Here is the call graph for this function:

◆ getIdentifier()

ProcedenceId org.turro.alliance.content.ProjectContentIterator.getIdentifier ( )
protected

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

Definition at line 143 of file ProjectContentIterator.java.

143  {
144  ProcedenceId identifier = getIDFromURL("/axproject");
145  if(identifier == null) {
146  identifier = super.getIdentifier();
147  }
148  return identifier;
149  }
Here is the call graph for this function:

◆ getItemLink()

String org.turro.alliance.content.ProjectContentIterator.getItemLink ( AxProject  project)
protected

Definition at line 251 of file ProjectContentIterator.java.

251  {
252  return doItemLink(project, project.getProjectId(), true);
253  }
String doItemLink(E entity, ID id, boolean obfuscated)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getProjectUrl()

String org.turro.alliance.content.ProjectContentIterator.getProjectUrl ( WsMember  member,
AxProject  project 
)

Definition at line 60 of file ProjectContentIterator.java.

60  {
61  if(ObjectUtils.allNotNull(member, project)) {
62  if(member.getMemberId() == project.getProjectId().getMemberId()) {
63  return Interceptors.parameters("project", project.getProjectId().getEntityId())
64  .url(member.getMemberUrl())
65  .encoded();
66  } else {
67  return Interceptors.parameters("axproject", project.getId().replaceAll("#", "_"))
68  .add("server", ElephantContext.getSiteForcedDomain())
69  .url(member.getMemberUrl())
70  .encoded();
71  }
72  }
73  return "#";
74  }
Here is the call graph for this function:

◆ getReadAllLink()

String org.turro.alliance.content.ProjectContentIterator.getReadAllLink ( )
protected

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

Definition at line 256 of file ProjectContentIterator.java.

256  {
257  String path = getContextPath();
258  if(Strings.isBlank(path)) {
259  path = ElephantContext.getEntityWebContext("/axproject");
260  }
261  if(Strings.isBlank(path)) {
262  return getRestrictedLink();
263  }
264  return path;
265  }
Here is the call graph for this function:

◆ getRestrictedLink()

String org.turro.alliance.content.ProjectContentIterator.getRestrictedLink ( )
protected

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

Definition at line 268 of file ProjectContentIterator.java.

268  {
269  return "/user/alliance/projects";
270  }
Here is the caller graph for this function:

◆ getTemplateRoot()

String org.turro.alliance.content.ProjectContentIterator.getTemplateRoot ( )
protected

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

Definition at line 211 of file ProjectContentIterator.java.

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

◆ getWhereClause()

WhereClause org.turro.alliance.content.ProjectContentIterator.getWhereClause ( )
protected

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

Definition at line 77 of file ProjectContentIterator.java.

77  {
78  WhereClause wc = new WhereClause();
79  wc.addClause("select distinct project from AxProject as project");
80  wc.addClause("join AxCategory as category on project.categoryId = category.categoryId");
81  wc.addClause("left outer join project.participations participant");
82  wc.addClause("where 1=1");
83  addCriteria(wc, true);
84  wc.addClause("order by project.creation desc");
85  return wc;
86  }
Here is the call graph for this function:

◆ metas()

Collection<String> org.turro.alliance.content.ProjectContentIterator.metas ( AxProject  e)
protected

Definition at line 197 of file ProjectContentIterator.java.

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

◆ parseId()

ProcedenceId org.turro.alliance.content.ProjectContentIterator.parseId ( String  value)
protected

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

Definition at line 278 of file ProjectContentIterator.java.

278  {
279  return ProcedenceId.from(value);
280  }
Here is the call graph for this function:

◆ renderItem()

void org.turro.alliance.content.ProjectContentIterator.renderItem ( ElephantMarker  marker,
AxProject  e,
int  page 
)
protected

Definition at line 117 of file ProjectContentIterator.java.

117  {
118  marker.put("project", e);
119  prepareValues(e, page);
120  marker.put("restricted", isRestricted());
122  }
void process(String rootTmpl, String tmpl)
Object put(Object key, Object value)
Here is the call graph for this function:

◆ renderSummary()

void org.turro.alliance.content.ProjectContentIterator.renderSummary ( ElephantMarker  marker,
AxProject  e,
int  page 
)
protected

Definition at line 101 of file ProjectContentIterator.java.

101  {
102  if(e != null) {
103  marker.put("project", e);
104  if(e.getCategory() != null) {
105  marker.put("newCategory", e.getCategory().getCategoryId() != lastCategoryId);
106  lastCategoryId = e.getCategory().getCategoryId();
107  } else {
108  lastCategoryId = 0;
109  }
110  prepareValues(e, page);
111  marker.put("restricted", isRestricted());
112  }
114  }
Here is the call graph for this function:

◆ stringId()

String org.turro.alliance.content.ProjectContentIterator.stringId ( ProcedenceId  value)
protected

Definition at line 273 of file ProjectContentIterator.java.

273  {
274  return value.stringify();
275  }
Here is the call graph for this function:

◆ title()

String org.turro.alliance.content.ProjectContentIterator.title ( AxProject  e)
protected

Definition at line 189 of file ProjectContentIterator.java.

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

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