18 package org.turro.dossier.dossier;
20 import java.util.ArrayList;
21 import java.util.List;
22 import org.turro.auth.Authentication;
23 import org.turro.dossier.db.DossierPU;
24 import org.turro.dossier.entity.Category;
25 import org.turro.dossier.entity.IDossierParticipant;
26 import org.turro.dossier.entity.ParticipantRole;
27 import org.turro.jpa.Dao;
28 import org.turro.jpa.entity.EntityCollections;
29 import org.turro.plugin.contacts.IContact;
37 private List<ParticipantRole> role;
43 this.category = category;
60 if(category ==
null)
return false;
61 return getRole() !=
null && !getRole().isEmpty();
65 if(category ==
null)
return false;
70 if(category ==
null)
return false;
75 if(category ==
null)
return false;
81 List l = dao.getResultList(
82 "select d from Dossier d where d.category = ?",
83 new Object[] { category });
87 l = dao.getResultList(
88 "select c from Category c where c.parent = ?",
89 new Object[] { category });
96 public void delete() {
107 if(p.getIdContact().equals(contact.
getId()) && p.isShowAllAttachments()) {
115 private List<ParticipantRole> getRole() {
116 if(role ==
null && category !=
null) {
117 role =
new ArrayList<ParticipantRole>();
119 if(p.getIdContact() !=
null && p.getIdContact().equals(contact.
getId())) {
120 role.add(p.getRole());
static IContact getIContact()
CategoryWrapper(Category category)
boolean getCanShowAllAttachments()
boolean isChildrenParticipant()
Set< Category > getChildren()
Set< CategoryParticipant > getParticipants()
ParticipantSet< IDossierParticipant > getFullParticipants()
void deleteObject(Object obj)
static EntityCollections entities(Collection values)