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

Public Member Functions

 WorkloadContentIterator (IConstructor constructor, Writer writer, IContact contact, boolean mail, String pubPath)
 
boolean isShowSubject ()
 
void setShowSubject (boolean showSubject)
 
- Public Member Functions inherited from org.turro.jpa.content.EntityItemContentIterator< E, ID >
 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)
 
- Public Member Functions inherited from org.turro.collections.CollectionHtmlIterator< E, ID >
 CollectionHtmlIterator (List collection, ElephantMarker marker)
 
 CollectionHtmlIterator (List collection, ElephantMarker marker, Writer writer)
 
void setSummaryTemplate (String summaryTemplate)
 
String getSummaryTemplate ()
 
void setFullTemplate (String fullTemplate)
 
String getFullTemplate ()
 
boolean isNavigatorTop ()
 
void setNavigatorTop (boolean navigatorTop)
 
boolean isNavigatorBottom ()
 
void setNavigatorBottom (boolean navigatorBottom)
 
boolean isSearchOption ()
 
void setSearchOption (boolean searchOption)
 
boolean isForceSummary ()
 
void setForceSummary (boolean forceSummary)
 
boolean wantItem ()
 
boolean isItem ()
 
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 ()
 
boolean isEmpty ()
 
- Public Member Functions inherited from org.turro.collections.CollectionIterator< E, ID >
 CollectionIterator (List< E > collection)
 
int getPage ()
 
void setPage (int page)
 
void initClauses ()
 
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

void renderSummary (ElephantMarker marker, WorkloadItem e, int page)
 
void renderItem (ElephantMarker marker, WorkloadItem e, int page)
 
WorkloadItem entity (Long value)
 
boolean isValid (WorkloadItem e)
 
String title (WorkloadItem e)
 
Collection< String > metas (WorkloadItem e)
 
String getTemplateRoot ()
 
Object doVotesCtrl (WorkloadItem e)
 
Object doInterestCtrl (WorkloadItem e)
 
Object doCommentsCtrl (WorkloadItem e)
 
Object doAttachmentsCtrl (WorkloadItem e)
 
Object doFilesCtrl (WorkloadItem e)
 
Object doDescriptionsCtrl (WorkloadItem e)
 
Object doPollsCtrl (WorkloadItem e)
 
String getItemLink (WorkloadItem e)
 
String getReadAllLink ()
 
String getRestrictedLink ()
 
- Protected Member Functions inherited from org.turro.jpa.content.EntityItemContentIterator< E, ID >
void prepareControls (E entity, int page)
 
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.collections.CollectionHtmlIterator< E, ID >
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)
 
ID getIdentifier ()
 
void onRenderItem (E e)
 
boolean isValid (E e)
 
ID parseId (String value)
 
String stringId (ID value)
 

Additional Inherited Members

- Static Public Attributes inherited from org.turro.action.content.IContentIterator
static String PRELOAD_TMPL = "#preload"
 
- Protected Attributes inherited from org.turro.collections.CollectionHtmlIterator< E, ID >
HTMLHelper html
 
IConstructor constructor
 
ElephantMarker marker
 
- Protected Attributes inherited from org.turro.collections.CollectionIterator< E, ID >
List< E > items
 
int _total = -1
 

Detailed Description

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

Definition at line 58 of file WorkloadContentIterator.java.

Constructor & Destructor Documentation

◆ WorkloadContentIterator()

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

Definition at line 64 of file WorkloadContentIterator.java.

64  {
65  super(getWorkload(contact), constructor, writer, contact, mail, pubPath);
66  this.all = contact.getPermissions().isInRole("issue:all");
67  }
Here is the call graph for this function:

Member Function Documentation

◆ doAttachmentsCtrl()

Object org.turro.dossier.content.WorkloadContentIterator.doAttachmentsCtrl ( WorkloadItem  e)
protected

Definition at line 217 of file WorkloadContentIterator.java.

217  {
218  return Entities.getController(e.getIssue()).configureCtrl(
219  new AttachCtrl(constructor), getContact());
220  }
Here is the call graph for this function:

◆ doCommentsCtrl()

Object org.turro.dossier.content.WorkloadContentIterator.doCommentsCtrl ( WorkloadItem  e)
protected

Definition at line 211 of file WorkloadContentIterator.java.

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

◆ doDescriptionsCtrl()

Object org.turro.dossier.content.WorkloadContentIterator.doDescriptionsCtrl ( WorkloadItem  e)
protected

Definition at line 229 of file WorkloadContentIterator.java.

229  {
230  return Entities.getController(e.getIssue()).configureCtrl(
231  new DescribeItCtrl(constructor), getContact());
232  }
Here is the call graph for this function:

◆ doFilesCtrl()

Object org.turro.dossier.content.WorkloadContentIterator.doFilesCtrl ( WorkloadItem  e)
protected

Definition at line 223 of file WorkloadContentIterator.java.

223  {
224  return Entities.getController(e.getIssue()).configureCtrl(
225  new FileAttach(DossierPU.getObjectPath(e.getIssue())), getContact());
226  }
Here is the call graph for this function:

◆ doInterestCtrl()

