BrightSide Workbench Full Report + Source Code
org.turro.dossier.project.ProjectVisualElements Class Reference

Public Member Functions

 ProjectVisualElements (Dossier dossier)
 
boolean isShowLike ()
 
boolean isShowWorths ()
 
boolean isShowWorthsResults ()
 
boolean isShowMoveToOppositing ()
 
boolean isShowMoveToOppositingResults ()
 
boolean isShowOpenningDescriptors ()
 
boolean isEditOpenningDescriptors ()
 
boolean isShowClosingDescriptors ()
 
boolean isEditClosingDescriptors ()
 
boolean isShowFinalDescriptors ()
 
boolean isEditFinalDescriptors ()
 
boolean showDiscriminator (String discriminator)
 
boolean isShowBeneficiaries ()
 
boolean isShowOferers ()
 
boolean isShowSupportUsers ()
 
boolean isShowCoordinators ()
 
boolean isShowPatrons ()
 
boolean isShowOffers (Issue issue)
 
boolean isShowUploadOffer ()
 
boolean isShowAddDocsOffer (Issue issue)
 
boolean isShowOfferComments (Issue issue)
 
boolean isShowMilestones ()
 
boolean isShowReportIssue ()
 
boolean isShowAskParticipate ()
 
boolean isShowComments ()
 
boolean isShowDocuments ()
 
boolean isAdministrator ()
 
boolean isPatron ()
 
boolean isResponsibleOfComission ()
 
boolean isInComission ()
 
boolean isPartner ()
 
boolean isVisitor ()
 
boolean isParticipatesAs (String discriminator)
 
boolean isWiningOfferer ()
 
boolean isOwnWinOffer (Issue issue)
 
boolean isOwnOffer (Issue issue)
 

Detailed Description

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

Definition at line 38 of file ProjectVisualElements.java.

Constructor & Destructor Documentation

◆ ProjectVisualElements()

org.turro.dossier.project.ProjectVisualElements.ProjectVisualElements ( Dossier  dossier)

Definition at line 45 of file ProjectVisualElements.java.

45  {
46  this.dossier = dossier;
47  if(DossierType.TYPE_PROJECT.equals(dossier.getType())) {
48  this.project = dossier.getProject();
49  } else {
50  this.project = null;
51  }
52  this.contact = Authentication.getIContact();
53  }
Here is the call graph for this function:

Member Function Documentation

◆ isAdministrator()

boolean org.turro.dossier.project.ProjectVisualElements.isAdministrator ( )

Definition at line 223 of file ProjectVisualElements.java.

