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,EnhancedFunction,PluginAware,Initializable,Contextualizable,LogEnabled,Serviceable
OS workflow function to send mail after an action is triggered.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.ametys.plugins.workflow.AbstractWorkflowComponent
AbstractWorkflowComponent.ConditionFailureNested classes/interfaces inherited from interface org.ametys.plugins.workflow.EnhancedFunction
EnhancedFunction.FunctionType -
Field Summary
Fields inherited from class org.ametys.cms.workflow.SendMailFunction
_context, _i18nUtils, _pluginName, _rightManager, _rightsExtensionPoint, _sourceResolver, _userManager, _workflowProvider, BODY_KEY, RIGHTS_KEY, SEND_MAIL, SUBJECT_KEYFields inherited from class org.ametys.cms.workflow.AbstractContentWorkflowComponent
_contentHelper, CONTENT_KEY, HAS_CHANGED_KEYFields inherited from class org.ametys.plugins.workflow.AbstractWorkflowComponent
_logger, _manager, CONTEXT_PARAMETERS_KEY, FAIL_CONDITIONS_KEY, RESULT_MAP_KEY, WORKFLOW_VALIDATION_KEY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetBodyI18nParams(User user, WorkflowAwareContent content) Get the i18n parameters of mail body textgetLabel()Get the label for this functiongetRecipients(Map transientVars, WorkflowAwareContent content, Set<String> rights) Get the recipientsprotected StringgetSender(Map transientVars, WorkflowAwareContent content) Get the sender for mailvoidservice(ServiceManager smanager) Methods inherited from class org.ametys.web.workflow.SendMailFunction
_getContentUri, _getPage, _getRequestUri, _getSite, getMailBody, getSubjectI18nParamsMethods inherited from class org.ametys.cms.workflow.SendMailFunction
_getContentUri, _getRequest, _getUsers, _sendMails, contextualize, execute, getArguments, getCaller, getFullLabel, getFunctionExecType, getMailSubject, initialize, setPluginInfoMethods inherited from class org.ametys.cms.workflow.AbstractContentWorkflowComponent
getContentMethods inherited from class org.ametys.plugins.workflow.AbstractWorkflowComponent
addWorkflowError, addWorkflowWarning, enableLogging, getConditionFailures, getContextParameters, getResultsMap, getUserMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.ametys.plugins.workflow.EnhancedFunction
getVisibilities
-
Constructor Details
-
SendMailToCreatorFunction
public SendMailToCreatorFunction()
-
-
Method Details
-
service
- Specified by:
servicein interfaceServiceable- Overrides:
servicein classSendMailFunction- Throws:
ServiceException
-
getRecipients
protected Set<String> getRecipients(Map transientVars, WorkflowAwareContent content, Set<String> rights) throws com.opensymphony.workflow.WorkflowException Description copied from class:SendMailFunctionGet the recipients- Overrides:
getRecipientsin 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:SendMailFunctionGet the sender for mail- Overrides:
getSenderin 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
Description copied from class:SendMailFunctionGet the i18n parameters of mail body text- Overrides:
getBodyI18nParamsin classSendMailFunction- Parameters:
user- the callercontent- the content- Returns:
- the i18n parameters
-
getLabel
Description copied from interface:EnhancedFunctionGet the label for this function- Specified by:
getLabelin interfaceEnhancedFunction- Overrides:
getLabelin classSendMailFunction- Returns:
- the label
-