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

Public Member Functions

 CategoryVisualElement (String name, CategoryVisualElements factory)
 
CategoryVisualElement setShowAllAttachments (Boolean showAllAttachments)
 
CategoryVisualElement setShowParticipants (Boolean showParticipants)
 
CategoryVisualElement setShowAllIssues (Boolean showAllIssues)
 
CategoryVisualElement setReceiveAllEmails (Boolean receiveAllEmails)
 
CategoryVisualElement setBindingVote (Boolean bindingVote)
 
CategoryVisualElement setDriver (Boolean driver)
 
CategoryVisualElement setCoordinator (Boolean coordinator)
 
CategoryVisualElement setBeneficiary (Boolean beneficiary)
 
CategoryVisualElement setOfferer (Boolean offerer)
 
CategoryVisualElement setResearch (Boolean research)
 
CategoryVisualElement setFunding (Boolean funding)
 
CategoryVisualElement setSupport (Boolean support)
 
CategoryVisualElement setDirectOwner (Boolean directOwner)
 
CategoryVisualElement setParticipates (Boolean participates)
 
CategoryVisualElement setBranchAdmin (Boolean branchAdmin)
 
CategoryVisualElement addRole (ParticipantRole role)
 
CategoryVisualElement addDiscriminator (String discriminator)
 
boolean isAdministrator (Category category, IContact contact)
 
boolean isPatron (IContact contact)
 
boolean isInComission (Category category, IContact contact)
 
boolean isPartner (IContact contact)
 
boolean participatesAs (Category Category, String discriminator, IContact contact)
 
boolean participates (Category category, IContact contact)
 
boolean isDirectOwner (Category category, IContact contact)
 
- Public Member Functions inherited from org.turro.visual.VisualElement< CategoryVisualElements, CategoryVisualElement, Category >
 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 checkEval (Category entity, IContact contact)
 
boolean checkAllMatch (Category entity, IContact contact)
 
boolean checkAnyMatch (Category entity, IContact contact)
 
- Protected Member Functions inherited from org.turro.visual.VisualElement< CategoryVisualElements, CategoryVisualElement, Category >
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 33 of file CategoryVisualElement.java.

Constructor & Destructor Documentation

◆ CategoryVisualElement()

org.turro.visual.CategoryVisualElement.CategoryVisualElement ( String  name,
CategoryVisualElements  factory 
)

Definition at line 41 of file CategoryVisualElement.java.

41  {
42  super(name, factory);
43  }

Member Function Documentation

◆ addDiscriminator()

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

Definition at line 129 of file CategoryVisualElement.java.

129  {
130  if(discriminators == null) {
131  discriminators = new HashSet<>();
132  }
133  discriminators.add(discriminator);
134  return this;
135  }

◆ addRole()

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

Definition at line 120 of file CategoryVisualElement.java.

120  {
121  if(roles == null) {
122  roles = EnumSet.of(role);
123  } else {
124  roles.add(role);
125  }
126  return this;
127  }

◆ checkAllMatch()

boolean org.turro.visual.CategoryVisualElement.checkAllMatch ( Category  entity,
IContact  contact 
)
protected

Definition at line 159 of file CategoryVisualElement.java.

159  {
160  return true;
161  }

◆ checkAnyMatch()

boolean org.turro.visual.CategoryVisualElement.checkAnyMatch ( Category  entity,
IContact  contact 
)
protected

Definition at line 164 of file CategoryVisualElement.java.

164  {
165  ParticipantSet dpl = entity.getFullParticipants();
166 
167  return checkRoles(dpl, contact) ||
168  checkDiscriminators(dpl, contact) ||
169  checkAttributes(dpl, contact) ||
170  checkDirectOwner(entity, contact) ||
171  checkBranchAdmin(entity, contact) ||
172  checkParticipates(dpl, contact);
173  }
Here is the call graph for this function:

◆ checkEval()

boolean org.turro.visual.CategoryVisualElement.checkEval ( Category  entity,
IContact  contact 
)
protected

Definition at line 148 of file CategoryVisualElement.java.

148  {
149  if(hasScript()) {
150  getScript().addMethodsFromClass(DossierFunctions.class);
151  getScript().addVariable("category", entity);
152  getScript().addVariable("dpl", entity.getFullParticipants());
153  return super.checkEval(entity, contact);
154  }
155  return false;
156  }
Here is the call graph for this function:

◆ emptyEntityConstraints()

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

Definition at line 138 of file CategoryVisualElement.java.

138  {
139  return roles == null && discriminators == null && participates == null &&
140  directOwner == null && branchAdmin == null && showAllAttachments == null &&
141  showParticipants == null && showAllIssues == null && receiveAllEmails == null &&
142  bindingVote == null && driver == null && coordinator == null &&
143  beneficiary == null && offerer == null && research == null &&
144  funding == null && support == null;
145  }

