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
FieldsModifier and TypeFieldDescriptionprotected FormDAOThe form DAOprotected I18nUtilsThe i18n utilsprotected LimitedEntriesHelperThe limited entries helperprotected AmetysObjectResolverAmetys object resolver.protected RightManagerThe right managerprotected SiteManagerThe site managerprotected UserManagerThe users managerstatic final StringAvalon ROLE. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected String_getFormURI(String formId, String siteName, String language) Get the form page uriprotected String_getMailBody(String formId, String message, String siteName, String language) Get the email bodyprotected String_getMailSubject(String language) Get the email subject_getUsersToInvite(Form form) Get users to invite to the form (user with mail and who are not answered yet to the form)intgetNbOfUsersToInvite(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.voidservice(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 -
_siteManager
The site manager -
_i18nUtils
The i18n utils -
_rightManager
The right manager -
_limitedEntriesHelper
The limited entries helper -
_formDAO
The form DAO
-
-
Constructor Details
-
FormInvitationsHelper
public FormInvitationsHelper()
-
-
Method Details
-
service
- Specified by:
servicein 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
-
_getMailSubject
Get the email subject- Parameters:
language- the language- Returns:
- The subject
-
_getMailBody
Get the email body- Parameters:
formId- The form idmessage- The messagesiteName- The site namelanguage- the language- Returns:
- The text body
-
_getFormURI
Get the form page uri- Parameters:
formId- The form idsiteName- The site namelanguage- the language- Returns:
- The survey absolute uri
-