Class ResetPasswordServiceImpl

  • All Implemented Interfaces:
    ResetPasswordService

    public class ResetPasswordServiceImpl
    extends java.lang.Object
    implements ResetPasswordService
    Reset password implementation based on workflow.
    Since:
    5.2.1
    Author:
    Jamal Kaabi-Mofrad
    • Constructor Detail

      • ResetPasswordServiceImpl

        public ResetPasswordServiceImpl()
    • Method Detail

      • setWorkflowService

        public void setWorkflowService​(WorkflowService workflowService)
      • setActivitiHistoryService

        public void setActivitiHistoryService​(org.activiti.engine.HistoryService activitiHistoryService)
      • setActionService

        public void setActionService​(ActionService actionService)
      • setPersonService

        public void setPersonService​(PersonService personService)
      • setNodeService

        public void setNodeService​(org.alfresco.service.cmr.repository.NodeService nodeService)
      • setSysAdminParams

        public void setSysAdminParams​(SysAdminParams sysAdminParams)
      • setActivitiTaskService

        public void setActivitiTaskService​(org.activiti.engine.TaskService activitiTaskService)
      • setEmailHelper

        public void setEmailHelper​(EmailHelper emailHelper)
      • setClientAppConfig

        public void setClientAppConfig​(ClientAppConfig clientAppConfig)
      • setTimerEnd

        public void setTimerEnd​(java.lang.String timerEnd)
      • setDefaultEmailSender

        public void setDefaultEmailSender​(java.lang.String defaultEmailSender)
      • setSendEmailAsynchronously

        public void setSendEmailAsynchronously​(boolean sendEmailAsynchronously)
      • init

        public void init()
      • requestReset

        public void requestReset​(java.lang.String userId,
                                 java.lang.String clientName)
        Description copied from interface: ResetPasswordService
        Request password reset (starts the workflow).
        Specified by:
        requestReset in interface ResetPasswordService
        Parameters:
        userId - the user id
        clientName - the client app name (used to lookup the client that is registered to send emails so that client's specific configuration could be used.)
      • validateUserAndGetEmail

        protected java.lang.String validateUserAndGetEmail​(java.lang.String userId)
      • sendResetPasswordEmail

        public void sendResetPasswordEmail​(org.activiti.engine.delegate.DelegateExecution execution,
                                           java.lang.String fallbackEmailTemplatePath,
                                           java.lang.String emailSubject)
        Description copied from interface: ResetPasswordService
        Sends reset password email.
        Specified by:
        sendResetPasswordEmail in interface ResetPasswordService
        Parameters:
        execution - the DelegateExecution object (is provided when a user requests password reset)
        fallbackEmailTemplatePath - the class path of the fallback email template (request reset password email)
        emailSubject - the email subject key
      • performResetPassword

        public void performResetPassword​(org.activiti.engine.delegate.DelegateExecution execution)
        Description copied from interface: ResetPasswordService
        Updates the user's new password.
        Specified by:
        performResetPassword in interface ResetPasswordService
        Parameters:
        execution - the DelegateExecution object
      • sendResetPasswordConfirmationEmail

        public void sendResetPasswordConfirmationEmail​(org.activiti.engine.delegate.DelegateExecution execution,
                                                       java.lang.String fallbackEmailTemplatePath,
                                                       java.lang.String emailSubject)
        Description copied from interface: ResetPasswordService
        Updates the user's new password.
        Specified by:
        sendResetPasswordConfirmationEmail in interface ResetPasswordService
        Parameters:
        execution - the DelegateExecution object
        fallbackEmailTemplatePath - the class path of the fallback email template (confirmation email)
        emailSubject - the email subject key
      • getResetPasswordEmailTemplate

        protected java.lang.String getResetPasswordEmailTemplate​(ClientAppConfig.ClientApp clientApp)
      • getConfirmResetPasswordEmailTemplate

        protected java.lang.String getConfirmResetPasswordEmailTemplate​(ClientAppConfig.ClientApp clientApp)
      • createResetPasswordUrl

        protected java.lang.String createResetPasswordUrl​(ClientAppConfig.ClientApp clientApp,
                                                          java.lang.String id,
                                                          java.lang.String key)
        This method creates a URL for the 'reset password' link which appears in the email