BrightSide Workbench Full Report + Source Code
org.turro.students.mail.AbstractChallengeNotification Class Referenceabstract
Inheritance diagram for org.turro.students.mail.AbstractChallengeNotification:
Collaboration diagram for org.turro.students.mail.AbstractChallengeNotification:

Public Member Functions

 AbstractChallengeNotification (Challenge challenge)
 
 AbstractChallengeNotification (Response response)
 
void send (String template, String reason)
 
String create (IConstructor constructor, Challenge challenge, IContact contact) throws Exception
 
String create (IConstructor constructor, String redir, String email) throws Exception
 
String createRef (IConstructor constructor, Challenge challenge, 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

final Challenge challenge
 
final Response response
 
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 54 of file AbstractChallengeNotification.java.

Constructor & Destructor Documentation

◆ AbstractChallengeNotification() [1/2]

org.turro.students.mail.AbstractChallengeNotification.AbstractChallengeNotification ( Challenge  challenge)

Definition at line 61 of file AbstractChallengeNotification.java.

Here is the call graph for this function:

◆ AbstractChallengeNotification() [2/2]

org.turro.students.mail.AbstractChallengeNotification.AbstractChallengeNotification ( Response  response)

Definition at line 68 of file AbstractChallengeNotification.java.

68  {
69  this.response = response;
71  constructor = Application.getApplication().getConstructor();
72  loggedContact = Authentication.getIContact();
73  }
Here is the call graph for this function:

Member Function Documentation

◆ create() [1/2]

String org.turro.students.mail.AbstractChallengeNotification.create ( IConstructor  constructor,
Challenge  challenge,
IContact  contact 
) throws Exception

Definition at line 79 of file AbstractChallengeNotification.java.

79  {
80  return create(constructor,
81  StudentsEntityInfo.linkForPath(new Path(StudentsPU.getObjectPath(challenge)), contact, LinkType.WEB),
82  contact.getConnector(IUser.CONNECTOR_EMAIL));
83  }
String create(IConstructor constructor, Challenge challenge, IContact contact)
Here is the call graph for this function:

◆ create() [2/2]

String org.turro.students.mail.AbstractChallengeNotification.create ( IConstructor  constructor,
String  redir,
String  email 
) throws Exception

Definition at line 85 of file AbstractChallengeNotification.java.

85  {
86  HashMap<String, String> values = new HashMap<>();
87  values.put(Actions.USER_PAR, email);
88  values.put(Actions.REDIR_PAR, URLEncoder.encode(redir, "UTF-8"));
89  return Actions.createAction(values, 7, false);
90  }

◆ createRef() [1/2]

String org.turro.students.mail.AbstractChallengeNotification.createRef ( IConstructor  constructor,
Challenge  challenge,
IContact  contact 
) throws Exception

Definition at line 92 of file AbstractChallengeNotification.java.

92  {
93  return createRef(constructor,
94  StudentsEntityInfo.linkForPath(new Path(StudentsPU.getObjectPath(challenge)), contact, LinkType.WEB));
95  }
String createRef(IConstructor constructor, Challenge challenge, IContact contact)
Here is the call graph for this function:

◆ createRef() [2/2]

String org.turro.students.mail.AbstractChallengeNotification.createRef ( IConstructor  constructor,
String  redir 
) throws Exception

Definition at line 97 of file AbstractChallengeNotification.java.

97  {
98  return "{liveref:" + redir + "}";
99  }

◆ getAssistants()

abstract AssistantSet org.turro.students.mail.AbstractChallengeNotification.getAssistants ( )
abstractprotected

◆ getSubject()

String org.turro.students.mail.AbstractChallengeNotification.getSubject ( String  reason)
protected

Definition at line 129 of file AbstractChallengeNotification.java.

129  {
130  return String.format("[%s #%d %s] %s",
131  reason,
132  challenge.getId(),
135  }
Here is the call graph for this function:

◆ initMarker()

abstract void org.turro.students.mail.AbstractChallengeNotification.initMarker ( ElephantMarker  marker)
abstractprotected

◆ send()

void org.turro.students.mail.AbstractChallengeNotification.send ( String  template,
String  reason 
)

Definition at line 75 of file AbstractChallengeNotification.java.

75  {
76  addToQueue(template, reason);
77  }

◆ sendNotification()

abstract void org.turro.students.mail.AbstractChallengeNotification.sendNotification ( )
abstract

Member Data Documentation

◆ challenge

final Challenge org.turro.students.mail.AbstractChallengeNotification.challenge
protected

Definition at line 56 of file AbstractChallengeNotification.java.

◆ constructor

final IConstructor org.turro.students.mail.AbstractChallengeNotification.constructor
protected

Definition at line 58 of file AbstractChallengeNotification.java.

◆ loggedContact

final IContact org.turro.students.mail.AbstractChallengeNotification.loggedContact
protected

Definition at line 59 of file AbstractChallengeNotification.java.

◆ response

final Response org.turro.students.mail.AbstractChallengeNotification.response
protected

Definition at line 57 of file AbstractChallengeNotification.java.


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