com.ibm.commerce.security.commands

Class ResetPasswordAdministratorCmdImpl

    • Field Detail

      • COPYRIGHT

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

        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.
        Returns:
        The administrator's password.
      • getLogonId

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

        public java.lang.String getRedirectURL()
        Retrieves the URL to redirect the user to after a successful password reset.
        Returns:
        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. 7.0.0.9+ 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 com.ibm.websphere.command.TargetableCommand
        Overrides:
        performExecute in class AbstractECTargetableCommand
        Throws:
        ECException
      • 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
        Parameters:
        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
        Parameters:
        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
        Parameters:
        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
        Overrides:
        validateParameters in class AbstractECTargetableCommand
        Throws:
        ECException