19 package org.turro.assistant;
21 import java.util.Collection;
22 import java.util.Collections;
23 import java.util.List;
24 import org.turro.annotation.ExternalAssistant;
25 import org.turro.elephant.entities.db.Post;
26 import org.turro.elephant.entities.db.Topic;
27 import org.turro.entities.Entities;
28 import org.turro.entities.IUniquePath;
29 import org.turro.forum.Forums;
30 import org.turro.plugin.contacts.IContact;
40 public void add(Object entity,
boolean deep,
AssistantSet assistants, Object data) {
41 if(entity instanceof String) {
56 if(entity instanceof
Topic) {
61 }
else if(entity instanceof
Post) {
67 while(parent !=
null) {
68 if(parent instanceof
Post) {
69 assistants.add(
new Assistant(((
Post) parent).getContact(), topic));
71 }
else if(parent instanceof
Topic) {
72 assistants.add(
new Assistant(((
Topic) parent).getContact(), topic));
82 if((data instanceof String) && ((String) data).contains(
AssistantConstants.FROM_FORUM)) {
84 for(
Topic topic : topics) {
95 if((data instanceof String) && ((String) data).contains(
AssistantConstants.FROM_FORUM)) {
103 return Collections.EMPTY_LIST;
void addSubject(String value)
static void addAssistants(String role, AssistantSet list, Object data)
void addFromEntityPath(String entityPath, boolean deep, AssistantSet assistants, Object data)
void addFromEntityPathData(String entityPath, AssistantSet assistants, Object data)
void add(Object entity, boolean deep, AssistantSet assistants, Object data)
void addFromEntityData(Object entity, AssistantSet assistants, Object data)
void addFromEntity(Object entity, boolean deep, AssistantSet assistants, Object data)
List< String > getParticiped(IContact contact)
IUniquePath getCurrentParent()
static IElephantEntity getController(String path)
static List< Topic > getTopics(String entityPath)