19 package org.turro.assistant;
21 import java.util.ArrayList;
22 import java.util.List;
24 import org.turro.annotation.ExternalAssistant;
25 import org.turro.dossier.db.DossierPU;
26 import org.turro.dossier.entity.Category;
27 import org.turro.dossier.entity.Dossier;
28 import org.turro.dossier.entity.IDossierParticipant;
29 import org.turro.dossier.entity.Issue;
30 import org.turro.dossier.entity.IssueParticipant;
31 import org.turro.dossier.entity.Participant;
32 import org.turro.entities.Entities;
33 import org.turro.jpa.Dao;
34 import org.turro.plugin.contacts.IContact;
35 import org.turro.sql.SqlClause;
45 public void add(Object entity,
boolean deep,
AssistantSet assistants, Object data) {
46 if(entity instanceof String) {
76 }
else if(entity instanceof
Dossier) {
91 }
else if(entity instanceof
Issue) {
129 List<String> participed =
new ArrayList<>();
137 participed.addAll(SqlClause.select(
"distinct p.dossier.id").from(
"Participant p")
138 .where().equal(
"p.idContact", contact.
getId())
140 .resultList(Long.class)
142 .map(p ->
"/dossier/" + p)
144 participed.addAll(SqlClause.select(
"distinct p.category.id").from(
"CategoryParticipant p")
145 .where().equal(
"p.idContact", contact.
getId())
147 .resultList(Long.class)
149 .map(p ->
"/dossier-category/" + p)
void addSubject(String value)
void addFromEntityData(Object entity, AssistantSet assistants, Object data)
void addFromEntityPathData(String entityPath, AssistantSet assistants, Object data)
void add(Object entity, boolean deep, AssistantSet assistants, Object data)
void addFromEntity(Object entity, boolean deep, AssistantSet assistants, Object data)
List< String > getParticiped(IContact contact)
void addFromEntityPath(String entityPath, boolean deep, AssistantSet assistants, Object data)
Set< CategoryParticipant > getParticipants()
ParticipantSet< IDossierParticipant > getFullParticipants()
String getFullDescription()
Set< Participant > getParticipants()
String getFullDescription()
ParticipantSet< IDossierParticipant > getFullParticipants()
ParticipantSet getFullParticipants()
Set< IssueParticipant > getParticipants()
String getFullDescription()
static IElephantEntity getController(String path)
boolean isShowAllIssues()