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)
EmailEventContentGenerator
getSubject
in interface EmailEventContentGenerator
public String getBody(Object data, String event)
EmailEventContentGenerator
getBody
in interface EmailEventContentGenerator
public String getContentType()
EmailEventContentGenerator
"text/html; charset=utf-8"
or
"text/plain; charset=utf-8"
getContentType
in interface EmailEventContentGenerator
public boolean isValidEvent(String event, Object data)
EmailEventContentGenerator
event
. Same class can be listening
to several events.isValidEvent
in interface EmailEventContentGenerator
event
- 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()
EmailEventContentGenerator
getPriority
in interface EmailEventContentGenerator
EmailEventContentGenerator.preventsOthersExecution()
public boolean preventsOthersExecution()
EmailEventContentGenerator
true
, other emails with lower priority that might exist, will not be sent.preventsOthersExecution
in interface EmailEventContentGenerator
public boolean isAsynchronous()
EmailEventContentGenerator
isAsynchronous
in interface EmailEventContentGenerator
public List<File> getAttachments(Object data, String event)
EmailEventContentGenerator
getAttachments
in interface EmailEventContentGenerator