Class MailInformationHelper
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.plugins.forms.workflow.MailInformationHelper
-
- All Implemented Interfaces:
LogEnabled
,Component
,Serviceable
public class MailInformationHelper extends AbstractLogEnabled implements Component, Serviceable
Helper component allowing to retrieve information in order to send emails
-
-
Field Summary
Fields Modifier and Type Field Description private CurrentUserProvider
_currentUserProvider
The current user providerprotected static Pattern
_EMAIL_PATTERN
The email validation pattern.private FormPropertiesManager
_formPropertiesManager
The manager for the JCR representation of formsprivate FormTableManager
_formTableManager
The manager for the form entriesprivate UserManager
_userManager
The user managerstatic String
ROLE
The Avalon role
-
Constructor Summary
Constructors Constructor Description MailInformationHelper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,Object>
getMailInfo(String formId, Integer entryId)
Get information on the given entry of the given formvoid
service(ServiceManager serviceManager)
-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
-
-
-
Field Detail
-
_EMAIL_PATTERN
protected static final Pattern _EMAIL_PATTERN
The email validation pattern.
-
_currentUserProvider
private CurrentUserProvider _currentUserProvider
The current user provider
-
_userManager
private UserManager _userManager
The user manager
-
_formPropertiesManager
private FormPropertiesManager _formPropertiesManager
The manager for the JCR representation of forms
-
_formTableManager
private FormTableManager _formTableManager
The manager for the form entries
-
-
Constructor Detail
-
MailInformationHelper
public MailInformationHelper()
-
-
Method Detail
-
service
public void service(ServiceManager serviceManager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
getMailInfo
public Map<String,Object> getMailInfo(String formId, Integer entryId)
Get information on the given entry of the given form- Parameters:
formId
- the id of the formentryId
- the id of the entry- Returns:
- a map of information on the current user and on the email fields filled in the entry
-
-