19 package org.turro.content;
21 import java.io.Writer;
22 import java.util.Collection;
23 import java.util.Collections;
24 import org.turro.elephant.context.ElephantContext;
25 import org.turro.elephant.context.IConstructor;
26 import org.turro.elephant.db.ElephantPU;
27 import org.turro.elephant.db.WhereClause;
28 import org.turro.elephant.entities.db.Activity;
29 import org.turro.elephant.entities.db.ActivityPK;
30 import org.turro.jpa.content.EntityDaoContentIterator;
31 import org.turro.marker.ElephantMarker;
32 import org.turro.plugin.contacts.IContact;
33 import org.turro.string.Strings;
48 wc.
addClause(
"select activity from Activity as activity");
50 wc.
addClause(
"order by activity.activityDate desc");
57 wc.
addClause(
"select count(activity) from Activity as activity");
66 prepareValues(e, page);
74 prepareValues(e, page);
86 wc.
addClause(
"select activity from Activity as activity");
95 wc.
addClause(
" select aa from ActivityAssistant aa");
96 wc.
addClause(
" where activity.entityPath = aa.entityPath");
97 wc.
addClause(
" and aa.contactId = :idContact");
107 private void prepareValues(
final Activity challenge,
int page) {
118 return Collections.EMPTY_LIST;
123 return isMail() ? null :
"activity";
134 if(Strings.isBlank(path)) {
137 if(Strings.isBlank(path)) {
145 return "/user/lastactivities";
Object doVotesCtrl(Activity e)
Collection< String > metas(Activity e)
Object doInterestCtrl(Activity e)
ActivityContentIterator(IConstructor constructor, Writer writer, IContact contact, boolean mail, String pubPath)
Object doDescriptionsCtrl(Activity e)
WhereClause getCountClause()
Activity entity(ActivityPK value)
Object doPollsCtrl(Activity e)
boolean isValid(Activity e)
Object doCommentsCtrl(Activity e)
void renderItem(ElephantMarker marker, Activity e, int page)
String getRestrictedLink()
Object doAttachmentsCtrl(Activity e)
void renderSummary(ElephantMarker marker, Activity e, int page)
String getItemLink(Activity e)
WhereClause getWhereClause()
Object doFilesCtrl(Activity e)
static String getEntityWebContext(String path)
void addClause(String clause)
void addNamedValue(String name, Object value)
IElephantEntity getEntity()
Object getSingleResultOrNull(SqlClause sc)
void prepareControls(E entity, int page)
String getSummaryTemplate()
void process(String rootTmpl, String tmpl)
Object put(Object key, Object value)