Nuxeo Enterprise Platform 5.4

org.nuxeo.ecm.platform.mail.service
Interface MailService

All Known Implementing Classes:
MailServiceImpl

public interface MailService

Author:
Alexandre Russel

Method Summary
 javax.mail.Store getConnectedStore(java.lang.String name)
          Returns a connected store for this factory.
 javax.mail.Store getConnectedStore(java.lang.String name, java.util.Map<java.lang.String,java.lang.Object> context)
           
 javax.mail.Transport getConnectedTransport(java.lang.String name)
          Returns a connected transport for this factory.
 javax.mail.Transport getConnectedTransport(java.lang.String name, java.util.Map<java.lang.String,java.lang.Object> context)
           
 PropertiesFetcher getFetcher(java.lang.String name)
           
 MailBoxActions getMailBoxActions(java.lang.String factoryName, java.lang.String folderName)
          Returns an actions pipe configured with this factory.
 MailBoxActions getMailBoxActions(java.lang.String factoryName, java.lang.String folderName, java.util.Map<java.lang.String,java.lang.Object> context)
           
 MessageActionPipe getPipe(java.lang.String name)
          Gets the pipe of actions for given name
 javax.mail.Session getSession(java.lang.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(java.lang.String name, java.util.Map<java.lang.String,java.lang.Object> context)
           
 void sendMail(java.lang.String text, java.lang.String subject, java.lang.String factory, javax.mail.Address[] recipients)
          Sends a mail using the setting of this factory to this recipients.
 void sendMail(java.lang.String text, java.lang.String subject, java.lang.String factory, javax.mail.Address[] recipients, java.util.Map<java.lang.String,java.lang.Object> context)
           
 

Method Detail

getMailBoxActions

MailBoxActions getMailBoxActions(java.lang.String factoryName,
                                 java.lang.String folderName)
                                 throws java.lang.Exception
Returns an actions pipe configured with this factory.

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.

Throws:
java.lang.Exception

getMailBoxActions

MailBoxActions getMailBoxActions(java.lang.String factoryName,
                                 java.lang.String folderName,
                                 java.util.Map<java.lang.String,java.lang.Object> context)
                                 throws java.lang.Exception
Throws:
java.lang.Exception

getPipe

MessageActionPipe getPipe(java.lang.String name)
Gets the pipe of actions for given name


sendMail

void sendMail(java.lang.String text,
              java.lang.String subject,
              java.lang.String factory,
              javax.mail.Address[] recipients)
              throws java.lang.Exception
Sends a mail using the setting of this factory to this recipients.

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.

Throws:
java.lang.Exception

sendMail

void sendMail(java.lang.String text,
              java.lang.String subject,
              java.lang.String factory,
              javax.mail.Address[] recipients,
              java.util.Map<java.lang.String,java.lang.Object> context)
              throws java.lang.Exception
Throws:
java.lang.Exception

getConnectedStore

javax.mail.Store getConnectedStore(java.lang.String name)
                                   throws java.lang.Exception
Returns a connected store for this factory. The store needs to be closed after use.

Parameters:
name - The name of the factory that provides the properties.
Returns:
the store.
Throws:
java.lang.Exception

getConnectedStore

javax.mail.Store getConnectedStore(java.lang.String name,
                                   java.util.Map<java.lang.String,java.lang.Object> context)
                                   throws java.lang.Exception
Throws:
java.lang.Exception

getConnectedTransport

javax.mail.Transport getConnectedTransport(java.lang.String name)
                                           throws java.lang.Exception
Returns a connected transport for this factory. The transport needs to be closed after use.

Parameters:
name - the name of the factory that provides the properties.
Returns:
the transport.
Throws:
java.lang.Exception

getConnectedTransport

javax.mail.Transport getConnectedTransport(java.lang.String name,
                                           java.util.Map<java.lang.String,java.lang.Object> context)
                                           throws java.lang.Exception
Throws:
java.lang.Exception

getSession

javax.mail.Session getSession(java.lang.String name)
                              throws java.lang.Exception
Returns a session for this factory, using the context to find the session or the default if no context is provided.

Throws:
java.lang.Exception

getSession

javax.mail.Session getSession(java.lang.String name,
                              java.util.Map<java.lang.String,java.lang.Object> context)
                              throws java.lang.Exception
Throws:
java.lang.Exception

getFetcher

PropertiesFetcher getFetcher(java.lang.String name)
                             throws java.lang.Exception
Throws:
java.lang.Exception

Nuxeo Enterprise Platform 5.4

Copyright © 2010 Nuxeo SAS. All Rights Reserved.