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_MAIL
private BPMWorkflowManager
_bpmWorkflowManager
private Context
_context
private CurrentUserProvider
_currentUserProvider
private I18nUtils
_i18nUtils
private JSONUtils
_jsonUtils
private UserManager
_userManager
protected static String
BODY_KEY
The mail body key.static String
SEND_MAIL
Actually send the email ?protected static String
SUBJECT_KEY
The 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)
void
contextualize(Context context)
void
execute(Map transientVars, Map args, com.opensymphony.module.propertyset.PropertySet ps)
void
service(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:
contextualize
in interfaceContextualizable
- Throws:
ContextException
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
execute
public void execute(Map transientVars, Map args, com.opensymphony.module.propertyset.PropertySet ps) throws com.opensymphony.workflow.WorkflowException
- Specified by:
execute
in 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)
-
-