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

Public Member Functions

void add (Object entity, boolean deep, AssistantSet assistants, Object data)
 
void addFromEntityPath (String entityPath, boolean deep, AssistantSet assistants, Object data)
 
void addFromEntity (Object entity, boolean deep, AssistantSet assistants, Object data)
 
void addFromEntityPathData (String entityPath, AssistantSet assistants, Object data)
 
void addFromEntityData (Object entity, AssistantSet assistants, Object data)
 
List< String > getParticiped (IContact contact)
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 40 of file PublicationsAssistant.java.

Member Function Documentation

◆ add()

void org.turro.assistant.PublicationsAssistant.add ( Object  entity,
boolean  deep,
AssistantSet  assistants,
Object  data 
)

Implements org.turro.assistant.IAssistant.

Definition at line 43 of file PublicationsAssistant.java.

43  {
44  if(entity instanceof String) {
45  addFromEntityPath((String) entity, deep, assistants, data);
46  } else {
47  addFromEntity(entity, deep, assistants, data);
48  }
49  }
void addFromEntityPath(String entityPath, boolean deep, AssistantSet assistants, Object data)
void addFromEntity(Object entity, boolean deep, AssistantSet assistants, Object data)
Here is the call graph for this function:

◆ addFromEntity()

void org.turro.assistant.PublicationsAssistant.addFromEntity ( Object  entity,
boolean  deep,
AssistantSet  assistants,
Object  data 
)

Implements org.turro.assistant.IAssistant.

Definition at line 58 of file PublicationsAssistant.java.

58  {
59  if(entity instanceof Publication) {
60  Publication publication = (Publication) entity;
61  assistants.addSubject(publication.getTitle());
62  IContact c = publication.getContactAuthor();
63  if(c != null && c.isWebUser()) {
64  assistants.add(new Assistant(c.getName(), c.getConnector(IUser.CONNECTOR_EMAIL), c, null));
65  }
66  } else if(entity instanceof PublicationCategory) {
67  PublicationCategory pubcat = (PublicationCategory) entity;
68  assistants.addSubject(pubcat.getName());
69  }
70  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ addFromEntityData()

void org.turro.assistant.PublicationsAssistant.addFromEntityData ( Object  entity,
AssistantSet  assistants,
Object  data 
)

Implements org.turro.assistant.IAssistant.

Definition at line 79 of file PublicationsAssistant.java.

79  {
80  PublicationCategory publicationCategory = null;
81  if(entity instanceof Publication) {
82  publicationCategory = ((Publication) entity).getPublicationCategory();
83  } else if(entity instanceof PublicationCategory) {
84  publicationCategory = (PublicationCategory) entity;
85  }
86  if(publicationCategory != null) {
87  if((data instanceof String) && ((String) data).contains(AssistantConstants.FROM_SUBSCRIPTIONS)) {
88  QueueManager qm = new QueueManager();
89  Collection<QueueOptions> subs = qm.getSubcribers(PublicationElephantNotification.convertId(publicationCategory));
90  for(QueueOptions qo : subs) {
91  assistants.addContact(Contacts.getContactById(qo.getIdContact()), null);
92  }
93  }
94  }
95  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ addFromEntityPath()

void org.turro.assistant.PublicationsAssistant.addFromEntityPath ( String  entityPath,
boolean  deep,
AssistantSet  assistants,
Object  data 
)

Implements org.turro.assistant.IAssistant.

Definition at line 52 of file PublicationsAssistant.java.

52  {
53  Object entity = Entities.getController(entityPath).getEntity();
54  addFromEntity(entity, deep, assistants, data);
55  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ addFromEntityPathData()

void org.turro.assistant.PublicationsAssistant.addFromEntityPathData ( String  entityPath,
AssistantSet  assistants,
Object  data 
)

Implements org.turro.assistant.IAssistant.

Definition at line 73 of file PublicationsAssistant.java.

73  {
74  Object entity = Entities.getController(entityPath).getEntity();
75  addFromEntityData(entity, assistants, data);
76  }
void addFromEntityData(Object entity, AssistantSet assistants, Object data)
Here is the call graph for this function:

◆ getParticiped()

List<String> org.turro.assistant.PublicationsAssistant.getParticiped ( IContact  contact)

Implements org.turro.assistant.IAssistant.

Definition at line 98 of file PublicationsAssistant.java.

98  {
99  return Collections.EMPTY_LIST;
100  }

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