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

Public Member Functions

void startConstruction () throws ServletException, IOException
 
void setRootCategories (ElContext root)
 
- Public Member Functions inherited from org.turro.dashboard.AbstractDaoDashboard
void loadData () throws ServletException, IOException
 
DaoHtmlIterator getIterator ()
 
String getFullTemplate ()
 
String getSummaryTemplate ()
 
int getCount ()
 
boolean isAllowInterest ()
 
boolean isAllowComments ()
 
boolean isAllowVotes ()
 
boolean isAllowDescriptions ()
 
boolean isAllowAttachments ()
 
boolean isAllowFiles ()
 
boolean isAllowPolls ()
 
boolean isRestricted ()
 
boolean isAllowRanking ()
 
boolean isAllowMatching ()
 
boolean isAllowSorting ()
 
boolean isDoMatching ()
 
String getSclass ()
 
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 ()
 
String getTypeName ()
 
AttributeSupport getAttributes ()
 
void applyChanges ()
 
void populateFromParent ()
 
void setDefaultMetas ()
 
void setConfiguration (Element conf, Element factory)
 

Protected Member Functions

DaoHtmlIterator initIterator ()
 
void initSearchEngine ()
 
- Protected Member Functions inherited from org.turro.dashboard.AbstractDaoDashboard
DaoHtmlSearch getSearchEngine ()
 

Protected Attributes

String categoryTemplate
 
List< String > issueTypes
 
long categoryId
 
Category lastCategory = null
 
boolean showSubject
 
DossierIterator di
 
IssueIterator ii
 
CategoriesTree pi
 
- 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 41 of file DossierDashboard.java.

Member Function Documentation

◆ initIterator()

DaoHtmlIterator org.turro.dossier.www.DossierDashboard.initIterator ( )
protected

Reimplemented from org.turro.dashboard.AbstractDaoDashboard.

Definition at line 53 of file DossierDashboard.java.

53  {
54  categoryId = getAttributes().getAttributeIntegerValue("attrib:categoryId", 0);
55  dossierId = getAttributes().getAttributeIntegerValue("attrib:dossierId", 0);
56  // TYPE_DOSSIER,TYPE_PROPOSAL,TYPE_SECRET_PROPOSAL,TYPE_ELECTION,TYPE_SECRET_ELECTION,TYPE_PROJECT
57  dossierTypes = getAttributes().getAttributeListValue("attrib:dossierTypes", null);
58  // DOSSIER_OPENED,DOSSIER_CLOSED,DOSSIER_FROZEN
59  dossierStatus = getAttributes().getAttributeListValue("attrib:dossierStatus", null);
60  // PROJECT_IDEA,PROJECT_INCUBATOR,PROJECT_VOTING,PROJECT_DECIDING,PROJECT_OPPOSITING,PROJECT_VALIDATED,PROJECT_RESOLUTION;
61  projectPhases = getAttributes().getAttributeListValue("attrib:projectPhases", null);
62  // TYPE_DEFECT,TYPE_ENHANCEMENT,TYPE_FEATURE,TYPE_NONCONFORMITY,TYPE_PREVENTION,TYPE_TASK,TYPE_PATCH,TYPE_QUESTION,TYPE_DOCUMENT,TYPE_BESTPRACTICE
63  issueTypes = getAttributes().getAttributeListValue("attrib:issueTypes", "");
64  // STATUS_NEW,STATUS_STARTED,STATUS_INCOMPLETE,STATUS_REOPENED,STATUS_REUNION,STATUS_FROZEN,STATUS_RESOLVED,STATUS_VERIFIED,STATUS_CLOSED
65  issueStatus = getAttributes().getAttributeListValue("attrib:issueStatus", "");
66  allowedCategories = getAttributes().getAttributeValue("attrib:allowedCategories", "");
67  showSubject = getAttributes().getAttributeBooleanValue("attrib:showSubject", true);
68  onlyDossiers = getAttributes().getAttributeBooleanValue("attrib:onlyDossiers", false);
69  categoryTemplate = getAttributes().getAttributeValue("attrib:categoryTemplate", "");
70  phaseTemplate = getAttributes().getAttributeValue("attrib:phaseTemplate", "");
71  orderBy = getAttributes().getAttributeValue("attrib:orderBy", "ORDER_BY_CATEGORY_DOSSIER_ISSUE");
72  issuePath = getAttributes().getAttributeValue("attrib:issuePath", "");
73 
74  if(onlyDossiers) {
75  if(!Strings.isBlank(allowedCategories)) {
76  pi = new CategoriesTree(getConstructor(), getContext().getPath(), Authentication.getIContact(),
77  allowedCategories,
78  dossierTypes == null ? null : dossierTypes.toArray(new String[0]),
79  dossierStatus == null ? null : dossierStatus.toArray(new String[0]));
80  if(!Strings.isBlank(categoryTemplate)) {
82  }
84  pi.setAllowForum(true);
85  pi.fillTree("");
86  }
87  di = new DossierIterator(getConstructor(), getContext().getFullPath(), getId());
89  di.setDossierId(dossierId);
90  di.setDossierTypes(dossierTypes);
91  di.setDossierStatus(dossierStatus);
92  di.setProjectPhases(projectPhases);
93  di.setAllowedCategories(allowedCategories);
94  di.setIssuePath(issuePath);
95  return di;
96  } else {
97  ii = new IssueIterator(getConstructor(), getContext().getFullPath(), getId());
99  ii.setDossierId(dossierId);
100  ii.setDossierStatus(dossierStatus);
101  ii.setIssueStatus(issueStatus);
103  ii.setOrderBy(IssueOrdering.valueOf(orderBy));
104  return ii;
105  }
106  }
void setAllowedCategories(String allowedCategories)
void setProjectPhases(List< String > projectPhases)
void setDossierStatus(List< String > dossierStatus)
void setIssueStatus(List< String > issueStatus)
void setDossierStatus(List< String > dossierStatus)
void setOrderBy(IssueOrdering orderBy)
void setCategoryId(long categoryId)
void setIssueTypes(List< String > issueTypes)
void setFullTemplate(String fullTemplate)
void fillTree(String path)
Definition: DaoTree.java:45
Here is the call graph for this function:

