Package org.ametys.plugins.ugc.workflow
Class SendMailToCreatorFunction
- java.lang.Object
-
- org.ametys.plugins.workflow.AbstractWorkflowComponent
-
- org.ametys.cms.workflow.AbstractContentWorkflowComponent
-
- org.ametys.cms.workflow.SendMailFunction
-
- org.ametys.web.workflow.SendMailFunction
-
- org.ametys.plugins.ugc.workflow.SendMailToCreatorFunction
-
- All Implemented Interfaces:
com.opensymphony.workflow.FunctionProvider
,PluginAware
,Initializable
,Contextualizable
,LogEnabled
,Serviceable
public class SendMailToCreatorFunction extends SendMailFunction
OS workflow function to send mail after an action is triggered.
-
-
Field Summary
Fields Modifier and Type Field Description private ContentTypesHelper
_cTypeHelper
-
Fields inherited from class org.ametys.cms.workflow.SendMailFunction
_context, _currentUserProvider, _i18nUtils, _pluginName, _rightManager, _sourceResolver, _userManager, _workflowProvider, BODY_KEY, RIGHTS_KEY, SEND_MAIL, SUBJECT_KEY
-
Fields inherited from class org.ametys.cms.workflow.AbstractContentWorkflowComponent
_contentHelper, CONTENT_KEY
-
Fields inherited from class org.ametys.plugins.workflow.AbstractWorkflowComponent
_logger, _manager, CONTEXT_PARAMETERS_KEY, FAIL_CONDITIONS_KEY, RESULT_MAP_KEY, WORKFLOW_ERRORS_KEY, WORKFLOW_WARNS_KEY
-
-
Constructor Summary
Constructors Constructor Description SendMailToCreatorFunction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected List<String>
getBodyI18nParams(User user, WorkflowAwareContent content)
Get the i18n parameters of mail body textprotected Set<String>
getRecipients(Map transientVars, WorkflowAwareContent content, Set<String> rights)
Get the recipientsprotected String
getSender(Map transientVars, WorkflowAwareContent content)
Get the sender for mailvoid
service(ServiceManager smanager)
-
Methods inherited from class org.ametys.web.workflow.SendMailFunction
_getContentUri, _getPage, _getSite, getMailBody, getSubjectI18nParams
-
Methods inherited from class org.ametys.cms.workflow.SendMailFunction
_getContentUri, _getRequest, _getRequestUri, _getUsers, _sendMails, contextualize, execute, getCaller, getMailSubject, initialize, setPluginInfo
-
Methods inherited from class org.ametys.cms.workflow.AbstractContentWorkflowComponent
getContent
-
Methods inherited from class org.ametys.plugins.workflow.AbstractWorkflowComponent
addWorkflowError, addWorkflowWarning, enableLogging, getConditionFailures, getContextParameters, getResultsMap, getUser
-
-
-
-
Field Detail
-
_cTypeHelper
private ContentTypesHelper _cTypeHelper
-
-
Constructor Detail
-
SendMailToCreatorFunction
public SendMailToCreatorFunction()
-
-
Method Detail
-
service
public void service(ServiceManager smanager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classAbstractContentWorkflowComponent
- Throws:
ServiceException
-
getRecipients
protected Set<String> getRecipients(Map transientVars, WorkflowAwareContent content, Set<String> rights) throws com.opensymphony.workflow.WorkflowException
Description copied from class:SendMailFunction
Get the recipients- Overrides:
getRecipients
in classSendMailFunction
- Parameters:
transientVars
- the transient variablescontent
- the content.rights
- the set of rights to check.- Returns:
- the recipients.
- Throws:
com.opensymphony.workflow.WorkflowException
- If failed to get recipients
-
getSender
protected String getSender(Map transientVars, WorkflowAwareContent content) throws com.opensymphony.workflow.WorkflowException
Description copied from class:SendMailFunction
Get the sender for mail- Overrides:
getSender
in classSendMailFunction
- Parameters:
transientVars
- the transient variablescontent
- the content- Returns:
- the sender email address
- Throws:
com.opensymphony.workflow.WorkflowException
- if failed to get email for sender
-
getBodyI18nParams
protected List<String> getBodyI18nParams(User user, WorkflowAwareContent content)
Description copied from class:SendMailFunction
Get the i18n parameters of mail body text- Overrides:
getBodyI18nParams
in classSendMailFunction
- Parameters:
user
- the callercontent
- the content- Returns:
- the i18n parameters
-
-