public class AccountCancelledEmailGenerator extends Object implements EmailEventContentGenerator
AccountChangeObserver.EVT_ACCOUNT_CANCELLED event which is triggered
when a portal user is set as inactive.| Constructor and Description |
|---|
AccountCancelledEmailGenerator() |
| Modifier and Type | Method and Description |
|---|---|
List<File> |
getAttachments(Object data,
String event)
Returns the list of files to be attached to the email.
|
String |
getBody(Object data,
String event)
Returns the email body for the event and data.
|
String |
getContentType()
Returns the type of content of the email.
|
int |
getPriority()
When there are several classes listening to the same event, the order the emails are sent is
based on this value.
|
String |
getSubject(Object data,
String event)
Returns the email subject for the event and data.
|
boolean |
isAsynchronous()
Asynchronous emails are sent in a separate thread not waiting them to finish to continue the
rest of the execution flow.
|
boolean |
isValidEvent(String event,
Object data)
Checks if an email should be generated for the
event. |
boolean |
preventsOthersExecution()
In case there are several classes listening to the same event, when this method returns
true, other emails with lower priority that might exist, will not be sent. |
public String getSubject(Object data, String event)
EmailEventContentGeneratorgetSubject in interface EmailEventContentGeneratorpublic String getBody(Object data, String event)
EmailEventContentGeneratorgetBody in interface EmailEventContentGeneratorpublic String getContentType()
EmailEventContentGenerator"text/html; charset=utf-8" or
"text/plain; charset=utf-8"getContentType in interface EmailEventContentGeneratorpublic boolean isValidEvent(String event, Object data)
EmailEventContentGeneratorevent. Same class can be listening
to several events.isValidEvent in interface EmailEventContentGeneratorevent - Event to checkdata - Data the email will be generated for (this can also determine whether the email must
be sent)true if the email must be sent, false if not.public int getPriority()
EmailEventContentGeneratorgetPriority in interface EmailEventContentGeneratorEmailEventContentGenerator.preventsOthersExecution()public boolean preventsOthersExecution()
EmailEventContentGeneratortrue, other emails with lower priority that might exist, will not be sent.preventsOthersExecution in interface EmailEventContentGeneratorpublic boolean isAsynchronous()
EmailEventContentGeneratorisAsynchronous in interface EmailEventContentGeneratorpublic List<File> getAttachments(Object data, String event)
EmailEventContentGeneratorgetAttachments in interface EmailEventContentGenerator