◆ isAdministrator()

boolean org.turro.visual.CategoryVisualElement.isAdministrator ( Category  category,
IContact  contact 
)

Definition at line 227 of file CategoryVisualElement.java.

227  {
228  return checkContact(contact) && category.isBranchAdmin(contact);
229  }
Here is the call graph for this function:

◆ isDirectOwner()

boolean org.turro.visual.CategoryVisualElement.isDirectOwner ( Category  category,
IContact  contact 
)

Definition at line 251 of file CategoryVisualElement.java.

251  {
252  return isNullOrFalse(directOwner) || (checkContact(contact) && category.isDirectOwner(contact));
253  }
Here is the call graph for this function:

◆ isInComission()

boolean org.turro.visual.CategoryVisualElement.isInComission ( Category  category,
IContact  contact 
)

Definition at line 235 of file CategoryVisualElement.java.

235  {
236  return checkContact(contact) && category.getFullParticipants().isParticipant(contact);
237  }
Here is the call graph for this function:

◆ isPartner()

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

Definition at line 239 of file CategoryVisualElement.java.

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

◆ isPatron()

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

Definition at line 231 of file CategoryVisualElement.java.

231  {
232  return checkContact(contact) && contact.getSyndications().contains("patron");
233  }
Here is the call graph for this function:

◆ participates()

boolean org.turro.visual.CategoryVisualElement.participates ( Category  category,
IContact  contact 
)

Definition at line 247 of file CategoryVisualElement.java.

247  {
248  return isNullOrFalse(participates) || (checkContact(contact) && category.getFullParticipants().isParticipant(contact));
249  }
Here is the call graph for this function:

◆ participatesAs()

boolean org.turro.visual.CategoryVisualElement.participatesAs ( Category  Category,
String  discriminator,
IContact  contact 
)

Definition at line 243 of file CategoryVisualElement.java.

243  {
244  return checkContact(contact) && Category.getFullParticipants().isParticipantByDiscriminator(contact, discriminator);
245  }
Here is the call graph for this function:

◆ setBeneficiary()

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

Definition at line 80 of file CategoryVisualElement.java.

80  {
81  this.beneficiary = beneficiary;
82  return this;
83  }

◆ setBindingVote()

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

Definition at line 65 of file CategoryVisualElement.java.

65  {
66  this.bindingVote = bindingVote;
67  return this;
68  }

◆ setBranchAdmin()

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

Definition at line 115 of file CategoryVisualElement.java.

115  {
116  this.branchAdmin = branchAdmin;
117  return this;
118  }

◆ setCoordinator()

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

Definition at line 75 of file CategoryVisualElement.java.

75  {
76  this.coordinator = coordinator;
77  return this;
78  }

◆ setDirectOwner()

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

Definition at line 105 of file CategoryVisualElement.java.

105  {
106  this.directOwner = directOwner;
107  return this;
108  }

◆ setDriver()

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

Definition at line 70 of file CategoryVisualElement.java.

70  {
71  this.driver = driver;
72  return this;
73  }

◆ setFunding()

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

Definition at line 95 of file CategoryVisualElement.java.

95  {
96  this.funding = funding;
97  return this;
98  }

◆ setOfferer()

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

Definition at line 85 of file CategoryVisualElement.java.

85  {
86  this.offerer = offerer;
87  return this;
88  }

◆ setParticipates()

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

Definition at line 110 of file CategoryVisualElement.java.

110  {
111  this.participates = participates;
112  return this;
113  }

◆ setReceiveAllEmails()

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

Definition at line 60 of file CategoryVisualElement.java.

60  {
61  this.receiveAllEmails = receiveAllEmails;
62  return this;
63  }

◆ setResearch()

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

Definition at line 90 of file CategoryVisualElement.java.

90  {
91  this.research = research;
92  return this;
93  }

◆ setShowAllAttachments()

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

Definition at line 45 of file CategoryVisualElement.java.

45  {
46  this.showAllAttachments = showAllAttachments;
47  return this;
48  }

◆ setShowAllIssues()

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

Definition at line 55 of file CategoryVisualElement.java.

55  {
56  this.showAllIssues = showAllIssues;
57  return this;
58  }

◆ setShowParticipants()

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

Definition at line 50 of file CategoryVisualElement.java.

50  {
51  this.showParticipants = showParticipants;
52  return this;
53  }

◆ setSupport()

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

Definition at line 100 of file CategoryVisualElement.java.

100  {
101  this.support = support;
102  return this;
103  }

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