Class ResetPasswordAdministratorCmdImpl

    • Field Detail


        public static final java.lang.String COPYRIGHT
        The copyright statement.
        See Also:
        Constant Field Values

        public static final java.lang.String ERRTASK_NAME
        The error task name.
        See Also:
        Constant Field Values
    • Constructor Detail

      • ResetPasswordAdministratorCmdImpl

        public ResetPasswordAdministratorCmdImpl()
    • Method Detail

      • getAdminPassword

        public java.lang.String getAdminPassword()
        Retrieves the password of the administrator who is resetting the shopper's password.
        The administrator's password.
      • getLogonId

        public java.lang.String getLogonId()
        Retrieves the logon ID of the shopper whose password needs to be reset.
        The logon ID.
      • getRedirectURL

        public java.lang.String getRedirectURL()
        Retrieves the URL to redirect the user to after a successful password reset.
        The URL to redirect too.
      • performExecute

        public void performExecute()
                            throws ECException
        This method executes the command to reset the password of user in one of two ways:
        1. Default: Generates a new random password and email's it to the user.
        2. when validationCode=true in CMDREG table: Sends a validation code along with a URL for ResetPasswordForm, so that the validation code and new password can be specified.
        3. V8+ when byPassAdminPassword=true in CMDREG table: Bypass the validation for administrator's password. The administrator's password is not a mandatory input and VerifyCredentialsCmd will be bypassed.
        This command requires the administrator's account not to be disabled and the supplied administrator's credentials to be valid. The following methods are called:
        • VerifyCredentialsCmd to verify that the administrator's credentials are valid.
        • GeneratePasswordCmd to generate a new random password.
        • SendPasswordNotificationCmd to send the new password to the user, or if configured to use validation code, the code is passed using the password setter. The ResetPasswordForm URL is passed in the default properties.
        Specified by:
        performExecute in interface ECCommand
        Specified by:
        performExecute in interface
        performExecute in class AbstractECTargetableCommand
      • setAdministratorPassword

        public void setAdministratorPassword(java.lang.String strAdminPassword)
        This method sets the administratorís password, who resets the password of the shopper.
        Specified by:
        setAdministratorPassword in interface ResetPasswordAdministratorCmd
        strAdminPassword - The administrator's password.
      • setLogonId

        public void setLogonId(java.lang.String strLogonId)
        This method sets the logon ID of the shopper whose password is reset.
        Specified by:
        setLogonId in interface ResetPasswordAdministratorCmd
        strLogonId - Login ID to set.
      • setRedirectURL

        public void setRedirectURL(java.lang.String strRedirectURL)
        This method sets the URL to redirect the user to after a successful password reset.
        Specified by:
        setRedirectURL in interface ResetPasswordAdministratorCmd
        strRedirectURL - URL to redirect to.
      • validateParameters

        public void validateParameters()
                                throws ECException
        This method validates the parameters by ensuring the following:
        • The redirectURL is specified.
        • The userType is either administrator or siteAdministrator.
        • The logon ID is specified and belongs to a registered user.
        • The administrator's password is specified.
        Specified by:
        validateParameters in interface ECCommand
        validateParameters in class AbstractECTargetableCommand