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

Public Member Functions

void loadData () throws ServletException, IOException
 
void startConstruction () throws ServletException, IOException
 
String getStart ()
 
String getEnd ()
 
- Public Member Functions inherited from org.turro.elephant.impl.abstracts.AbstractElement
 AbstractElement ()
 
String getId ()
 
String getType ()
 
String getTitle ()
 
void setTitle (String title)
 
Collection< String > getMetas ()
 
void setMetas (Collection< String > metas)
 
ElContext getContext ()
 
IConstructor getConstructor ()
 
void setConfiguration (IConstructor constructor, ElContext context)
 
String getStartTitle ()
 
String getEndTitle ()
 
String getStartBody ()
 
String getEndBody ()
 
String getStartFooter ()
 
String getEndFooter ()
 
String getStartOption ()
 
String getEndOption ()
 
boolean canDisplay ()
 
boolean isSelectable ()
 
boolean isInRole ()
 
boolean canPrint ()
 
String getElementFolder ()
 
boolean isOriginalContext ()
 
void setRootCategories (ElContext root)
 
String getTypeName ()
 
AttributeSupport getAttributes ()
 
void applyChanges ()
 
void populateFromParent ()
 
void setDefaultMetas ()
 
void setConfiguration (Element conf, Element factory)
 

Protected Attributes

String sclass
 
int count
 
boolean allowInterest
 
Long item
 
Issue issue
 
IContact contact
 
- Protected Attributes inherited from org.turro.elephant.impl.abstracts.AbstractElement
IConstructor constructor
 
ElContext context
 
AttributeSupport attrSupport
 
Element conf = null
 
String[] types
 
String title
 
Collection< String > metas
 

Detailed Description

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

Definition at line 63 of file MyIssuesDashboard.java.

Member Function Documentation

◆ getEnd()

String org.turro.dossier.www.MyIssuesDashboard.getEnd ( )

Reimplemented from org.turro.elephant.impl.abstracts.AbstractElement.

Definition at line 214 of file MyIssuesDashboard.java.

214  {
215  return "</div>";
216  }
Here is the caller graph for this function:

◆ getStart()

String org.turro.dossier.www.MyIssuesDashboard.getStart ( )

Reimplemented from org.turro.elephant.impl.abstracts.AbstractElement.

Definition at line 209 of file MyIssuesDashboard.java.

209  {
210  return "<div class='" + sclass + "dossier-web'>";
211  }
Here is the caller graph for this function:

◆ loadData()

void org.turro.dossier.www.MyIssuesDashboard.loadData ( ) throws ServletException, IOException

This method loads element's data. It gets called within IConstructor.startConstruction() and before element's startConstruction() method.

Exceptions
javax.servlet.ServletException
java.io.IOException

Implements org.turro.elephant.context.IElement.

Definition at line 73 of file MyIssuesDashboard.java.

73  {
74  sclass = getAttributes().getAttributeValue("attrib:sclass", "");
75  count = getAttributes().getAttributeIntegerValue("attrib:count", 10);
76  allowInterest = getAttributes().getAttributeBooleanValue("attrib:allowInterest", true);
77  allowVotes = getAttributes().getAttributeBooleanValue("attrib:allowVotes", true);
78  showDescriptions = getAttributes().getAttributeBooleanValue("attrib:showDescriptions", true);
79  showFiles = getAttributes().getAttributeBooleanValue("attrib:showFiles", true);
80  showSubject = getAttributes().getAttributeBooleanValue("attrib:showSubject", true);
81  fullTemplate = getAttributes().getAttributeValue("attrib:fullTemplate", "");
82  summaryTemplate = getAttributes().getAttributeValue("attrib:summaryTemplate", "");
83  dossierPath = getAttributes().getAttributeValue("attrib:dossierPath", null);
84 
85  KeyValueMap kvm = MarkerHelper.getObfuscatedParameters();
86  if(kvm != null && !kvm.isEmpty() && kvm.containsKey("item")) {
87  item = kvm.get(Long.class, "item");
88  } else {
89  item = (Long) ObjectString.parseString(getConstructor().getParameter("item"), Long.class, true);
90  }
91 
92  if(item > 0) {
93  issue = new DossierPU().find(Issue.class, item);
94  }
95 
96  if(issue != null) {
98  } else {
99  item = 0L;
100  }
101 
102  contact = Authentication.getIContact();
103  }
Here is the call graph for this function:

◆ startConstruction()

void org.turro.dossier.www.MyIssuesDashboard.startConstruction ( ) throws ServletException, IOException

This method start element's construction. It gets called within IConstructor.startConstruction().

Exceptions
javax.servlet.ServletException
java.io.IOException

Implements org.turro.elephant.context.IElement.

Definition at line 106 of file MyIssuesDashboard.java.

