public class MailPlugin extends AbstractPlugin
| Modifier and Type | Field and Description |
|---|---|
static String |
INVALID_ADDRESS |
static String |
INVALID_XSL_FORMAT |
INVALID_ITEMVALUE_FORMAT, INVALID_PROPERTYVALUE_FORMAT| Constructor and Description |
|---|
MailPlugin() |
| Modifier and Type | Method and Description |
|---|---|
void |
close(boolean rollbackTransaction)
Send the mail if the object 'mailMessage' is not null.
|
String |
getBody(ItemCollection documentContext,
ItemCollection documentActivity)
Computes the mail body from the current workflow event.
|
String |
getCharSet() |
String |
getContentType()
This method returns a string representing the mail content type.
|
String |
getFrom(ItemCollection documentContext,
ItemCollection documentActivity)
Computes the sender name.
|
javax.mail.internet.InternetAddress |
getInternetAddress(String aAddr)
This method creates an InternetAddress from a string.
|
javax.mail.Message |
getMailMessage() |
javax.mail.Session |
getMailSession()
This method returns the mail session object.
|
javax.mail.Multipart |
getMultipart() |
List<String> |
getRecipients(ItemCollection documentContext,
ItemCollection documentActivity)
Computes the mail Recipients from the current workflow activity.
|
List<String> |
getRecipientsBCC(ItemCollection documentContext,
ItemCollection documentActivity)
Computes the mail RecipientsBCC from the current workflow activity.
|
List<String> |
getRecipientsCC(ItemCollection documentContext,
ItemCollection documentActivity)
Computes the mail RecipientsCC from the current workflow activity.
|
String |
getReplyTo(ItemCollection documentContext,
ItemCollection documentActivity)
Computes the replyTo address from current workflow activity.
|
String |
getSubject(ItemCollection documentContext,
ItemCollection documentActivity)
Computes the mail subject from the current workflow activity.
|
void |
initMailMessage()
initializes a new mail Message object
|
void |
initMailSession()
This method initializes a new instance of a MailSession.
|
boolean |
isHTMLMail()
Return true if the mail body contains HTML content.
|
ItemCollection |
run(ItemCollection documentContext,
ItemCollection documentActivity)
The run method creates a mailMessage object if recipients are defined by the
corresponding BPMN event.
|
void |
setCharSet(String charSet) |
String |
transformXSLBody(ItemCollection documentContext,
String xslTemplate)
This method performs a XSL transformation based on the current Mail Body
text.
|
getCtx, getWorkflowService, init, mergeFieldList, uniqueListpublic static final String INVALID_XSL_FORMAT
public static final String INVALID_ADDRESS
public ItemCollection run(ItemCollection documentContext, ItemCollection documentActivity) throws PluginException
PluginExceptionpublic void close(boolean rollbackTransaction)
throws PluginException
close in interface Pluginclose in class AbstractPluginPluginExceptionpublic String getFrom(ItemCollection documentContext, ItemCollection documentActivity)
documentContext - documentActivity - public String getReplyTo(ItemCollection documentContext, ItemCollection documentActivity)
documentContext - documentActivity - public String getSubject(ItemCollection documentContext, ItemCollection documentActivity) throws PluginException
documentContext - documentActivity - PluginExceptionpublic List<String> getRecipients(ItemCollection documentContext, ItemCollection documentActivity)
documentContext - documentActivity - public List<String> getRecipientsCC(ItemCollection documentContext, ItemCollection documentActivity)
documentContext - documentActivity - public List<String> getRecipientsBCC(ItemCollection documentContext, ItemCollection documentActivity)
documentContext - documentActivity - public String getBody(ItemCollection documentContext, ItemCollection documentActivity) throws PluginException
documentContext - documentActivity - PluginExceptionpublic String transformXSLBody(ItemCollection documentContext, String xslTemplate) throws PluginException
PluginExceptionpublic void initMailMessage()
throws javax.mail.internet.AddressException,
javax.mail.MessagingException
javax.mail.internet.AddressExceptionjavax.mail.MessagingExceptionpublic javax.mail.internet.InternetAddress getInternetAddress(String aAddr) throws javax.mail.internet.AddressException
aAddr - stringjavax.mail.internet.AddressExceptionpublic void initMailSession()
public javax.mail.Session getMailSession()
public javax.mail.Message getMailMessage()
public javax.mail.Multipart getMultipart()
public boolean isHTMLMail()
public String getCharSet()
public void setCharSet(String charSet)
public String getContentType()
Copyright © 2006–2018 Imixs Software Solutions GmbH. All rights reserved.