BrightSide Workbench Full Report + Source Code
org.turro.visual.DossierVisualElement Class Reference
Inheritance diagram for org.turro.visual.DossierVisualElement:
Collaboration diagram for org.turro.visual.DossierVisualElement:

Public Member Functions

 DossierVisualElement (String name, DossierVisualElements factory)
 
DossierVisualElement setShowAllAttachments (Boolean showAllAttachments)
 
DossierVisualElement setShowParticipants (Boolean showParticipants)
 
DossierVisualElement setShowAllIssues (Boolean showAllIssues)
 
DossierVisualElement setReceiveAllEmails (Boolean receiveAllEmails)
 
DossierVisualElement setBindingVote (Boolean bindingVote)
 
DossierVisualElement setDriver (Boolean driver)
 
DossierVisualElement setCoordinator (Boolean coordinator)
 
DossierVisualElement setBeneficiary (Boolean beneficiary)
 
DossierVisualElement setOfferer (Boolean offerer)
 
DossierVisualElement setResearch (Boolean research)
 
DossierVisualElement setFunding (Boolean funding)
 
DossierVisualElement setSupport (Boolean support)
 
DossierVisualElement setDirectOwner (Boolean directOwner)
 
DossierVisualElement setParticipates (Boolean participates)
 
DossierVisualElement setBranchAdmin (Boolean branchAdmin)
 
DossierVisualElement addPhase (int phase)
 
DossierVisualElement addPhaseType (PhaseType type)
 
DossierVisualElement addRole (ParticipantRole role)
 
DossierVisualElement addDiscriminator (String discriminator)
 
boolean isAdministrator (Dossier dossier, IContact contact)
 
boolean isPatron (IContact contact)
 
boolean isInComission (Dossier dossier, IContact contact)
 
boolean isPartner (IContact contact)
 
boolean participatesAs (Dossier dossier, String discriminator, IContact contact)
 
boolean participates (Dossier dossier, IContact contact)
 
boolean isDirectOwner (Dossier dossier, IContact contact)
 
boolean isOwnReporter (Issue issue, IContact contact)
 
boolean isWinReporter (Issue issue, IContact contact)
 
boolean isOwnResponsible (Issue issue, IContact contact)
 
boolean isWinResponsible (Issue issue, IContact contact)
 
boolean canShowOffer (Issue issue, IContact contact)
 
boolean canShowAddDocsOffer (Issue issue, IContact contact)
 
boolean canShowUploadOffer (Dossier dossier, IContact contact)
 
Collection< IssuegetIssuesByType (Dossier dossier, String type)
 
boolean canShowOffer (Dossier dossier, IContact contact)
 
boolean canAddWorkingOffer (Dossier dossier, IContact contact)
 
boolean canAddFinalOffer (Dossier dossier, IContact contact)
 
boolean canCreateOffer (Dossier dossier, IContact contact)
 
- Public Member Functions inherited from org.turro.visual.VisualElement< DossierVisualElements, DossierVisualElement, Dossier >
 VisualElement (String name, F factory)
 
getParent ()
 
void setParent (V parent)
 
boolean check (E entity, IContact contact)
 
String getName ()
 
String getLabel ()
 
int getOrder ()
 
boolean allows (String name, E entity, IContact contact)
 
VisualElement getElement (String name)
 
VisualElement getElement (String name, E entity, IContact contact)
 
getSubElements ()
 
setName (String name)
 
setLabel (String label)
 
setOrder (int order)
 
setRole (String role)
 
setAdmin (Boolean admin)
 
setWorker (Boolean worker)
 
setStudent (Boolean student)
 
setHHRR (Boolean hhrr)
 
setVisitor (Boolean visitor)
 
addSyndication (String syndication)
 
addGrouping (String grouping)
 
addBusinessSyndication (String syndication)
 
addBusinessGrouping (String grouping)
 
boolean isVisitor (E entity, IContact contact)
 
int compareTo (VisualElement o)
 
int hashCode ()
 
boolean equals (Object obj)
 

Protected Member Functions

boolean emptyEntityConstraints ()
 
