com.ibm.commerce.security.commands

Class ResetPasswordCmdImpl

  • All Implemented Interfaces:
    AccCommand, ControllerCommand, ECCommand, ECTargetableCommand, ResetPasswordCmd, Protectable, com.ibm.websphere.cache.Sizeable, com.ibm.websphere.command.CacheableCommand, com.ibm.websphere.command.Command, com.ibm.websphere.command.CommandCaller, com.ibm.websphere.command.TargetableCommand, java.io.Serializable


    public class ResetPasswordCmdImpl
    extends ControllerCommandImpl
    implements ResetPasswordCmd

    This controller command is used to reset the password of a user.

    Before executing this task command, run the following set methods:

    If the user is currently logged into the system, the following set methods should be invoked before calling execute on the command.

    • setLogonPassword
    • setLogonPasswordOld
    • setLogonPasswordVerify
    • setRedirectURL [7.0.0.9+] If command is configured to issue validation code instead of password, the command will redirect to ResetPasswordForm instead of the RedirectURL.

    If a user is currently not logged onto the system, the following set methods should be invoked before calling execute on the command.

    • setLogonId
    • setChallengeAnswer
    • setRedirectURL
    See Also:
    Serialized Form
    • 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

      • ResetPasswordCmdImpl

        public ResetPasswordCmdImpl()
    • Method Detail

      • performExecute

        public void performExecute()
                            throws ECException
        This method executes this command.
      • If the user is unauthenticated, and validationCode is specified, it delegates to ResetPasswordGuestValidationCmd, otherwise it calls ResetPasswordGuestCmd.
      • If the user is authenticated, the command delegates to ResetPasswordRegisterCmd.
Specified by:
performExecute in interface ECCommand
Specified by:
performExecute in interface com.ibm.websphere.command.TargetableCommand
Overrides:
performExecute in class AbstractECTargetableCommand
Throws:
ECException - is thrown if an error occurs and ErrorRedirectURL is not specified
  • setChallengeAnswer

    public void setChallengeAnswer(java.lang.String strChallengeAnswer)
    This method sets the answer to the challenge question used to confirm the identity of the user.
    Specified by:
    setChallengeAnswer in interface ResetPasswordCmd
    Parameters:
    strChallengeAnswer - The answer to the challenge question.
  • setValidationCode

    public void setValidationCode(java.lang.String strValidationCode)
    This method sets the validation code used to update the password by a guest user after the challenge answer has been answered.
    Parameters:
    strValidationCode - The validation code.
  • setErrorRedirectURL

    public void setErrorRedirectURL(java.lang.String newErrorURL)
    This method sets the URL to redirect the user in case of error.
    Parameters:
    newErrorURL - The ErrorRedirectURL to be set.
  • setLogonId

    public void setLogonId(java.lang.String strLogonId)
    This method sets the logon ID of the shopper or administrator whose password needs to be reset.
    Specified by:
    setLogonId in interface ResetPasswordCmd
    Parameters:
    strLogonId - The Login ID to be set.
  • setLogonPassword

    public void setLogonPassword(java.lang.String strNewPassword)
    This method sets the new password of the user whose password is being changed.
    Specified by:
    setLogonPassword in interface ResetPasswordCmd
    Parameters:
    strNewPassword - The new password.
  • setLogonPasswordOld

    public void setLogonPasswordOld(java.lang.String strOldPassword)
    This method sets the old password of the user whose password is being changed.
    Specified by:
    setLogonPasswordOld in interface ResetPasswordCmd
    Parameters:
    strOldPassword - The old password to be changed.
  • setLogonPasswordVerify

    public void setLogonPasswordVerify(java.lang.String strNewPasswordVerify)
    This method sets the confirmation of the new password of the user whose password is being changed.
    Specified by:
    setLogonPasswordVerify in interface ResetPasswordCmd
    Parameters:
    strNewPasswordVerify - Confirmation of the new password.
  • setRedirectURL

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