public class JBPMMailProducer extends Object
| Modifier and Type | Class and Description |
|---|---|
class |
JBPMMailProducer.MyBindings |
| Modifier and Type | Field and Description |
|---|---|
protected Bindings |
bindings |
protected JahiaGroupManagerService |
groupManagerService |
protected MailTemplateRegistry |
mailTemplateRegistry |
protected ScriptEngine |
scriptEngine |
protected org.kie.internal.task.api.TaskIdentityService |
taskIdentityService |
protected JahiaUserManagerService |
userManagerService |
protected WorkflowService |
workflowService |
| Constructor and Description |
|---|
JBPMMailProducer() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addAttachments(MailTemplate template,
org.kie.api.runtime.process.WorkItem workItem,
javax.mail.Multipart multipart,
JCRSessionWrapper session) |
protected void |
addStaticClasses(Bindings bindings) |
protected DataHandler |
createDataHandler(AttachmentTemplate attachmentTemplate,
org.kie.api.runtime.process.WorkItem workItem,
JCRSessionWrapper session) |
protected String |
evaluateExpression(org.kie.api.runtime.process.WorkItem workItem,
String scriptToExecute,
JCRSessionWrapper session) |
protected static String |
extractResourceName(URL url) |
protected void |
fillContent(MailTemplate template,
javax.mail.Message email,
org.kie.api.runtime.process.WorkItem workItem,
JCRSessionWrapper session) |
protected void |
fillFrom(MailTemplate template,
javax.mail.Message email,
org.kie.api.runtime.process.WorkItem workItem,
JCRSessionWrapper session)
Fills the
from attribute of the given email. |
protected void |
fillRecipients(AddressTemplate addressTemplate,
javax.mail.Message email,
javax.mail.Message.RecipientType recipientType,
org.kie.api.runtime.process.WorkItem workItem,
JCRSessionWrapper session) |
protected void |
fillRecipients(MailTemplate template,
javax.mail.Message email,
org.kie.api.runtime.process.WorkItem workItem,
JCRSessionWrapper session) |
protected void |
fillSubject(MailTemplate template,
javax.mail.Message email,
org.kie.api.runtime.process.WorkItem workItem,
JCRSessionWrapper session) |
protected javax.mail.Address |
getAddress(String firstName,
String lastName,
String email) |
protected javax.mail.Address |
getAddress(org.kie.api.task.model.User user) |
protected javax.mail.Address[] |
getAddresses(org.kie.api.task.model.Group group) |
protected javax.mail.Address[] |
getAddresses(List<org.kie.api.task.model.User> users)
construct recipient addresses from user entities
|
protected Bindings |
getBindings(org.kie.api.runtime.process.WorkItem workItem,
JCRSessionWrapper session) |
protected javax.mail.Message |
instantiateEmail() |
Collection<javax.mail.Message> |
produce(org.kie.api.runtime.process.WorkItem workItem) |
void |
setGroupManagerService(JahiaGroupManagerService groupManagerService) |
void |
setMailTemplateRegistry(MailTemplateRegistry mailTemplateRegistry) |
void |
setTaskIdentityService(org.kie.internal.task.api.TaskIdentityService taskIdentityService) |
void |
setUserManagerService(JahiaUserManagerService userManagerService) |
void |
setWorkflowService(WorkflowService workflowService) |
protected String[] |
tokenizeActors(String recipients,
org.kie.api.runtime.process.WorkItem workItem,
JCRSessionWrapper session) |
protected ScriptEngine scriptEngine
protected Bindings bindings
protected WorkflowService workflowService
protected MailTemplateRegistry mailTemplateRegistry
protected org.kie.internal.task.api.TaskIdentityService taskIdentityService
protected JahiaUserManagerService userManagerService
protected JahiaGroupManagerService groupManagerService
public void setWorkflowService(WorkflowService workflowService)
public void setMailTemplateRegistry(MailTemplateRegistry mailTemplateRegistry)
public void setTaskIdentityService(org.kie.internal.task.api.TaskIdentityService taskIdentityService)
public void setUserManagerService(JahiaUserManagerService userManagerService)
public void setGroupManagerService(JahiaGroupManagerService groupManagerService)
public Collection<javax.mail.Message> produce(org.kie.api.runtime.process.WorkItem workItem)
protected javax.mail.Message instantiateEmail()
protected void fillFrom(MailTemplate template, javax.mail.Message email, org.kie.api.runtime.process.WorkItem workItem, JCRSessionWrapper session) throws Exception
from attribute of the given email. The sender addresses are an
optional element in the mail template. If absent, each mail server supplies the current
user's email address.ExceptionInternetAddress#getLocalAddress(Session)}protected void fillRecipients(MailTemplate template, javax.mail.Message email, org.kie.api.runtime.process.WorkItem workItem, JCRSessionWrapper session) throws Exception
Exceptionprotected void fillRecipients(AddressTemplate addressTemplate, javax.mail.Message email, javax.mail.Message.RecipientType recipientType, org.kie.api.runtime.process.WorkItem workItem, JCRSessionWrapper session) throws Exception
Exceptionprotected String[] tokenizeActors(String recipients, org.kie.api.runtime.process.WorkItem workItem, JCRSessionWrapper session) throws Exception
Exceptionprotected javax.mail.Address[] getAddresses(List<org.kie.api.task.model.User> users)
protected javax.mail.Address[] getAddresses(org.kie.api.task.model.Group group)
protected javax.mail.Address getAddress(org.kie.api.task.model.User user)
throws UnsupportedEncodingException
UnsupportedEncodingExceptionprotected javax.mail.Address getAddress(String firstName, String lastName, String email) throws UnsupportedEncodingException
UnsupportedEncodingExceptionprotected void fillSubject(MailTemplate template, javax.mail.Message email, org.kie.api.runtime.process.WorkItem workItem, JCRSessionWrapper session) throws Exception
Exceptionprotected void fillContent(MailTemplate template, javax.mail.Message email, org.kie.api.runtime.process.WorkItem workItem, JCRSessionWrapper session) throws Exception
Exceptionprotected String evaluateExpression(org.kie.api.runtime.process.WorkItem workItem, String scriptToExecute, JCRSessionWrapper session) throws javax.jcr.RepositoryException, ScriptException
javax.jcr.RepositoryExceptionScriptExceptionprotected void addStaticClasses(Bindings bindings)
protected Bindings getBindings(org.kie.api.runtime.process.WorkItem workItem, JCRSessionWrapper session) throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionprotected void addAttachments(MailTemplate template, org.kie.api.runtime.process.WorkItem workItem, javax.mail.Multipart multipart, JCRSessionWrapper session) throws Exception
Exceptionprotected DataHandler createDataHandler(AttachmentTemplate attachmentTemplate, org.kie.api.runtime.process.WorkItem workItem, JCRSessionWrapper session) throws Exception
ExceptionCopyright © 2004–2020 Jahia Solutions Group SA. All rights reserved.