Package org.imixs.marty.profile
Class MailPlugin
java.lang.Object
org.imixs.workflow.engine.plugins.AbstractPlugin
org.imixs.workflow.engine.plugins.MailPlugin
org.imixs.marty.profile.MailPlugin
- All Implemented Interfaces:
org.imixs.workflow.Plugin
- Direct Known Subclasses:
MailPlugin
public class MailPlugin
extends org.imixs.workflow.engine.plugins.MailPlugin
This Plugin extends the Imixs Workflow MailPlugin.
The Plugin translates recipient addresses with the mail address stored in the users profile
In addition this plugin adds the attachments from a snapshot workItem into
the mail body if the tag
<attachments>order.pdf</attachments>
<attachments><itemvalue>_ordernumber</itemvalue>.pdf</attachments>
An Attachment can also be taken from a textblock. *
<attachments textblock="my_block"></attachments>
- Version:
- 2.0
- Author:
- rsoika
-
Field Summary
FieldsFields inherited from class org.imixs.workflow.engine.plugins.MailPlugin
CONTENTTYPE_TEXT_HTML, CONTENTTYPE_TEXT_PLAIN, ERROR_INVALID_XSL_FORMAT, ERROR_MAIL_MESSAGE, INVALID_ADDRESS, MAIL_SESSION_NAMEFields inherited from class org.imixs.workflow.engine.plugins.AbstractPlugin
INVALID_ITEMVALUE_FORMAT, INVALID_PROPERTYVALUE_FORMAT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionjakarta.mail.internet.InternetAddressgetInternetAddress(String aAddr) this helper method creates an internet address from a string if the string has illegal characters like whitespace the string will be surrounded with "".org.imixs.workflow.ItemCollectionloadTextBlock(String name) Helper method to load a text-block workitemorg.imixs.workflow.ItemCollectionrun(org.imixs.workflow.ItemCollection documentContext, org.imixs.workflow.ItemCollection documentActivity) This method adds the attachments of the blob workitem to the MimeMessageMethods inherited from class org.imixs.workflow.engine.plugins.MailPlugin
close, getBody, getCharSet, getContentType, getFrom, getMailMessage, getMailSession, getMultipart, getRecipients, getRecipientsBCC, getRecipientsCC, getReplyTo, getSubject, initMailMessage, isHTMLMail, setCharSet, transformXSLBodyMethods inherited from class org.imixs.workflow.engine.plugins.AbstractPlugin
getCtx, getWorkflowService, init, mergeFieldList, uniqueList
-
Field Details
-
SNAPSHOTID
-
PROFILESERVICE_NOT_BOUND
-
PROPERTYSERVICE_NOT_BOUND
-
INVALID_EMAIL
-
-
Constructor Details
-
MailPlugin
public MailPlugin()
-
-
Method Details
-
run
public org.imixs.workflow.ItemCollection run(org.imixs.workflow.ItemCollection documentContext, org.imixs.workflow.ItemCollection documentActivity) throws org.imixs.workflow.exceptions.PluginException This method adds the attachments of the blob workitem to the MimeMessage- Specified by:
runin interfaceorg.imixs.workflow.Plugin- Overrides:
runin classorg.imixs.workflow.engine.plugins.MailPlugin- Throws:
org.imixs.workflow.exceptions.PluginException
-
getInternetAddress
public jakarta.mail.internet.InternetAddress getInternetAddress(String aAddr) throws jakarta.mail.internet.AddressException this helper method creates an internet address from a string if the string has illegal characters like whitespace the string will be surrounded with "". If you subclass this MailPlugin Class you can overwrite this method to return a different mail-address name or lookup a mail attribute in a directory like a ldap directory.- Overrides:
getInternetAddressin classorg.imixs.workflow.engine.plugins.MailPlugin- Parameters:
aAddr-- Returns:
- Throws:
jakarta.mail.internet.AddressException
-
loadTextBlock
Helper method to load a text-block workitem- Parameters:
name-- Returns:
-