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

Public Member Functions

 LastActivityIterator (IConstructor constructor, Writer writer, IContact contact, EntityActivitySet activity, boolean mail, String pubPath)
 
 LastActivityIterator (IConstructor constructor, Writer writer, IContact contact, ContactActivityMap cam, boolean mail, String pubPath)
 
- Public Member Functions inherited from org.turro.jpa.content.EntityItemContentIterator< IEntityLastActivity, Object >
 EntityItemContentIterator (List collection, IConstructor constructor, Writer writer, IContact contact, boolean mail, String contextPath)
 
String getContextPath ()
 
IContact getContact ()
 
boolean isAllowInterest ()
 
void setAllowInterest (boolean allowInterest)
 
boolean isAllowComments ()
 
void setAllowComments (boolean allowComments)
 
boolean isAllowVotes ()
 
void setAllowVotes (boolean allowVotes)
 
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 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)
 

Protected Member Functions

void renderSummary (ElephantMarker marker, IEntityLastActivity e, int page)
 
void renderItem (ElephantMarker marker, IEntityLastActivity e, int page)
 
IEntityLastActivity entity (Object value)
 
String title (IEntityLastActivity e)
 
Collection< String > metas (IEntityLastActivity e)
 
String getTemplateRoot ()
 
Object doVotesCtrl (IEntityLastActivity e)
 
Object doInterestCtrl (IEntityLastActivity e)
 
Object doCommentsCtrl (IEntityLastActivity e)
 
Object doAttachmentsCtrl (IEntityLastActivity e)
 
Object doFilesCtrl (IEntityLastActivity e)
 
Object doDescriptionsCtrl (IEntityLastActivity e)
 
Object doPollsCtrl (IEntityLastActivity e)
 
String getItemLink (IEntityLastActivity e)
 
String getReadAllLink ()
 
String getRestrictedLink ()
 
- Protected Member Functions inherited from org.turro.jpa.content.EntityItemContentIterator< IEntityLastActivity, Object >
void prepareControls (E entity, int page)
 
abstract String getTemplateRoot ()
 
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)
 
abstract String getReadAllLink ()
 
abstract String getRestrictedLink ()
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 40 of file LastActivityIterator.java.

Constructor & Destructor Documentation

◆ LastActivityIterator() [1/2]

org.turro.jpa.content.LastActivityIterator.LastActivityIterator ( IConstructor  constructor,
Writer  writer,
IContact  contact,
EntityActivitySet  activity,
boolean  mail,
String  pubPath 
)

Definition at line 45 of file LastActivityIterator.java.

45  {
46  super(new ArrayList(activity), constructor, writer, contact, mail, pubPath);
47  }

◆ LastActivityIterator() [2/2]

org.turro.jpa.content.LastActivityIterator.LastActivityIterator ( IConstructor  constructor,
Writer  writer,
IContact  contact,
ContactActivityMap  cam,
boolean  mail,
String  pubPath 
)

Definition at line 49 of file LastActivityIterator.java.

49  {
50  super(getLastActivity(contact, cam), constructor, writer, contact, mail, pubPath);
51  }

Member Function Documentation

◆ doAttachmentsCtrl()

Object org.turro.jpa.content.LastActivityIterator.doAttachmentsCtrl ( IEntityLastActivity  e)
protected

Definition at line 137 of file LastActivityIterator.java.

137  {
138  return null;
139  }

◆ doCommentsCtrl()

Object org.turro.jpa.content.LastActivityIterator.doCommentsCtrl ( IEntityLastActivity  e)
protected

Definition at line 132 of file LastActivityIterator.java.

132  {
133  return null;
134  }

◆ doDescriptionsCtrl()

Object org.turro.jpa.content.LastActivityIterator.doDescriptionsCtrl ( IEntityLastActivity  e)
protected

Definition at line 147 of file LastActivityIterator.java.

147  {
148  return null;
149  }

◆ doFilesCtrl()

Object org.turro.jpa.content.LastActivityIterator.doFilesCtrl ( IEntityLastActivity  e)
protected

Definition at line 142 of file LastActivityIterator.java.

142  {
143  return null;
144  }

◆ doInterestCtrl()

Object org.turro.jpa.content.LastActivityIterator.doInterestCtrl ( IEntityLastActivity  e)
protected