223  {
224  return checkContact() && contact.getSyndications().contains("contacts_admin");
225  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isEditClosingDescriptors()

boolean org.turro.dossier.project.ProjectVisualElements.isEditClosingDescriptors ( )

Definition at line 106 of file ProjectVisualElements.java.

106  {
107  if(project != null && EnumSet.of(ProjectPhase.PROJECT_RESOLUTION).contains(project.getPhase())) {
109  isParticipatesAs(context.getAttribute("Coordinator"));
110  }
111  return false;
112  }
Here is the call graph for this function:

◆ isEditFinalDescriptors()

boolean org.turro.dossier.project.ProjectVisualElements.isEditFinalDescriptors ( )

Definition at line 118 of file ProjectVisualElements.java.

118  {
119  if(project != null && EnumSet.of(ProjectPhase.PROJECT_RESOLUTION).contains(project.getPhase())) {
121  isParticipatesAs(context.getAttribute("Coordinator")) ||
122  isParticipatesAs(context.getAttribute("Beneficiary"));
123  }
124  return false;
125  }
Here is the call graph for this function:

◆ isEditOpenningDescriptors()

boolean org.turro.dossier.project.ProjectVisualElements.isEditOpenningDescriptors ( )

Definition at line 97 of file ProjectVisualElements.java.

97  {
99  isParticipatesAs(context.getAttribute("Coordinator"));
100  }
Here is the call graph for this function:

◆ isInComission()

boolean org.turro.dossier.project.ProjectVisualElements.isInComission ( )

Definition at line 235 of file ProjectVisualElements.java.

235  {
236  return checkContact() && dossier.getFullParticipants().isParticipant(contact);
237  }
ParticipantSet< IDossierParticipant > getFullParticipants()
Definition: Dossier.java:369
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isOwnOffer()

boolean org.turro.dossier.project.ProjectVisualElements.isOwnOffer ( Issue  issue)

Definition at line 269 of file ProjectVisualElements.java.

269  {
270  if(checkContact() && issue.getIssueParticipants().isReporter(contact)) {
271  return true;
272  }
273  return false;
274  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isOwnWinOffer()

boolean org.turro.dossier.project.ProjectVisualElements.isOwnWinOffer ( Issue  issue)

Definition at line 260 of file ProjectVisualElements.java.

260  {
261  if(checkContact() && issue.getIssueParticipants().isReporter(contact)) {
262  if(IssueResolution.RESOLUTION_FIXED.equals(issue.getResolution())) {
263  return true;
264  }
265  }
266  return false;
267  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isParticipatesAs()

boolean org.turro.dossier.project.ProjectVisualElements.isParticipatesAs ( String  discriminator)

Definition at line 247 of file ProjectVisualElements.java.

247  {
248  return checkContact() && dossier.getFullParticipants().isParticipantByDiscriminator(contact, discriminator);
249  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isPartner()

boolean org.turro.dossier.project.ProjectVisualElements.isPartner ( )

Definition at line 239 of file ProjectVisualElements.java.

239  {
240  return checkContact() && contact.getSyndications().contains("partner");
241  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isPatron()

boolean org.turro.dossier.project.ProjectVisualElements.isPatron ( )

Definition at line 227 of file ProjectVisualElements.java.

227  {
228  return checkContact() && contact.getSyndications().contains("patron");
229  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isResponsibleOfComission()

boolean org.turro.dossier.project.ProjectVisualElements.isResponsibleOfComission ( )

Definition at line 231 of file ProjectVisualElements.java.

231  {
232  return checkContact() && dossier.isDirectOwner(contact);
233  }
boolean isDirectOwner(IContact contact)
Definition: Dossier.java:531
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isShowAddDocsOffer()

boolean org.turro.dossier.project.ProjectVisualElements.isShowAddDocsOffer ( Issue  issue)

Definition at line 184 of file ProjectVisualElements.java.

184  {
185  if(project != null && EnumSet.of(ProjectPhase.PROJECT_OPPOSITING).contains(project.getPhase())) {
186  return isAdministrator() || isOwnOffer(issue);
187  }
188  if(project != null && EnumSet.of(ProjectPhase.PROJECT_VALIDATED).contains(project.getPhase())) {
189  return isAdministrator() || isOwnWinOffer(issue);
190  }
191  return false;
192  }
Here is the call graph for this function:

◆ isShowAskParticipate()

boolean org.turro.dossier.project.ProjectVisualElements.isShowAskParticipate ( )

Definition at line 209 of file ProjectVisualElements.java.

209  {
210  return !isVisitor();
211  }
Here is the call graph for this function:

◆ isShowBeneficiaries()

boolean org.turro.dossier.project.ProjectVisualElements.isShowBeneficiaries ( )

Definition at line 147 of file ProjectVisualElements.java.

147  {
148  return true;
149  }
Here is the caller graph for this function:

◆ isShowClosingDescriptors()

boolean org.turro.dossier.project.ProjectVisualElements.isShowClosingDescriptors ( )

Definition at line 102 of file ProjectVisualElements.java.

102  {
103  return true;
104  }

◆ isShowComments()

boolean org.turro.dossier.project.ProjectVisualElements.isShowComments ( )

Definition at line 213 of file ProjectVisualElements.java.

213  {
214  return !isVisitor();
215  }
Here is the call graph for this function:

◆ isShowCoordinators()

boolean org.turro.dossier.project.ProjectVisualElements.isShowCoordinators ( )

Definition at line 159 of file ProjectVisualElements.java.

159  {
160  return !isVisitor();
161  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isShowDocuments()

boolean org.turro.dossier.project.ProjectVisualElements.isShowDocuments ( )

Definition at line 217 of file ProjectVisualElements.java.

217  {
218  return !isVisitor();
219  }
Here is the call graph for this function:

◆ isShowFinalDescriptors()

boolean org.turro.dossier.project.ProjectVisualElements.isShowFinalDescriptors ( )

Definition at line 114 of file ProjectVisualElements.java.

114  {
115  return true;
116  }

◆ isShowLike()

boolean org.turro.dossier.project.ProjectVisualElements.isShowLike ( )

Definition at line 55 of file ProjectVisualElements.java.

55  {
56  if(project != null && EnumSet.of(ProjectPhase.PROJECT_IDEA, ProjectPhase.PROJECT_INCUBATOR).contains(project.getPhase())) {
57  return true;
58  }
59  return false;
60  }
Here is the call graph for this function:

◆ isShowMilestones()

boolean org.turro.dossier.project.ProjectVisualElements.isShowMilestones ( )

Definition at line 201 of file ProjectVisualElements.java.

201  {
202  return true;
203  }

◆ isShowMoveToOppositing()

boolean org.turro.dossier.project.ProjectVisualElements.isShowMoveToOppositing ( )

Definition at line 79 of file ProjectVisualElements.java.

79  {
80  if(project != null && EnumSet.of(ProjectPhase.PROJECT_DECIDING).contains(project.getPhase())) {
81  return isPatron();
82  }
83  return false;
84  }
Here is the call graph for this function:

◆ isShowMoveToOppositingResults()

boolean org.turro.dossier.project.ProjectVisualElements.isShowMoveToOppositingResults ( )

Definition at line 86 of file ProjectVisualElements.java.

86  {
87  if(project != null && EnumSet.of(ProjectPhase.PROJECT_DECIDING).contains(project.getPhase())) {
88  return isAdministrator();
89  }
90  return false;
91  }
Here is the call graph for this function:

◆ isShowOferers()

boolean org.turro.dossier.project.ProjectVisualElements.isShowOferers ( )

Definition at line 151 of file ProjectVisualElements.java.

151  {
152  return true;
153  }
Here is the caller graph for this function:

◆ isShowOfferComments()

boolean org.turro.dossier.project.ProjectVisualElements.isShowOfferComments ( Issue  issue)

Definition at line 194 of file ProjectVisualElements.java.

194  {
195  if(project != null && EnumSet.of(ProjectPhase.PROJECT_OPPOSITING).contains(project.getPhase())) {
196  return isAdministrator() || isResponsibleOfComission() || isOwnOffer(issue);
197  }
198  return false;
199  }
Here is the call graph for this function:

◆ isShowOffers()

boolean org.turro.dossier.project.ProjectVisualElements.isShowOffers ( Issue  issue)

Definition at line 167 of file ProjectVisualElements.java.

167  {
168  if(project != null && EnumSet.of(ProjectPhase.PROJECT_OPPOSITING, ProjectPhase.PROJECT_VALIDATED,
169  ProjectPhase.PROJECT_RESOLUTION).contains(project.getPhase())) {
170  return isAdministrator() || isResponsibleOfComission() || isOwnOffer(issue);
171  }
172  return false;
173  }
Here is the call graph for this function:

◆ isShowOpenningDescriptors()

boolean org.turro.dossier.project.ProjectVisualElements.isShowOpenningDescriptors ( )

Definition at line 93 of file ProjectVisualElements.java.

93  {
94  return true;
95  }

◆ isShowPatrons()

boolean org.turro.dossier.project.ProjectVisualElements.isShowPatrons ( )

Definition at line 163 of file ProjectVisualElements.java.

163  {
164  return false;
165  }
Here is the caller graph for this function:

◆ isShowReportIssue()

boolean org.turro.dossier.project.ProjectVisualElements.isShowReportIssue ( )

Definition at line 205 of file ProjectVisualElements.java.

205  {
206  return false;
207  }

◆ isShowSupportUsers()

boolean org.turro.dossier.project.ProjectVisualElements.isShowSupportUsers ( )

Definition at line 155 of file ProjectVisualElements.java.

155  {
156  return false;
157  }
Here is the caller graph for this function:

◆ isShowUploadOffer()

boolean org.turro.dossier.project.ProjectVisualElements.isShowUploadOffer ( )

Definition at line 175 of file ProjectVisualElements.java.

175  {
176  if(project != null && EnumSet.of(ProjectPhase.PROJECT_OPPOSITING).contains(project.getPhase())) {
177  return isAdministrator() || isParticipatesAs(context.getAttribute("Offerer"));
178 // (isParticipatesAs(context.getAttribute("Offerer")) &&
179 // (project.getOppositingEndDate() == null || new CheckDate(project.getOppositingEndDate()).addDays(1).getDate().after(new Date())));
180  }
181  return false;
182  }
Here is the call graph for this function:

◆ isShowWorths()

boolean org.turro.dossier.project.ProjectVisualElements.isShowWorths ( )

Definition at line 62 of file ProjectVisualElements.java.

62  {
63  if(project != null && EnumSet.of(ProjectPhase.PROJECT_VOTING).contains(project.getPhase())) {
64  return isPatron();
65  }
66  return false;
67  }
Here is the call graph for this function:

◆ isShowWorthsResults()

boolean org.turro.dossier.project.ProjectVisualElements.isShowWorthsResults ( )

Definition at line 69 of file ProjectVisualElements.java.

69  {
70  if(project != null && EnumSet.of(ProjectPhase.PROJECT_VOTING).contains(project.getPhase())) {
71  return isAdministrator();
72  }
73  if(project != null && EnumSet.of(ProjectPhase.PROJECT_DECIDING).contains(project.getPhase())) {
74  return isPatron() || isAdministrator();
75  }
76  return false;
77  }
Here is the call graph for this function:

◆ isVisitor()

boolean org.turro.dossier.project.ProjectVisualElements.isVisitor ( )

Definition at line 243 of file ProjectVisualElements.java.

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

◆ isWiningOfferer()

boolean org.turro.dossier.project.ProjectVisualElements.isWiningOfferer ( )

Definition at line 251 of file ProjectVisualElements.java.

251  {
252  for(Issue issue : dossier.getIssuesByGrouping(context.getAttribute("Offer"))) {
253  if(isOwnWinOffer(issue)) {
254  return true;
255  }
256  }
257  return false;
258  }
Collection< Issue > getIssuesByGrouping(String grouping)
Definition: Dossier.java:353
Here is the call graph for this function:
Here is the caller graph for this function:

◆ showDiscriminator()

boolean org.turro.dossier.project.ProjectVisualElements.showDiscriminator ( String  discriminator)

Definition at line 127 of file ProjectVisualElements.java.

127  {
128  if(!Strings.isBlank(discriminator)) {
129  if(discriminator.equals(context.getAttribute("Beneficiary"))) {
130  return isShowBeneficiaries();
131  } else if(discriminator.equals(context.getAttribute("Offerer"))) {
132  return isShowOferers();
133  } else if(discriminator.equals(context.getAttribute("Support"))) {
134  return isShowSupportUsers();
135  } else if(discriminator.equals(context.getAttribute("Coordinator"))) {
136  return isShowCoordinators();
137  } else if(discriminator.equals(context.getAttribute("Patron"))) {
138  return isShowPatrons();
139  } else {
140  return true;
141  }
142  } else {
143  return false;
144  }
145  }
Here is the call graph for this function:

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