boolean checkAllMatch (Dossier entity, IContact contact)
 
boolean checkAnyMatch (Dossier entity, IContact contact)
 
boolean checkEval (Dossier entity, IContact contact)
 
- Protected Member Functions inherited from org.turro.visual.VisualElement< DossierVisualElements, DossierVisualElement, Dossier >
addSubElement (String name)
 
boolean checkConstraints (E entity, IContact contact)
 
boolean emptyConstraints ()
 
boolean checkEval (E entity, IContact contact)
 
boolean checkContact (IContact contact)
 
boolean isNullOrFalse (Boolean value)
 
abstract boolean emptyEntityConstraints ()
 
abstract boolean checkAllMatch (E entity, IContact contact)
 
abstract boolean checkAnyMatch (E entity, IContact contact)
 
boolean hasScript ()
 
Script getScript ()
 

Detailed Description

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

Definition at line 38 of file DossierVisualElement.java.

Constructor & Destructor Documentation

◆ DossierVisualElement()

org.turro.visual.DossierVisualElement.DossierVisualElement ( String  name,
DossierVisualElements  factory 
)

Definition at line 48 of file DossierVisualElement.java.

48  {
49  super(name, factory);
50  }

Member Function Documentation

◆ addDiscriminator()

DossierVisualElement org.turro.visual.DossierVisualElement.addDiscriminator ( String  discriminator)

Definition at line 155 of file DossierVisualElement.java.

155  {
156  if(discriminators == null) {
157  discriminators = new HashSet<>();
158  }
159  discriminators.add(discriminator);
160  return this;
161  }

◆ addPhase()

DossierVisualElement org.turro.visual.DossierVisualElement.addPhase ( int  phase)

Definition at line 127 of file DossierVisualElement.java.

127  {
128  if(phase > -1) {
129  if(phases == null) {
130  phases = new HashSet<>();
131  }
132  phases.add(phase);
133  }
134  return this;
135  }

◆ addPhaseType()

DossierVisualElement org.turro.visual.DossierVisualElement.addPhaseType ( PhaseType  type)

Definition at line 137 of file DossierVisualElement.java.

137  {
138  if(phaseTypes == null) {
139  phaseTypes = EnumSet.of(type);
140  } else {
141  phaseTypes.add(type);
142  }
143  return this;
144  }

◆ addRole()

DossierVisualElement org.turro.visual.DossierVisualElement.addRole ( ParticipantRole  role)

Definition at line 146 of file DossierVisualElement.java.

146  {
147  if(roles == null) {
148  roles = EnumSet.of(role);
149  } else {
150  roles.add(role);
151  }
152  return this;
153  }

◆ canAddFinalOffer()

boolean org.turro.visual.DossierVisualElement.canAddFinalOffer ( Dossier  dossier,
IContact  contact 
)

Definition at line 349 of file DossierVisualElement.java.

349  {
350  if((getSubElements() != null && getSubElements().getElement("Final Documents", dossier, contact) != null)) {
351  return true;
352  }
353  return false;
354  }
Here is the call graph for this function:

◆ canAddWorkingOffer()

boolean org.turro.visual.DossierVisualElement.canAddWorkingOffer ( Dossier  dossier,
IContact  contact 
)

Definition at line 342 of file DossierVisualElement.java.

342  {
343  if((getSubElements() != null && getSubElements().getElement("Working Documents", dossier, contact) != null)) {
344  return true;
345  }
346  return false;
347  }
Here is the call graph for this function:

◆ canCreateOffer()

boolean org.turro.visual.DossierVisualElement.canCreateOffer ( Dossier  dossier,
IContact  contact 
)

Definition at line 356 of file DossierVisualElement.java.

356  {
357  if(getSubElements() != null && getSubElements().getElement("Upload Offer", dossier, contact) != null) {
358  return true;
359  }
360  return false;
361  }
Here is the call graph for this function:

◆ canShowAddDocsOffer()

boolean org.turro.visual.DossierVisualElement.canShowAddDocsOffer ( Issue  issue,
IContact  contact 
)