◆ initSearchEngine()

void org.turro.dossier.www.DossierDashboard.initSearchEngine ( )
protected

Reimplemented from org.turro.dashboard.AbstractDaoDashboard.

Definition at line 109 of file DossierDashboard.java.

109  {
110  if(onlyDossiers) {
111  DaoHtmlSearch dhs = getSearchEngine();
112  if(dhs != null) {
113  dhs.setTagRoot("dossier");
114  dhs.setAttribute(getConstructor(), "phases", PhaseDefinitions.instance());
115  dhs.setAttribute(getConstructor(), "dossierCounter", new DossierCounter(allowedCategories, dossierTypes, dossierStatus, isRestricted()));
116  DaoSearchKey dsk = dhs.get("point-of-view");
117  if(dsk != null && Strings.isBlank(dsk.getValue())) {
118  dsk = new DaoSearchKey("point-of-view", "text");
119  dsk.setValue(isDoMatching() ? "1" : "0");
120  dhs.put("point-of-view", dsk);
121  }
122  if(dsk != null) {
123  if("1".equals(dsk.getValue())) {
124  dhs.setAttribute(getConstructor(), "variables", Indicators.getMatchingVariablesFinal("dossier"));
125  } else {
126  dhs.setAttribute(getConstructor(), "variables", Indicators.getRankingVariablesFinal("dossier"));
127  }
128  }
129  }
130  }
131  }
Here is the call graph for this function:

◆ setRootCategories()

void org.turro.dossier.www.DossierDashboard.setRootCategories ( ElContext  root)
Parameters
rootCategories root Calls

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

Definition at line 179 of file DossierDashboard.java.

