19 package org.turro.jpa.content;
21 import java.io.Writer;
22 import java.util.ArrayList;
23 import java.util.Collection;
24 import java.util.Collections;
25 import java.util.List;
26 import org.turro.string.Strings;
27 import org.turro.activity.ContactActivityMap;
28 import org.turro.activity.EntityActivitySet;
29 import org.turro.activity.IEntityLastActivity;
30 import org.turro.elephant.context.IConstructor;
31 import org.turro.entities.Entities;
32 import org.turro.entities.IElephantEntity;
33 import org.turro.marker.ElephantMarker;
34 import org.turro.plugin.contacts.IContact;
42 private String lastReason, lastEntity;
46 super(
new ArrayList(activity), constructor, writer, contact, mail, pubPath);
50 super(getLastActivity(contact, cam), constructor, writer, contact, mail, pubPath);
65 boolean newEntity = !current.equals(lastEntity);
70 boolean newReason = reason !=
null && !reason.equals(lastReason);
72 marker.
put(
"last", e);
73 marker.
put(
"iee", iee);
75 marker.
put(
"previous", lastIee);
76 marker.
put(
"newMain", newMain);
77 marker.
put(
"newEntity", newEntity);
78 marker.
put(
"newReason", newReason);
79 marker.
put(
"reason", reason);
84 prepareValues(e, page);
92 marker.
put(
"activity", e);
93 prepareValues(e, page);
113 return Collections.EMPTY_LIST;
118 return isMail() ?
"content/newsletter/sections/lastactivity" :
"activity";
171 return "/user/lastactivities";
176 return eas !=
null ?
new ArrayList(eas) : Collections.EMPTY_LIST;
static IElephantEntity getController(String path)
void prepareControls(E entity, int page)
Object doDescriptionsCtrl(IEntityLastActivity e)
Object doInterestCtrl(IEntityLastActivity e)
void renderItem(ElephantMarker marker, IEntityLastActivity e, int page)
Object doFilesCtrl(IEntityLastActivity e)
IEntityLastActivity entity(Object value)
void renderSummary(ElephantMarker marker, IEntityLastActivity e, int page)
Object doVotesCtrl(IEntityLastActivity e)
Collection< String > metas(IEntityLastActivity e)
LastActivityIterator(IConstructor constructor, Writer writer, IContact contact, EntityActivitySet activity, boolean mail, String pubPath)
String getItemLink(IEntityLastActivity e)
Object doPollsCtrl(IEntityLastActivity e)
Object doCommentsCtrl(IEntityLastActivity e)
String title(IEntityLastActivity e)
Object doAttachmentsCtrl(IEntityLastActivity e)
String getRestrictedLink()
LastActivityIterator(IConstructor constructor, Writer writer, IContact contact, ContactActivityMap cam, boolean mail, String pubPath)
void process(String rootTmpl, String tmpl)
Object put(Object key, Object value)
IElephantEntity getMainEntity()
IElephantEntity getEntity()
boolean canShowInContext(IContact contact, Object relatedEntity)
static final String EMPTY_ID
boolean canPublish(IContact contact)