Package org.ametys.plugins.forms.helper
Class FormInvitationsHelper
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.plugins.forms.helper.FormInvitationsHelper
- All Implemented Interfaces:
LogEnabled
,Component
,Serviceable
The helper to schedule opening of form
-
Field Summary
Modifier and TypeFieldDescriptionprotected FormDAO
The form DAOprotected FormMailHelper
The form mail helperprotected LimitedEntriesHelper
The limited entries helperprotected AmetysObjectResolver
Ametys object resolver.protected RightManager
The right managerprotected UserManager
The users managerstatic final String
Avalon ROLE. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription_getUsersToInvite
(Form form) Get users to invite to the form (user with mail and who are not answered yet to the form)int
getNbOfUsersToInvite
(String formId) Get users to invite to the form (user with mail and who are not answered yet to the form)sendInvitations
(String formId, String message, String siteName, String language) Sends invitations emails.void
service
(ServiceManager manager) Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
ROLE
Avalon ROLE. -
_resolver
Ametys object resolver. -
_userManager
The users manager -
_rightManager
The right manager -
_limitedEntriesHelper
The limited entries helper -
_formDAO
The form DAO -
_formMailHelper
The form mail helper
-
-
Constructor Details
-
FormInvitationsHelper
public FormInvitationsHelper()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
sendInvitations
public Map<String,Object> sendInvitations(String formId, String message, String siteName, String language) Sends invitations emails.- Parameters:
formId
- The id of the form.message
- The message content.siteName
- The site name.language
- the language- Returns:
- An empty map
-
_getUsersToInvite
Get users to invite to the form (user with mail and who are not answered yet to the form)- Parameters:
form
- the form- Returns:
- the users to invite
-
getNbOfUsersToInvite
Get users to invite to the form (user with mail and who are not answered yet to the form)- Parameters:
formId
- The id of the form.- Returns:
- The number of users to invite
-