org.imixs.workflow.jee.plugins
Class MailPlugin
java.lang.Object
org.imixs.workflow.plugins.AbstractPlugin
org.imixs.workflow.jee.plugins.AbstractPlugin
org.imixs.workflow.jee.plugins.MailPlugin
- All Implemented Interfaces:
- org.imixs.workflow.Plugin
- Direct Known Subclasses:
- ADMailPlugin, OpenLDAPMailPlugin
public class MailPlugin
- extends AbstractPlugin
This plugin supports a Mail interface to send mail like defined in the model
using the Mail tab in an activity Entity. This plugin uses the JEE Mail
Interface Currentyl no HTML Mail is supported
- Author:
- Ralph Soika
| Fields inherited from class org.imixs.workflow.plugins.AbstractPlugin |
ctx |
| Fields inherited from interface org.imixs.workflow.Plugin |
PLUGIN_ERROR, PLUGIN_OK, PLUGIN_WARNING |
|
Method Summary |
void |
close(int status)
|
javax.mail.internet.InternetAddress |
getInternetAddress(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 "". |
javax.mail.Message |
getMailMessage()
|
javax.mail.Session |
getMailSession()
|
javax.mail.Multipart |
getMultipart()
|
void |
init(org.imixs.workflow.WorkflowContext actx)
the init method is responsible for initializing the mail session object
receifed from the jndi context
The Default name of the Mail Session is
'org.imixs.workflow.jee.mailsession' The name can be overwritten by the
EJB Properties of the workflowmanager |
void |
initializeMailMessage()
initializes a new mail Message object |
int |
run(org.imixs.workflow.ItemCollection documentContext,
org.imixs.workflow.ItemCollection documentActivity)
|
| Methods inherited from class org.imixs.workflow.plugins.AbstractPlugin |
formatItemValues, getAbbreviateName, getCommonName, replaceDynamicValues |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
adocumentContext
public org.imixs.workflow.ItemCollection adocumentContext
MailPlugin
public MailPlugin()
init
public void init(org.imixs.workflow.WorkflowContext actx)
throws Exception
- the init method is responsible for initializing the mail session object
receifed from the jndi context
The Default name of the Mail Session is
'org.imixs.workflow.jee.mailsession' The name can be overwritten by the
EJB Properties of the workflowmanager
- Specified by:
init in interface org.imixs.workflow.Plugin- Overrides:
init in class AbstractPlugin
- Throws:
Exception
run
public int run(org.imixs.workflow.ItemCollection documentContext,
org.imixs.workflow.ItemCollection documentActivity)
throws Exception
- Specified by:
run in interface org.imixs.workflow.Plugin- Specified by:
run in class AbstractPlugin
- Throws:
Exception
close
public void close(int status)
throws Exception
- Specified by:
close in interface org.imixs.workflow.Plugin- Specified by:
close in class AbstractPlugin
- Throws:
Exception
initializeMailMessage
public void initializeMailMessage()
throws javax.mail.internet.AddressException,
javax.mail.MessagingException
- initializes a new mail Message object
- Throws:
javax.mail.internet.AddressException
javax.mail.MessagingException
getInternetAddress
public javax.mail.internet.InternetAddress getInternetAddress(String aAddr)
throws javax.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.
- Parameters:
aAddr -
- Returns:
-
- Throws:
javax.mail.internet.AddressException
getMailSession
public javax.mail.Session getMailSession()
getMailMessage
public javax.mail.Message getMailMessage()
getMultipart
public javax.mail.Multipart getMultipart()
Copyright © 2006-2012 Imixs Software Solutions GmbH. All Rights Reserved.