public class MailServiceImpl extends DefaultComponent implements MailService
lastModified| Constructor and Description |
|---|
MailServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
javax.mail.Store |
getConnectedStore(String name)
Returns a connected store for this factory.
|
javax.mail.Store |
getConnectedStore(String name,
Map<String,Object> context) |
javax.mail.Transport |
getConnectedTransport(String name)
Returns a connected transport for this factory.
|
javax.mail.Transport |
getConnectedTransport(String name,
Map<String,Object> context) |
PropertiesFetcher |
getFetcher(String name) |
MailBoxActions |
getMailBoxActions(String factoryName,
String folderName)
Returns an actions pipe configured with this factory.
|
MailBoxActions |
getMailBoxActions(String factoryName,
String folderName,
Map<String,Object> context) |
MessageActionPipe |
getPipe(String name)
Gets the pipe of actions for given name
|
javax.mail.Session |
getSession(String name)
Returns a session for this factory, using the context to find the session or the default if no context is
provided.
|
javax.mail.Session |
getSession(String name,
Map<String,Object> context) |
protected javax.mail.Session |
newSession(Properties props) |
void |
registerContribution(Object contribution,
String extensionPoint,
ComponentInstance contributor) |
void |
sendMail(String text,
String subject,
String factory,
javax.mail.Address[] recipients)
Sends a mail using the setting of this factory to this recipients.
|
void |
sendMail(String text,
String subject,
String factory,
javax.mail.Address[] recipients,
Map<String,Object> context) |
void |
unregisterContribution(Object contribution,
String extensionPoint,
ComponentInstance contributor) |
activate, applicationStarted, deactivate, getAdapter, getApplicationStartedOrder, getLastModified, registerExtension, setLastModified, setModifiedNow, unregisterExtensionpublic MailServiceImpl()
public void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
registerContribution in class DefaultComponentpublic void unregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
unregisterContribution in class DefaultComponentpublic javax.mail.Store getConnectedStore(String name) throws javax.mail.MessagingException
MailServicegetConnectedStore in interface MailServicename - The name of the factory that provides the properties.javax.mail.MessagingExceptionpublic javax.mail.Store getConnectedStore(String name, Map<String,Object> context) throws javax.mail.MessagingException
getConnectedStore in interface MailServicejavax.mail.MessagingExceptionpublic javax.mail.Transport getConnectedTransport(String name) throws javax.mail.MessagingException
MailServicegetConnectedTransport in interface MailServicename - the name of the factory that provides the properties.javax.mail.MessagingExceptionpublic javax.mail.Transport getConnectedTransport(String name, Map<String,Object> context) throws javax.mail.MessagingException
getConnectedTransport in interface MailServicejavax.mail.MessagingExceptionpublic javax.mail.Session getSession(String name)
MailServicegetSession in interface MailServicepublic javax.mail.Session getSession(String name, Map<String,Object> context)
getSession in interface MailServicepublic MailBoxActions getMailBoxActions(String factoryName, String folderName) throws javax.mail.MessagingException
MailServiceThe actions will start from this folder. The context is be passed to the sessionFactory to be able to find the session. Use the default session if context is not used.
getMailBoxActions in interface MailServicejavax.mail.MessagingExceptionpublic MailBoxActions getMailBoxActions(String factoryName, String folderName, Map<String,Object> context) throws javax.mail.MessagingException
getMailBoxActions in interface MailServicejavax.mail.MessagingExceptionpublic void sendMail(String text, String subject, String factory, javax.mail.Address[] recipients)
MailServiceThe context is passed to the sessionFactory to be able to find the session. Use the default session if context is not used. This template is used, replacing variables with the ones from this variables.
sendMail in interface MailServicepublic void sendMail(String text, String subject, String factory, javax.mail.Address[] recipients, Map<String,Object> context)
sendMail in interface MailServicepublic PropertiesFetcher getFetcher(String name)
getFetcher in interface MailServicepublic MessageActionPipe getPipe(String name)
MailServicegetPipe in interface MailServiceprotected javax.mail.Session newSession(Properties props)
Copyright © 2015 Nuxeo SA. All rights reserved.