Definition at line 313 of file DossierVisualElement.java.

313  {
314  if((getSubElements() != null && getSubElements().getElement("Working Documents", issue.getDossier(), contact) != null) ||
315  isOwnReporter(issue, contact)) {
316  return true;
317  }
318  if((getSubElements() != null && getSubElements().getElement("Final Documents", issue.getDossier(), contact) != null) ||
319  isWinReporter(issue, contact)) {
320  return true;
321  }
322  return false;
323  }
boolean isWinReporter(Issue issue, IContact contact)
boolean isOwnReporter(Issue issue, IContact contact)
Here is the call graph for this function:

◆ canShowOffer() [1/2]

boolean org.turro.visual.DossierVisualElement.canShowOffer ( Dossier  dossier,
IContact  contact 
)

Definition at line 338 of file DossierVisualElement.java.

338  {
339  return (getSubElements() != null && getSubElements().getElement("Offer", dossier, contact) != null);
340  }
Here is the call graph for this function:

◆ canShowOffer() [2/2]

boolean org.turro.visual.DossierVisualElement.canShowOffer ( Issue  issue,
IContact  contact 
)

Definition at line 308 of file DossierVisualElement.java.

308  {
309  return (getSubElements() != null && getSubElements().getElement("Offer", issue.getDossier(), contact) != null) ||
310  isOwnReporter(issue, contact);
311  }
Here is the call graph for this function:

◆ canShowUploadOffer()

boolean org.turro.visual.DossierVisualElement.canShowUploadOffer ( Dossier  dossier,
IContact  contact 
)

Definition at line 325 of file DossierVisualElement.java.

325  {
326  if(getSubElements() != null && getSubElements().getElement("Upload Offer", dossier, contact) != null) {
327  return true;
328  }
329  return false;
330  }
Here is the call graph for this function:

◆ checkAllMatch()

boolean org.turro.visual.DossierVisualElement.checkAllMatch ( Dossier  entity,
IContact  contact 
)
protected

Definition at line 174 of file DossierVisualElement.java.

174  {
175  return entity.getProject() == null || (
176  (phases == null || phases.contains(entity.getProject().getPhase())) &&
177  (phaseTypes == null || entity.getProject().getPhaseDefinition().anyTypeMatch(phaseTypes)));
178  }
Here is the call graph for this function:

◆ checkAnyMatch()

boolean org.turro.visual.DossierVisualElement.checkAnyMatch ( Dossier  entity,
IContact  contact 
)
protected

Definition at line 181 of file DossierVisualElement.java.

181  {
182  ParticipantSet dpl = entity.getFullParticipants();
183 
184  return checkRoles(dpl, contact) ||
185  checkDiscriminators(dpl, contact) ||
186  checkAttributes(dpl, contact) ||
187  checkDirectOwner(entity, contact) ||
188  checkBranchAdmin(entity, contact) ||
189  checkParticipates(dpl, contact);
190  }
Here is the call graph for this function:

◆ checkEval()

boolean org.turro.visual.DossierVisualElement.checkEval ( Dossier  entity,
IContact  contact 
)
protected

Definition at line 193 of file DossierVisualElement.java.

193  {
194  if(hasScript()) {
195  getScript().addVariable("dossier", entity);
196  getScript().addVariable("dpl", entity.getFullParticipants());
197  return super.checkEval(entity, contact);
198  }
199  return false;
200  }
Here is the call graph for this function:

◆ emptyEntityConstraints()

boolean org.turro.visual.DossierVisualElement.emptyEntityConstraints ( )
protected

Definition at line 164 of file DossierVisualElement.java.

164  {
165  return roles == null && discriminators == null && participates == null &&
166  directOwner == null && branchAdmin == null && showAllAttachments == null &&
167  showParticipants == null && showAllIssues == null && receiveAllEmails == null &&
168  bindingVote == null && driver == null && coordinator == null &&
169  beneficiary == null && offerer == null && research == null &&
170  funding == null && support == null;
171  }

◆ getIssuesByType()

Collection<Issue> org.turro.visual.DossierVisualElement.getIssuesByType ( Dossier  dossier,
String  type 
)

