Class MailServiceImpl
java.lang.Object
org.nuxeo.runtime.model.DefaultComponent
org.nuxeo.ecm.platform.mail.service.MailServiceImpl
- All Implemented Interfaces:
MailService,Adaptable,Component,Extensible,TimestampedService
- Author:
- Alexandre Russel
-
Field Summary
FieldsFields inherited from class org.nuxeo.runtime.model.DefaultComponent
lastModified, name -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionjakarta.mail.StoregetConnectedStore(String name) Returns a connected store for this factory.jakarta.mail.StoregetConnectedStore(String name, Map<String, Object> context) jakarta.mail.TransportgetConnectedTransport(String name) Returns a connected transport for this factory.jakarta.mail.TransportgetConnectedTransport(String name, Map<String, Object> context) getFetcher(String name) getMailBoxActions(String factoryName, String folderName) Returns an actions pipe configured with this factory.Gets the pipe of actions for given namejakarta.mail.SessiongetSession(String name) Returns a session for this factory, using the context to find the session or the default if no context is provided.jakarta.mail.SessiongetSession(String name, Map<String, Object> context) protected jakarta.mail.SessionnewSession(Properties props) voidregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor) voidSends a mail using the setting of this factory to this recipients.voidsendMail(String text, String subject, String factory, jakarta.mail.Address[] recipients, Map<String, Object> context) voidstop(ComponentContext context) Stop the component.voidunregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor) Methods inherited from class org.nuxeo.runtime.model.DefaultComponent
activate, addRuntimeMessage, addRuntimeMessage, deactivate, getAdapter, getDescriptor, getDescriptors, getLastModified, getRegistry, register, registerExtension, setLastModified, setModifiedNow, setName, start, unregister, unregisterExtensionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.nuxeo.runtime.model.Component
getApplicationStartedOrder
-
Field Details
-
sessions
-
-
Constructor Details
-
MailServiceImpl
public MailServiceImpl()
-
-
Method Details
-
stop
Description copied from interface:ComponentStop the component.- Specified by:
stopin interfaceComponent- Overrides:
stopin classDefaultComponent
-
registerContribution
public void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor) - Overrides:
registerContributionin classDefaultComponent
-
unregisterContribution
public void unregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor) - Overrides:
unregisterContributionin classDefaultComponent
-
getConnectedStore
Description copied from interface:MailServiceReturns a connected store for this factory. The store needs to be closed after use.- Specified by:
getConnectedStorein interfaceMailService- Parameters:
name- The name of the factory that provides the properties.- Returns:
- the store.
- Throws:
jakarta.mail.MessagingException
-
getConnectedStore
public jakarta.mail.Store getConnectedStore(String name, Map<String, Object> context) throws jakarta.mail.MessagingException- Specified by:
getConnectedStorein interfaceMailService- Throws:
jakarta.mail.MessagingException
-
getConnectedTransport
public jakarta.mail.Transport getConnectedTransport(String name) throws jakarta.mail.MessagingException Description copied from interface:MailServiceReturns a connected transport for this factory. The transport needs to be closed after use.- Specified by:
getConnectedTransportin interfaceMailService- Parameters:
name- the name of the factory that provides the properties.- Returns:
- the transport.
- Throws:
jakarta.mail.MessagingException
-
getConnectedTransport
public jakarta.mail.Transport getConnectedTransport(String name, Map<String, Object> context) throws jakarta.mail.MessagingException- Specified by:
getConnectedTransportin interfaceMailService- Throws:
jakarta.mail.MessagingException
-
getSession
Description copied from interface:MailServiceReturns a session for this factory, using the context to find the session or the default if no context is provided.- Specified by:
getSessionin interfaceMailService
-
getSession
- Specified by:
getSessionin interfaceMailService
-
getMailBoxActions
public MailBoxActions getMailBoxActions(String factoryName, String folderName) throws jakarta.mail.MessagingException Description copied from interface:MailServiceReturns 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.
- Specified by:
getMailBoxActionsin interfaceMailService- Throws:
jakarta.mail.MessagingException
-
getMailBoxActions
public MailBoxActions getMailBoxActions(String factoryName, String folderName, Map<String, Object> context) throws jakarta.mail.MessagingException- Specified by:
getMailBoxActionsin interfaceMailService- Throws:
jakarta.mail.MessagingException
-
sendMail
public void sendMail(String text, String subject, String factory, jakarta.mail.Address[] recipients) Description copied from interface:MailServiceSends 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.
- Specified by:
sendMailin interfaceMailService
-
sendMail
public void sendMail(String text, String subject, String factory, jakarta.mail.Address[] recipients, Map<String, Object> context) - Specified by:
sendMailin interfaceMailService
-
getFetcher
- Specified by:
getFetcherin interfaceMailService
-
getPipe
Description copied from interface:MailServiceGets the pipe of actions for given name- Specified by:
getPipein interfaceMailService
-
newSession
-