19 package org.turro.dossier.dossier;
21 import java.util.ArrayList;
22 import java.util.Collection;
23 import java.util.HashSet;
25 import java.util.TreeSet;
26 import java.util.function.Predicate;
27 import org.turro.string.Strings;
28 import org.turro.auth.Authentication;
29 import org.turro.dossier.entity.Category;
30 import org.turro.dossier.entity.CategoryParticipant;
31 import org.turro.dossier.entity.Dossier;
32 import org.turro.dossier.entity.IDossierParticipant;
33 import org.turro.dossier.entity.Participant;
34 import org.turro.dossier.entity.ParticipantRole;
35 import org.turro.plugin.contacts.ContactList;
36 import org.turro.plugin.contacts.IContact;
37 import org.turro.visual.RoleUtil;
49 while(category !=
null) {
73 if(dp.
getRole().equals(participation) && dp.
getIdContact().equals(getContact(contact).getId())) {
96 if(dp !=
null && !Strings.isBlank(discriminator) && discriminator.equalsIgnoreCase(dp.
getDiscriminator())
105 Set<String> discriminators =
new TreeSet<>();
106 for(Object obj :
this) {
113 return discriminators;
119 if((Strings.isBlank(discriminator) && Strings.isBlank(dp.
getDiscriminator())) ||
121 participants.add(dp);
128 HashSet<String>
set =
new HashSet<>();
140 list.
add(dp.getIContact());
187 return getIDrivers().contains(getContact(contact));
203 return getISupport().contains(getContact(contact));
207 return getIFunding().contains(getContact(contact));
215 return getIAdmins().contains(getContact(contact));
287 this.stream().filter((dp) -> (whatIs.test(dp))).forEachOrdered((dp) -> {
288 list.
add(dp.getIContact());
361 ArrayList list =
new ArrayList();
362 this.stream().filter((dp) -> (whatIs.test(dp))).forEachOrdered((dp) -> {
373 if(contact !=
null) {
376 if(_contact ==
null) {
377 _contact = Authentication.getIContact();
boolean isAssistant(IContact contact)
boolean isShowAllIssues(IContact contact)
Collection< String > getDiscriminators()
Collection< IContact > getIAssistants()
String getDiscriminator(IContact contact)
Collection< IDossierParticipant > getShowAllAttachments()
Collection< IDossierParticipant > getAdmins()
boolean isDossierParticipant(IContact contact)
Collection< IContact > getIOwners()
boolean isReceiveAllEmails(IContact contact)
Collection< IContact > getICoordinators()
IDossierParticipant getParticipation(IContact contact)
Collection< IDossierParticipant > getOwners()
boolean isDriver(IContact contact)
Collection< IDossierParticipant > getCoordinators()
Collection< IContact > getIBeneficiaries()
Collection< IContact > getIShowAllIssues()
Collection< IDossierParticipant > getReceiveAllEmails()
Collection< IDossierParticipant > getOfferers()
Collection< IDossierParticipant > getShowAllIssues()
Collection< IDossierParticipant > getAssistants()
Collection< IDossierParticipant > getBeneficiaries()
Collection< IDossierParticipant > getParticipantsByDiscriminator(String discriminator)
DossierParticipationsList(Dossier dossier)
boolean isShowParticipants(IContact contact)
boolean isParticipant(IContact contact)
Collection< IDossierParticipant > getSubjects()
Collection< IContact > getIShowParticipants()
Collection< IDossierParticipant > getDrivers()
boolean isRole(IContact contact, ParticipantRole role)
boolean isBeneficiary(IContact contact)
Collection< IDossierParticipant > getResearch()
Collection< IContact > getIAdmins()
Collection< IDossierParticipant > getSupport()
boolean isParticipantByDiscriminator(IContact contact, String discriminator)
Collection< IContact > getIResearch()
Collection< IContact > getIContactsByFunction(Predicate whatIs)
boolean isFunding(IContact contact)
boolean isOfferer(IContact contact)
boolean isSubject(IContact contact)
Collection< IContact > getIParticipants()
Collection< IDossierParticipant > getShowParticipants()
boolean isBindingVote(IContact contact)
Collection< IDossierParticipant > getFunding()
Collection< IContact > getISupport()
Collection< IContact > getIFunding()
boolean isShowAllAttachments(IContact contact)
boolean isCoordinator(IContact contact)
IDossierParticipant participatesAs(IContact contact, ParticipantRole participation)
boolean isCategoryParticipant(IContact contact)
Collection< IContact > getIDrivers()
boolean isSupport(IContact contact)
boolean isResearch(IContact contact)
Collection< IContact > getISubjects()
Collection< IContact > getIShowAllAttachments()
HashSet< String > getParticipationStrings(IContact contact)
boolean isAdmin(IContact contact)
Collection< IContact > getIBidingVote()
Collection< IContact > getIReceiveAllEmails()
Collection< IDossierParticipant > getByFunction(Predicate whatIs)
Collection< IContact > getIOfferers()
Collection< IDossierParticipant > getBidingVote()
boolean isOwner(IContact contact)
Set< CategoryParticipant > getParticipants()
Set< Participant > getParticipants()
static HashSet< String > getStringRoles(IDossierParticipant dp)
boolean isShowParticipants()
boolean isShowAllIssues()
boolean isShowAllAttachments()
String getDiscriminator()
ParticipantRole getRole()
boolean isReceiveAllEmails()