Object org.turro.dossier.content.WorkloadContentIterator.doInterestCtrl ( WorkloadItem  e)
protected

Definition at line 205 of file WorkloadContentIterator.java.

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

◆ doPollsCtrl()

Object org.turro.dossier.content.WorkloadContentIterator.doPollsCtrl ( WorkloadItem  e)
protected

Definition at line 235 of file WorkloadContentIterator.java.

235  {
236  throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
237  }

◆ doVotesCtrl()

Object org.turro.dossier.content.WorkloadContentIterator.doVotesCtrl ( WorkloadItem  e)
protected

Definition at line 199 of file WorkloadContentIterator.java.

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

◆ entity()

WorkloadItem org.turro.dossier.content.WorkloadContentIterator.entity ( Long  value)
protected

Definition at line 98 of file WorkloadContentIterator.java.

98  {
99  for(WorkloadItem wi : collection) {
100  if(wi.getIssue().getId().equals(value)) {
101  return wi;
102  }
103  }
104  return null;
105  }

◆ getItemLink()

String org.turro.dossier.content.WorkloadContentIterator.getItemLink ( WorkloadItem  e)
protected

Definition at line 240 of file WorkloadContentIterator.java.

240  {
241  return getReadAllLink() + "?item=" + e.getIssue().getId();
242  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getReadAllLink()

String org.turro.dossier.content.WorkloadContentIterator.getReadAllLink ( )
protected

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

Definition at line 245 of file WorkloadContentIterator.java.

245  {
246  if(Strings.isBlank(getContextPath())) {
247  return getRestrictedLink();
248  }
249  return getContextPath();
250  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getRestrictedLink()

String org.turro.dossier.content.WorkloadContentIterator.getRestrictedLink ( )
protected

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

Definition at line 253 of file WorkloadContentIterator.java.

253  {
254  return "/user/myissues";
255  }
Here is the caller graph for this function:

◆ getTemplateRoot()

String org.turro.dossier.content.WorkloadContentIterator.getTemplateRoot ( )
protected

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

Definition at line 194 of file WorkloadContentIterator.java.

194  {
195  return isMail() ? "content/newsletter/sections/workload" : "issue";
196  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isShowSubject()

boolean org.turro.dossier.content.WorkloadContentIterator.isShowSubject ( )

Definition at line 69 of file WorkloadContentIterator.java.

69  {
70  return showSubject;
71  }

◆ isValid()

boolean org.turro.dossier.content.WorkloadContentIterator.isValid ( WorkloadItem  e)
protected

Definition at line 108 of file WorkloadContentIterator.java.

108  {
109  if(e != null) {
110  return all || e.getWrapper().isFullParticipant();
111  } else {
112  return super.isValid(e);
113  }
114  }
Here is the call graph for this function:

◆ metas()

Collection<String> org.turro.dossier.content.WorkloadContentIterator.metas ( WorkloadItem  e)
protected

Definition at line 169 of file WorkloadContentIterator.java.

169  {
170  ArrayList<RepositoryFile> files = new ArrayList<>();
171  String path = getItemLink(e);
172  if(!SocialImageMap.hasImage(path)) {
173  FileAttach fa = new FileAttach(DossierPU.getObjectPath(e));
174  Repository repository = fa.getPublishableRepository(constructor);
175  files.addAll(repository.getRepositoryFiles("*_social.png,*_social.jpg"));
176  files.addAll(repository.getRepositoryFiles("*.png,*.jpg"));
177  }
178  SocialNet sn = new SocialNet(path, e.getIssue().getDescription(), e.getIssue().getFullDescription(), files);
179  return sn.getMetas();
180  }
Here is the call graph for this function:

◆ renderItem()

void org.turro.dossier.content.WorkloadContentIterator.renderItem ( ElephantMarker  marker,
WorkloadItem  e,
int  page 
)
protected

Definition at line 91 of file WorkloadContentIterator.java.

Here is the call graph for this function:

◆ renderSummary()

void org.turro.dossier.content.WorkloadContentIterator.renderSummary ( ElephantMarker  marker,
WorkloadItem  e,
int  page 
)
protected

Definition at line 78 of file WorkloadContentIterator.java.

78  {
79  if(e != null) {
80  IssueStage current = WorkloadSet.getStage(e);
81  marker.put("workload", e);
82  marker.put("newStage", current != lastStage);
83  marker.put("stage", current);
84  lastStage = current;
85  prepareValues(e, page);
86  }
88  }
Here is the call graph for this function:

◆ setShowSubject()

void org.turro.dossier.content.WorkloadContentIterator.setShowSubject ( boolean  showSubject)

Definition at line 73 of file WorkloadContentIterator.java.

73  {
74  this.showSubject = showSubject;
75  }

◆ title()

String org.turro.dossier.content.WorkloadContentIterator.title ( WorkloadItem  e)
protected

Definition at line 161 of file WorkloadContentIterator.java.

161  {
162  if(!Strings.isBlank(e.getIssue().getFullDescription(showSubject))) {
163  return e.getIssue().getFullDescription(showSubject);
164  }
165  return null;
166  }
Here is the call graph for this function:

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