Class WorkflowSendMailActionHandler

  • All Implemented Interfaces:
    IWorkflowActionHandler

    public class WorkflowSendMailActionHandler
    extends Object
    implements IWorkflowActionHandler
    Sends e-mails notifying the new assigned to users of the content state.
    Since:
    4.0.4
    Version:
    $Revision: 22901 $ $Date: 2019-07-02 11:51:03 -0300 (Tue, 02 Jul 2019) $
    • Constructor Detail

      • WorkflowSendMailActionHandler

        public WorkflowSendMailActionHandler()
    • Method Detail

      • preProcessAction

        public void preProcessAction​(SessionConfig sessionConfig,
                                     ContentLocale contentLocale,
                                     WorkflowTransitionConfig transition,
                                     ContentWorkflowMetaData newWorkflowMetaData,
                                     ITransaction transaction)
                              throws PortalException
        Description copied from interface: IWorkflowActionHandler
        Method called when a workflow action is performed, before its changes are applied to the persistence layer.
        Specified by:
        preProcessAction in interface IWorkflowActionHandler
        Parameters:
        sessionConfig - the user session information.
        transition - the transition being performed, or null if no transition is being performed.
        newWorkflowMetaData - the new workflow metadata that will be saved. Changes to this object will reflect in the workflow meta data that will be saved.
        transaction - the transaction for persistence access.
        Throws:
        PortalException - if the action should be canceled.
      • prepareMailObject

        protected void prepareMailObject​(SessionConfig sessionConfig,
                                         IMultipleMail mail,
                                         ITransaction transaction)
        Method created for classes that extend this action handler to customize the mail sent.
        Parameters:
        mail -
        sessionConfig -
        transition -
        newWorkflowMetaData -
        transaction -
        Since:
        4.0.11
      • getWebsiteUrl

        protected String getWebsiteUrl​(SessionConfig sessionConfig,
                                       ContentLocale contentLocale,
                                       ITransaction transaction)
                                throws PortalException
        Method created so that classes that extend this object may customize the website url referenced in the link to the content.
        Parameters:
        sessionConfig - the user's session.
        contentLocale - the content locale.
        transaction - the transaction.
        Returns:
        a prefix URL to be used in final URL. It is not expected the return of this method to be ended with '/'.
        Throws:
        PortalException
        Since:
        6.2.0