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, deactivate, getAdapter, getLastModified, registerExtension, setLastModified, setModifiedNow, start, stop, unregisterExtension
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
applicationStarted, getApplicationStartedOrder
public MailServiceImpl()
public void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
registerContribution
in class DefaultComponent
public void unregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
unregisterContribution
in class DefaultComponent
public javax.mail.Store getConnectedStore(String name) throws javax.mail.MessagingException
MailService
getConnectedStore
in interface MailService
name
- The name of the factory that provides the properties.javax.mail.MessagingException
public javax.mail.Store getConnectedStore(String name, Map<String,Object> context) throws javax.mail.MessagingException
getConnectedStore
in interface MailService
javax.mail.MessagingException
public javax.mail.Transport getConnectedTransport(String name) throws javax.mail.MessagingException
MailService
getConnectedTransport
in interface MailService
name
- the name of the factory that provides the properties.javax.mail.MessagingException
public javax.mail.Transport getConnectedTransport(String name, Map<String,Object> context) throws javax.mail.MessagingException
getConnectedTransport
in interface MailService
javax.mail.MessagingException
public javax.mail.Session getSession(String name)
MailService
getSession
in interface MailService
public javax.mail.Session getSession(String name, Map<String,Object> context)
getSession
in interface MailService
public MailBoxActions getMailBoxActions(String factoryName, String folderName) throws javax.mail.MessagingException
MailService
The 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 MailService
javax.mail.MessagingException
public MailBoxActions getMailBoxActions(String factoryName, String folderName, Map<String,Object> context) throws javax.mail.MessagingException
getMailBoxActions
in interface MailService
javax.mail.MessagingException
public void sendMail(String text, String subject, String factory, javax.mail.Address[] recipients)
MailService
The 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 MailService
public void sendMail(String text, String subject, String factory, javax.mail.Address[] recipients, Map<String,Object> context)
sendMail
in interface MailService
public PropertiesFetcher getFetcher(String name)
getFetcher
in interface MailService
public MessageActionPipe getPipe(String name)
MailService
getPipe
in interface MailService
protected javax.mail.Session newSession(Properties props)
Copyright © 2018 Nuxeo. All rights reserved.