179  {
180  // TYPE_DOSSIER,TYPE_PROPOSAL,TYPE_SECRET_PROPOSAL,TYPE_ELECTION,TYPE_SECRET_ELECTION,TYPE_PROJECT
181  dossierTypes = getAttributes().getAttributeListValue("attrib:dossierTypes", null);
182  // DOSSIER_OPENED,DOSSIER_CLOSED,DOSSIER_FROZEN
183  dossierStatus = getAttributes().getAttributeListValue("attrib:dossierStatus", null);
184  allowedCategories = getAttributes().getAttributeValue("attrib:allowedCategories", "");
185  onlyDossiers = getAttributes().getAttributeBooleanValue("attrib:onlyDossiers", false);
186  if(onlyDossiers) {
187  if(!Strings.isBlank(allowedCategories)) {
188  CategoriesTree catTree = new CategoriesTree(getConstructor(), root.getPath(), null,
189  allowedCategories,
190  dossierTypes == null ? null : dossierTypes.toArray(new String[0]),
191  dossierStatus == null ? null : dossierStatus.toArray(new String[0]));
192  catTree.setRestricted(isRestricted());
193  catTree.fillTree("");
194  root.generateCategoriesChildren(catTree, (t) -> {
195  return "?" + CategoriesTree.getSelectionLink(t.getPath());
196  });
197  }
198  }
199  }
Here is the call graph for this function:

◆ startConstruction()

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

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

Exceptions
javax.servlet.ServletException
java.io.IOException

Reimplemented from org.turro.dashboard.AbstractDaoDashboard.

Definition at line 134 of file DossierDashboard.java.

134  {
135  PrintWriter out = getConstructor().getOut();
136  out.print(getStart());
137  out.print(getStartBody());
138 
139  if(onlyDossiers) {
140  if(pi != null) {
141  if(!di.isItem()) {
148  }
150  }
151  if(!di.isItem()) {
152  DaoHtmlSearch dhs = getSearchEngine();
153  if(dhs != null) {
154  di.setSearchEngine(dhs);
155  }
156  if(!Strings.isBlank(phaseTemplate)) {
157  PhaseHtmlFilter phf = PhaseHtmlFilter.getInstance(getConstructor(), ElephantContext.getContextVariable(getConstructor()));
158  phf.setTemplate(phaseTemplate);
159  phf.setAllowedCategories(allowedCategories);
160  phf.setTypes(dossierTypes == null ? null : dossierTypes.toArray(new String[0]));
161  phf.setStatus(dossierStatus == null ? null : dossierStatus.toArray(new String[0]));
162  di.setPhaseFilter(phf);
163  }
164  }
165  di.render();
166  } else {
167  DaoHtmlSearch dhs = getSearchEngine();
168  if(dhs != null) {
169  ii.setSearchEngine(dhs);
170  }
171  ii.render();
172  }
173 
174  out.print(getEndBody());
175  out.print(getEnd());
176  }
void setPhaseFilter(PhaseHtmlFilter phaseFilter)
void setAllowDescriptions(boolean allowDescriptions)
void setNavigationTree(DaoHtmlTree navigationTree)
void setSearchEngine(DaoHtmlSearch searchEngine)
Here is the call graph for this function:

Member Data Documentation

◆ categoryId

long org.turro.dossier.www.DossierDashboard.categoryId
protected

Definition at line 45 of file DossierDashboard.java.

◆ categoryTemplate

String org.turro.dossier.www.DossierDashboard.categoryTemplate
protected

Definition at line 43 of file DossierDashboard.java.

◆ di

DossierIterator org.turro.dossier.www.DossierDashboard.di
protected

Definition at line 48 of file DossierDashboard.java.

◆ ii

IssueIterator org.turro.dossier.www.DossierDashboard.ii
protected

Definition at line 49 of file DossierDashboard.java.

◆ issueTypes

List<String> org.turro.dossier.www.DossierDashboard.issueTypes
protected

Definition at line 44 of file DossierDashboard.java.

◆ lastCategory

Category org.turro.dossier.www.DossierDashboard.lastCategory = null
protected

Definition at line 46 of file DossierDashboard.java.

◆ pi

CategoriesTree org.turro.dossier.www.DossierDashboard.pi
protected

Definition at line 50 of file DossierDashboard.java.

◆ showSubject

boolean org.turro.dossier.www.DossierDashboard.showSubject
protected

Definition at line 47 of file DossierDashboard.java.


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