Definition at line 332 of file DossierVisualElement.java.

332  {
333  return dossier.getIssuesByType(IssueType.valueOf(type));
334  }
Here is the call graph for this function:

◆ isAdministrator()

boolean org.turro.visual.DossierVisualElement.isAdministrator ( Dossier  dossier,
IContact  contact 
)

Definition at line 254 of file DossierVisualElement.java.

254  {
255  return checkContact(contact) && dossier.isBranchAdmin(contact);
256  }
Here is the call graph for this function:

◆ isDirectOwner()

boolean org.turro.visual.DossierVisualElement.isDirectOwner ( Dossier  dossier,
IContact  contact 
)

Definition at line 278 of file DossierVisualElement.java.

278  {
279  return isNullOrFalse(directOwner) || (checkContact(contact) && dossier.isDirectOwner(contact));
280  }
Here is the call graph for this function:

◆ isInComission()

boolean org.turro.visual.DossierVisualElement.isInComission ( Dossier  dossier,
IContact  contact 
)

Definition at line 262 of file DossierVisualElement.java.

262  {
263  return checkContact(contact) && dossier.getFullParticipants().isParticipant(contact);
264  }
Here is the call graph for this function:

◆ isOwnReporter()

boolean org.turro.visual.DossierVisualElement.isOwnReporter ( Issue  issue,
IContact  contact 
)

Definition at line 282 of file DossierVisualElement.java.

