Class SendProcessMailFunction
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.plugins.bpm.workflowsdef.SendProcessMailFunction
-
- All Implemented Interfaces:
com.opensymphony.workflow.FunctionProvider,LogEnabled,Component,Contextualizable,Serviceable
public class SendProcessMailFunction extends AbstractLogEnabled implements Component, com.opensymphony.workflow.FunctionProvider, Serviceable, Contextualizable
Send mail to the users listed in the "users" argument. If the "sendToCreator" argument is present, the mail will also be send to the process creator
-
-
Field Summary
Fields Modifier and Type Field Description private static String__CONFIG_FROM_MAILprivate BPMWorkflowManager_bpmWorkflowManagerprivate Context_contextprivate CurrentUserProvider_currentUserProviderprivate I18nUtils_i18nUtilsprivate JSONUtils_jsonUtilsprivate UserManager_userManagerprotected static StringBODY_KEYThe mail body key.static StringSEND_MAILActually send the email ?protected static StringSUBJECT_KEYThe mail subject key.
-
Constructor Summary
Constructors Constructor Description SendProcessMailFunction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private String_getBody(String bodyI18nKey, JCRWorkflowProcess process, User creatorUser)private List<User>_getRecipients(String users, String sendToCreator, User creatorUser)private String_getSubject(String subjectI18nKey, JCRWorkflowProcess process)voidcontextualize(Context context)voidexecute(Map transientVars, Map args, com.opensymphony.module.propertyset.PropertySet ps)voidservice(ServiceManager manager)-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
-
-
-
Field Detail
-
SEND_MAIL
public static final String SEND_MAIL
Actually send the email ?- See Also:
- Constant Field Values
-
SUBJECT_KEY
protected static final String SUBJECT_KEY
The mail subject key.- See Also:
- Constant Field Values
-
BODY_KEY
protected static final String BODY_KEY
The mail body key.- See Also:
- Constant Field Values
-
__CONFIG_FROM_MAIL
private static final String __CONFIG_FROM_MAIL
- See Also:
- Constant Field Values
-
_jsonUtils
private JSONUtils _jsonUtils
-
_userManager
private UserManager _userManager
-
_i18nUtils
private I18nUtils _i18nUtils
-
_bpmWorkflowManager
private BPMWorkflowManager _bpmWorkflowManager
-
_currentUserProvider
private CurrentUserProvider _currentUserProvider
-
-
Constructor Detail
-
SendProcessMailFunction
public SendProcessMailFunction()
-
-
Method Detail
-
contextualize
public void contextualize(Context context) throws ContextException
- Specified by:
contextualizein interfaceContextualizable- Throws:
ContextException
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
servicein interfaceServiceable- Throws:
ServiceException
-
execute
public void execute(Map transientVars, Map args, com.opensymphony.module.propertyset.PropertySet ps) throws com.opensymphony.workflow.WorkflowException
- Specified by:
executein interfacecom.opensymphony.workflow.FunctionProvider- Throws:
com.opensymphony.workflow.WorkflowException
-
_getSubject
private String _getSubject(String subjectI18nKey, JCRWorkflowProcess process)
-
_getBody
private String _getBody(String bodyI18nKey, JCRWorkflowProcess process, User creatorUser)
-
-