BrightSide Workbench Full Report + Source Code
org.turro.sendable.AbstractSendable< T > Class Template Referenceabstract
Inheritance diagram for org.turro.sendable.AbstractSendable< T >:
Collaboration diagram for org.turro.sendable.AbstractSendable< T >:

Public Member Functions

 AbstractSendable (T entity)
 
 AbstractSendable (String entityPath)
 
Date getSchedule ()
 
boolean isSent ()
 
AssistantSet getAssistants ()
 
void send (IConstructor constructor)
 
void send (IConstructor constructor, Collection< IContact > contacts)
 

Protected Member Functions

abstract boolean doSend (Sendable sendable, T entity, IConstructor constructor, AssistantSet assistants, boolean checkSent)
 
abstract void addAssistants (AssistantSet as, T entity)
 

Detailed Description

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

Definition at line 40 of file AbstractSendable.java.

Constructor & Destructor Documentation

◆ AbstractSendable() [1/2]

Definition at line 45 of file AbstractSendable.java.

45  {
46  this.entity = entity;
47  assignByEntity(entity);
48  }

◆ AbstractSendable() [2/2]

Definition at line 50 of file AbstractSendable.java.

50  {
51  assignByPath(entityPath);
52  }

Member Function Documentation

◆ addAssistants()

abstract void org.turro.sendable.AbstractSendable< T >.addAssistants ( AssistantSet  as,
entity 
)
abstractprotected
Here is the caller graph for this function:

◆ doSend()

abstract boolean org.turro.sendable.AbstractSendable< T >.doSend ( Sendable  sendable,
entity,
IConstructor  constructor,
AssistantSet  assistants,
boolean  checkSent 
)
abstractprotected
Here is the caller graph for this function:

◆ getAssistants()

Implements org.turro.action.IElephantSendable.

Definition at line 65 of file AbstractSendable.java.

65  {
66  AssistantSet as = new AssistantSet();
67  addAssistants(as, entity);
68  IAgreements agreements = Plugins.loadImplementation(IAgreements.class, "agreements");
69  for(SendableAssistant sa : Sendables.getAssistants(sendable.getEntityPath(), false)) {
70  agreements.setContact(sa.getIContact());
71  if(!agreements.declinedNotifications()) {
72  as.addContact(sa.getIContact(), sendable);
73  }
74  }
75  return as;
76  }
abstract void addAssistants(AssistantSet as, T entity)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getSchedule()

Date org.turro.sendable.AbstractSendable< T >.getSchedule ( )

Implements org.turro.action.IElephantSendable.

Definition at line 55 of file AbstractSendable.java.

55  {
56  return sendable.getSchedule();
57  }

◆ isSent()

boolean org.turro.sendable.AbstractSendable< T >.isSent ( )

Implements org.turro.action.IElephantSendable.

Definition at line 60 of file AbstractSendable.java.

60  {
61  return sendable.isSent();
62  }

◆ send() [1/2]

void org.turro.sendable.AbstractSendable< T >.send ( IConstructor  constructor)

Implements org.turro.action.IElephantSendable.

Definition at line 79 of file AbstractSendable.java.

79  {
80  try {
81  doSend(sendable, getEntity(), constructor, getAssistants(), true);
82  } finally {
83  sendable.setSent(true);
84  getDao().saveObject(sendable);
85  }
86  }
abstract boolean doSend(Sendable sendable, T entity, IConstructor constructor, AssistantSet assistants, boolean checkSent)
Here is the call graph for this function:

◆ send() [2/2]

void org.turro.sendable.AbstractSendable< T >.send ( IConstructor  constructor,
Collection< IContact contacts 
)

Implements org.turro.action.IElephantSendable.

Definition at line 89 of file AbstractSendable.java.

89  {
90  AssistantSet assistants = new AssistantSet();
91  assistants.addContacts(contacts);
92  if(!assistants.isEmpty()) doSend(sendable, getEntity(), constructor, assistants, false);
93  }
Here is the call graph for this function:

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