Definition at line 127 of file LastActivityIterator.java.

127  {
128  return null;
129  }

◆ doPollsCtrl()

Object org.turro.jpa.content.LastActivityIterator.doPollsCtrl ( IEntityLastActivity  e)
protected

Definition at line 152 of file LastActivityIterator.java.

152  {
153  return null;
154  }

◆ doVotesCtrl()

Object org.turro.jpa.content.LastActivityIterator.doVotesCtrl ( IEntityLastActivity  e)
protected

Definition at line 122 of file LastActivityIterator.java.

122  {
123  return null;
124  }

◆ entity()

IEntityLastActivity org.turro.jpa.content.LastActivityIterator.entity ( Object  value)
protected

Definition at line 98 of file LastActivityIterator.java.

98  {
99  return null;
100  }

◆ getItemLink()

String org.turro.jpa.content.LastActivityIterator.getItemLink ( IEntityLastActivity  e)
protected

Definition at line 157 of file LastActivityIterator.java.

157  {
158  return getReadAllLink();
159  }
Here is the call graph for this function:

◆ getReadAllLink()

String org.turro.jpa.content.LastActivityIterator.getReadAllLink ( )
protected

Definition at line 162 of file LastActivityIterator.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getRestrictedLink()

String org.turro.jpa.content.LastActivityIterator.getRestrictedLink ( )
protected

Definition at line 170 of file LastActivityIterator.java.

170  {
171  return "/user/lastactivities";
172  }
Here is the caller graph for this function:

◆ getTemplateRoot()

String org.turro.jpa.content.LastActivityIterator.getTemplateRoot ( )
protected

Definition at line 117 of file LastActivityIterator.java.

117  {
118  return isMail() ? "content/newsletter/sections/lastactivity" : "activity";
119  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ metas()

Collection<String> org.turro.jpa.content.LastActivityIterator.metas ( IEntityLastActivity  e)
protected

Definition at line 112 of file LastActivityIterator.java.

112  {
113  return Collections.EMPTY_LIST;
114  }

◆ renderItem()

void org.turro.jpa.content.LastActivityIterator.renderItem ( ElephantMarker  marker,
IEntityLastActivity  e,
int  page 
)
protected

Definition at line 91 of file LastActivityIterator.java.

91  {
92  marker.put("activity", e);
93  prepareValues(e, page);
94  marker.process(getTemplateRoot(), getFullTemplate(), getWriter());
95  }
Here is the call graph for this function:

◆ renderSummary()

void org.turro.jpa.content.LastActivityIterator.renderSummary ( ElephantMarker  marker,
IEntityLastActivity  e,
int  page 
)
protected

Definition at line 54 of file LastActivityIterator.java.

54  {
55  if(e != null) {
56  String current = e.getEntityPath();
57  IElephantEntity iee = e.getEntity();
58  IElephantEntity iMain = e.getMainEntity();
59  boolean newMain = !iee.getStringId().equals(iMain.getStringId()) &&
60  !(lastIee != null && iMain.getStringId().equals(lastIee.getStringId())) &&
61  (lastMain == null || !iMain.getStringId().equals(lastMain.getStringId()));
62  if(newMain) {
63  lastEntity = null;
64  }
65  boolean newEntity = !current.equals(lastEntity);
66  if(newEntity) {
67  lastReason = null;
68  }
69  String reason = e.getReason();
70  boolean newReason = reason != null && !reason.equals(lastReason);
71  if(iee.canPublish(getContact()) && iee.canShowInContext(getContact(), e.getActivity())) {
72  marker.put("last", e);
73  marker.put("iee", iee);
74  marker.put("main", iMain.getStringId().equals(IElephantEntity.EMPTY_ID) ? null : iMain);
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);
80  lastMain = iMain;
81  lastEntity = current;
82  lastReason = reason;
83  lastIee = iee;
84  prepareValues(e, page);
85  marker.process(getTemplateRoot(), getSummaryTemplate(), getWriter());
86  }
87  }
88  }
Here is the call graph for this function:

◆ title()

String org.turro.jpa.content.LastActivityIterator.title ( IEntityLastActivity  e)
protected

Definition at line 107 of file LastActivityIterator.java.

107  {
108  return Entities.getController(e.getEntityPath()).getName();
109  }
Here is the call graph for this function:

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