BrightSide Workbench Full Report + Source Code
org.turro.contacts.service.AbstractServiceNotification Class Referenceabstract
Inheritance diagram for org.turro.contacts.service.AbstractServiceNotification:
Collaboration diagram for org.turro.contacts.service.AbstractServiceNotification:

Public Member Functions

 AbstractServiceNotification (ContactService service)
 
void send (String template, String reason)
 
String create (IConstructor constructor, ContactService service, IContact contact) throws Exception
 
String create (IConstructor constructor, String redir, String email) throws Exception
 
String createRef (IConstructor constructor, ContactService service, IContact contact) throws Exception
 
String createRef (IConstructor constructor, String redir) throws Exception
 
abstract void sendNotification ()
 

Protected Member Functions

String getSubject (String reason)
 
abstract AssistantSet getAssistants ()
 
abstract void initMarker (ElephantMarker marker)
 

Protected Attributes

ContactService service
 
final IConstructor constructor
 
final IContact loggedContact
 

Detailed Description

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

Definition at line 48 of file AbstractServiceNotification.java.

Constructor & Destructor Documentation

◆ AbstractServiceNotification()

org.turro.contacts.service.AbstractServiceNotification.AbstractServiceNotification ( ContactService  service)

Definition at line 54 of file AbstractServiceNotification.java.

54  {
55  this.service = service;
56  constructor = Application.getApplication().getConstructor();
57  loggedContact = Authentication.getIContact();
58  }
Here is the call graph for this function:

Member Function Documentation

◆ create() [1/2]

String org.turro.contacts.service.AbstractServiceNotification.create ( IConstructor  constructor,
ContactService  service,
IContact  contact 
) throws Exception

Definition at line 64 of file AbstractServiceNotification.java.

64  {
65  return create(constructor,
66  Entities.getController(service).getEntityUrl(),
67  contact.getConnector(IUser.CONNECTOR_EMAIL));
68  }
String create(IConstructor constructor, ContactService service, IContact contact)
Here is the call graph for this function:

◆ create() [2/2]

String org.turro.contacts.service.AbstractServiceNotification.create ( IConstructor  constructor,
String  redir,
String  email 
) throws Exception

Definition at line 70 of file AbstractServiceNotification.java.

70  {
71  HashMap<String, String> values = new HashMap<>();
72  values.put(Actions.USER_PAR, email);
73  values.put(Actions.REDIR_PAR, URLEncoder.encode(redir, "UTF-8"));
74  return Actions.createAction(values, 7, false);
75  }

◆ createRef() [1/2]

String org.turro.contacts.service.AbstractServiceNotification.createRef ( IConstructor  constructor,
ContactService  service,
IContact  contact 
) throws Exception

Definition at line 77 of file AbstractServiceNotification.java.

77  {
78  return createRef(constructor, service.getTimesSent() >=1 ?
79  Entities.getController(service).getEntityUrl() :
80  Entities.getController(service).getMemberUrl());
81  }
String createRef(IConstructor constructor, ContactService service, IContact contact)
Here is the call graph for this function:

◆ createRef() [2/2]

String org.turro.contacts.service.AbstractServiceNotification.createRef ( IConstructor  constructor,
String  redir 
) throws Exception

Definition at line 83 of file AbstractServiceNotification.java.

83  {
84  return "{liveref:" + redir + "}";
85  }

◆ getAssistants()

abstract AssistantSet org.turro.contacts.service.AbstractServiceNotification.getAssistants ( )
abstractprotected

◆ getSubject()

String org.turro.contacts.service.AbstractServiceNotification.getSubject ( String  reason)
protected

Definition at line 115 of file AbstractServiceNotification.java.

115  {
116  return String.format("[%s %s] %s",
117  reason,
119  service.getTitle());
120  }
Here is the call graph for this function:

◆ initMarker()

abstract void org.turro.contacts.service.AbstractServiceNotification.initMarker ( ElephantMarker  marker)
abstractprotected

◆ send()

void org.turro.contacts.service.AbstractServiceNotification.send ( String  template,
String  reason 
)

Definition at line 60 of file AbstractServiceNotification.java.

60  {
61  addToQueue(template, reason);
62  }

◆ sendNotification()

abstract void org.turro.contacts.service.AbstractServiceNotification.sendNotification ( )
abstract

Member Data Documentation

◆ constructor

final IConstructor org.turro.contacts.service.AbstractServiceNotification.constructor
protected

Definition at line 51 of file AbstractServiceNotification.java.

◆ loggedContact

final IContact org.turro.contacts.service.AbstractServiceNotification.loggedContact
protected

Definition at line 52 of file AbstractServiceNotification.java.

◆ service

ContactService org.turro.contacts.service.AbstractServiceNotification.service
protected

Definition at line 50 of file AbstractServiceNotification.java.


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