106  {
107  PrintWriter out = getConstructor().getOut();
108  out.print(getStart());
109  out.print(getStartBody());
110 
111  ElephantMarker marker = new ElephantMarker(getConstructor());
112  if(!Strings.isBlank(dossierPath)) {
113  marker.put("dossierPath", ElephantContext.getRootWebPath() + dossierPath);
114  }
115  if(item > 0) {
116  prepareValues(marker, issue, 0);
117  IssueWrapper iw = new IssueWrapper(issue);
118  if(Application.getApplication().isInRole("issue:edit") || iw.isFullParticipant()) {
119  IssueStage stage = getStage(iw);
120  marker.put("stage", I_.byKey(stage.toString()));
121  marker.put("wrapper", iw);
122  marker.put("issue", issue);
123  marker.put("addInfo", AddInformationCtrl.addInformation(iw, getItemLink(issue, 0)));
124  marker.process("issue", getFullTemplate());
125  }
126  } else {
127  /*
128  List<IssueWrapper> iws = null;
129  */
130 
131  DaoHtmlSearch dhs = DaoHtmlSearch.getInstance(getConstructor(), ElephantContext.getContextVariable(getConstructor()));
132  String searchValue = null;
133  if(dhs != null) {
134  out.print(dhs.render(getConstructor()));
135  DaoSearchKey dsk = dhs.get("search-value");
136  if(dsk != null) {
137  searchValue = dsk.getValue();
138  }
139  }
140  WorkloadQuery wq = new WorkloadQuery(contact);
141  wq.setSearchValue(Strings.isBlank(searchValue) ? "*" : searchValue);
142  WorkloadSet ws = wq.getResults();
143  IssueStage stage = null;
144  int index = 0;
145  for(WorkloadItem wi : ws) {
146  IssueWrapper iw = wi.getWrapper();
147  marker.put("divider", index > 0);
148  marker.put("header", index == 0);
149  marker.put("footer", index == ws.size() - 1);
150  IssueStage current = WorkloadSet.getStage(wi);
151  if(!(current.equals(stage))) {
152  stage = current;
153  marker.put("newStage", true);
154  } else {
155  marker.put("newStage", false);
156  }
157  prepareValues(marker, iw.getIssue(), 0);
158  marker.put("stage", I_.byKey(current.toString()));
159  marker.put("wrapper", iw);
160  marker.put("issue", iw.getIssue());
161  marker.process("issue", getSummaryTemplate());
162  index++;
163  }
164  /*
165  if(iws == null || iws.isEmpty()) {
166  IssueResults ir = new IssueResults();
167  ir.setByParticipant(contact);
168  ir.setApplication(Application.getApplication());
169  if(!Strings.isBlank(searchValue)) {
170  ir.setIssueValue(searchValue);
171  }
172  iws = ir.getIssueList();
173  } else {
174  iws.addAll(WorksheetUtil.getNotIn(contact, iws));
175  }
176  IssueStage stage = null;
177  for(int i = 0; i < iws.size(); i++) {
178  IssueWrapper iw = iws.get(i);
179  marker.put("divider", i > 0);
180  marker.put("header", i == 0);
181  marker.put("footer", i == iws.size() - 1);
182  IssueStage current = getStage(iw);
183  if(!(current.equals(stage))) {
184  stage = current;
185  marker.put("newStage", true);
186  } else {
187  marker.put("newStage", false);
188  }
189  prepareValues(marker, iw.getIssue(), 0);
190  marker.put("stage", getConstructor().getString(current.toString()));
191  marker.put("wrapper", iw);
192  marker.put("issue", iw.getIssue());
193  marker.process("issue", getSummaryTemplate());
194  }
195  if(iws.isEmpty()) {
196  out.write("<h3>" + I_.get("Empty list") + "</h3>");
197  }
198  */
199  if(ws.isEmpty()) {
200  out.write("<h3>" + I_.get("Empty list") + "</h3>");
201  }
202  }
203 
204  out.print(getEndBody());
205  out.print(getEnd());
206  }
Here is the call graph for this function:

Member Data Documentation

◆ allowInterest

boolean org.turro.dossier.www.MyIssuesDashboard.allowInterest
protected

Definition at line 67 of file MyIssuesDashboard.java.

◆ contact

IContact org.turro.dossier.www.MyIssuesDashboard.contact
protected

Definition at line 70 of file MyIssuesDashboard.java.

◆ count

int org.turro.dossier.www.MyIssuesDashboard.count
protected

Definition at line 66 of file MyIssuesDashboard.java.

◆ issue

Issue org.turro.dossier.www.MyIssuesDashboard.issue
protected

Definition at line 69 of file MyIssuesDashboard.java.

◆ item

Long org.turro.dossier.www.MyIssuesDashboard.item
protected

Definition at line 68 of file MyIssuesDashboard.java.

◆ sclass

String org.turro.dossier.www.MyIssuesDashboard.sclass
protected

Definition at line 65 of file MyIssuesDashboard.java.


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