282  {
283  return checkContact(contact) && issue.getIssueParticipants().isReporter(contact);
284  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isOwnResponsible()

boolean org.turro.visual.DossierVisualElement.isOwnResponsible ( Issue  issue,
IContact  contact 
)

Definition at line 295 of file DossierVisualElement.java.

295  {
296  return checkContact(contact) && issue.getIssueParticipants().isResponsible(contact);
297  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isPartner()

boolean org.turro.visual.DossierVisualElement.isPartner ( IContact  contact)

Definition at line 266 of file DossierVisualElement.java.

266  {
267  return checkContact(contact) && contact.getSyndications().contains("partner");
268  }
Here is the call graph for this function:

◆ isPatron()

boolean org.turro.visual.DossierVisualElement.isPatron ( IContact  contact)

Definition at line 258 of file DossierVisualElement.java.

258  {
259  return checkContact(contact) && contact.getSyndications().contains("patron");
260  }
Here is the call graph for this function:

◆ isWinReporter()

boolean org.turro.visual.DossierVisualElement.isWinReporter ( Issue  issue,
IContact  contact 
)

Definition at line 286 of file DossierVisualElement.java.

286  {
287  if(isOwnReporter(issue, contact)) {
288  if(IssueResolution.RESOLUTION_FIXED.equals(issue.getResolution())) {
289  return true;
290  }
291  }
292  return false;
293  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isWinResponsible()

boolean org.turro.visual.DossierVisualElement.isWinResponsible ( Issue  issue,
IContact  contact 
)

Definition at line 299 of file DossierVisualElement.java.

299  {
300  if(isOwnResponsible(issue, contact)) {
301  if(IssueResolution.RESOLUTION_FIXED.equals(issue.getResolution())) {
302  return true;
303  }
304  }
305  return false;
306  }
boolean isOwnResponsible(Issue issue, IContact contact)
Here is the call graph for this function:

◆ participates()

boolean org.turro.visual.DossierVisualElement.participates ( Dossier  dossier,
IContact  contact 
)

Definition at line 274 of file DossierVisualElement.java.

274  {
275  return isNullOrFalse(participates) || (checkContact(contact) && dossier.getFullParticipants().isParticipant(contact));
276  }
Here is the call graph for this function:

◆ participatesAs()

boolean org.turro.visual.DossierVisualElement.participatesAs ( Dossier  dossier,
String  discriminator,
IContact  contact 
)

Definition at line 270 of file DossierVisualElement.java.

270  {
271  return checkContact(contact) && dossier.getFullParticipants().isParticipantByDiscriminator(contact, discriminator);
272  }
Here is the call graph for this function:

◆ setBeneficiary()

DossierVisualElement org.turro.visual.DossierVisualElement.setBeneficiary ( Boolean  beneficiary)

Definition at line 87 of file DossierVisualElement.java.

87  {
88  this.beneficiary = beneficiary;
89  return this;
90  }

◆ setBindingVote()

DossierVisualElement org.turro.visual.DossierVisualElement.setBindingVote ( Boolean  bindingVote)

Definition at line 72 of file DossierVisualElement.java.

72  {
73  this.bindingVote = bindingVote;
74  return this;
75  }

◆ setBranchAdmin()

DossierVisualElement org.turro.visual.DossierVisualElement.setBranchAdmin ( Boolean  branchAdmin)

Definition at line 122 of file DossierVisualElement.java.

122  {
123  this.branchAdmin = branchAdmin;
124  return this;
125  }

◆ setCoordinator()

DossierVisualElement org.turro.visual.DossierVisualElement.setCoordinator ( Boolean  coordinator)

Definition at line 82 of file DossierVisualElement.java.

82  {
83  this.coordinator = coordinator;
84  return this;
85  }

◆ setDirectOwner()

DossierVisualElement org.turro.visual.DossierVisualElement.setDirectOwner ( Boolean  directOwner)

Definition at line 112 of file DossierVisualElement.java.

112  {
113  this.directOwner = directOwner;
114  return this;
115  }

◆ setDriver()

DossierVisualElement org.turro.visual.DossierVisualElement.setDriver ( Boolean  driver)

Definition at line 77 of file DossierVisualElement.java.

77  {
78  this.driver = driver;
79  return this;
80  }

◆ setFunding()

DossierVisualElement org.turro.visual.DossierVisualElement.setFunding ( Boolean  funding)

Definition at line 102 of file DossierVisualElement.java.

102  {
103  this.funding = funding;
104  return this;
105  }

◆ setOfferer()

DossierVisualElement org.turro.visual.DossierVisualElement.setOfferer ( Boolean  offerer)

Definition at line 92 of file DossierVisualElement.java.

92  {
93  this.offerer = offerer;
94  return this;
95  }

◆ setParticipates()

DossierVisualElement org.turro.visual.DossierVisualElement.setParticipates ( Boolean  participates)

Definition at line 117 of file DossierVisualElement.java.

117  {
118  this.participates = participates;
119  return this;
120  }

◆ setReceiveAllEmails()

DossierVisualElement org.turro.visual.DossierVisualElement.setReceiveAllEmails ( Boolean  receiveAllEmails)

Definition at line 67 of file DossierVisualElement.java.

67  {
68  this.receiveAllEmails = receiveAllEmails;
69  return this;
70  }

◆ setResearch()

DossierVisualElement org.turro.visual.DossierVisualElement.setResearch ( Boolean  research)

Definition at line 97 of file DossierVisualElement.java.

97  {
98  this.research = research;
99  return this;
100  }

◆ setShowAllAttachments()

DossierVisualElement org.turro.visual.DossierVisualElement.setShowAllAttachments ( Boolean  showAllAttachments)

Definition at line 52 of file DossierVisualElement.java.

52  {
53  this.showAllAttachments = showAllAttachments;
54  return this;
55  }

◆ setShowAllIssues()

DossierVisualElement org.turro.visual.DossierVisualElement.setShowAllIssues ( Boolean  showAllIssues)

Definition at line 62 of file DossierVisualElement.java.

62  {
63  this.showAllIssues = showAllIssues;
64  return this;
65  }

◆ setShowParticipants()

DossierVisualElement org.turro.visual.DossierVisualElement.setShowParticipants ( Boolean  showParticipants)

Definition at line 57 of file DossierVisualElement.java.

57  {
58  this.showParticipants = showParticipants;
59  return this;
60  }

◆ setSupport()

DossierVisualElement org.turro.visual.DossierVisualElement.setSupport ( Boolean  support)

Definition at line 107 of file DossierVisualElement.java.

107  {
108  this.support = support;
109  return this;
110  }

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