Class MailInformationHelper
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.plugins.forms.workflow.MailInformationHelper
- All Implemented Interfaces:
LogEnabled
,Component
,Serviceable
Helper component allowing to retrieve information in order to send emails
-
Field Summary
Modifier and TypeFieldDescriptionprotected CurrentUserProvider
The current user providerprotected static final Pattern
The email validation pattern.protected FormPropertiesManager
The manager for the JCR representation of formsprotected FormTableManager
The manager for the form entriesprotected UserManager
The user managerstatic final String
The Avalon role -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription_getAvailableRecipients
(UserEntry formEntry) Get the available recipients from the form entries to propose recipients.protected UserEntry
_getFormEntry
(String formId, Integer entryId) Get the form entry from form identifier and entry identifier.Get the sender filled into the dialog to send informations to claimant by email about his form entry status.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 Details
-
ROLE
The Avalon role -
_EMAIL_PATTERN
The email validation pattern. -
_currentUserProvider
The current user provider -
_userManager
The user manager -
_formPropertiesManager
The manager for the JCR representation of forms -
_formTableManager
The manager for the form entries
-
-
Constructor Details
-
MailInformationHelper
public MailInformationHelper()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
getMailInfo
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
-
_getSender
Get the sender filled into the dialog to send informations to claimant by email about his form entry status.- Returns:
- the sender
-
_getAvailableRecipients
Get the available recipients from the form entries to propose recipients.- Parameters:
formEntry
- The form entry- Returns:
- the list of available recipients
-
_getFormEntry
Get the form entry from form identifier and entry identifier.- Parameters:
formId
- The form identryId
- The entry id- Returns:
- the form entry or throw a
IllegalArgumentException
if it doesn't exist.
-