com.ibm.commerce.security.commands
Class ResetPasswordRegisterCmdImpl

java.lang.Object
  |
  +--CacheableCommandImpl
        |
        +--com.ibm.commerce.command.AbstractECTargetableCommand
              |
              +--com.ibm.commerce.command.TaskCommandImpl
                    |
                    +--com.ibm.commerce.security.commands.ResetPasswordRegisterCmdImpl
All Implemented Interfaces:
ECCommand, ECTargetableCommand, ResetPasswordRegisterCmd, TaskCommand

public class ResetPasswordRegisterCmdImpl
extends TaskCommandImpl
implements ResetPasswordRegisterCmd

This task command is used to reset the password of a logged in user.

Before executing this task command, the methods listed below must be invoked.

    setNewPassword
    setNewPasswordVerify
    setOldPassword
See Also:
Serialized Form

Field Summary
static java.lang.String ERRTASK_NAME
          Error task view.
 
Fields inherited from class com.ibm.commerce.command. AbstractECTargetableCommand
commandContext
 
Fields inherited from interface com.ibm.commerce.security.commands. ResetPasswordRegisterCmd
COPYRIGHT, defaultCommandClassName, NAME
 
Fields inherited from interface com.ibm.commerce.command. ECTargetableCommand
COPYRIGHT
 
Fields inherited from interface com.ibm.commerce.command. ECCommand
defaultCommandClassName
 
Constructor Summary
ResetPasswordRegisterCmdImpl()
           
 
Method Summary
protected  java.lang.String getNewPassword()
          Retrieves the new password of the user whose password is being changed.
protected  java.lang.String getNewPasswordVerify()
          Retrieves the confirm new password of the user whose password is being changed.
protected  java.lang.String getOldPassword()
          Retrieves the old password of the user whose password is being changed.
 void performExecute()
          Executes the command.
 void setErrorRedirectURL(java.lang.String newErrorRedirectURL)
          Sets the error URL to redirect to if specified.
 void setNewPassword(java.lang.String strNewPassword)
          Sets the new password of the user whose password is being changed.
 void setNewPasswordVerify(java.lang.String strNewPasswordVerify)
          Sets the confirm new password of the user whose password is being changed.
 void setOldPassword(java.lang.String strOldPassword)
          Sets the old password of the user whose password is being changed.
 void validateParameters()
          Validates the parameters.
 
Methods inherited from class com.ibm.commerce.command. AbstractECTargetableCommand
accessControlCheck, checkIsAllowed, checkParameters, checkResourcePermission, createCommandExecutionEvent, execute, finalize, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getResources, getStoreId, getUser, getUserId, isReadyToCallExecute, reset, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ERRTASK_NAME

public static final java.lang.String ERRTASK_NAME
Error task view.
See Also:
Constant Field Values
Constructor Detail

ResetPasswordRegisterCmdImpl

public ResetPasswordRegisterCmdImpl()
Method Detail

getNewPassword

protected java.lang.String getNewPassword()
Retrieves the new password of the user whose password is being changed.
Returns:
New password.

getNewPasswordVerify

protected java.lang.String getNewPasswordVerify()
Retrieves the confirm new password of the user whose password is being changed.
Returns:
Confirmation of new password.

getOldPassword

protected java.lang.String getOldPassword()
Retrieves the old password of the user whose password is being changed.
Returns:
Old password to be changed.

performExecute

public void performExecute()
                    throws ECException
Executes the command.
Specified by:
performExecute in interface ECCommand
Overrides:
performExecute in class AbstractECTargetableCommand
Throws:
ECException

setErrorRedirectURL

public void setErrorRedirectURL(java.lang.String newErrorRedirectURL)
Sets the error URL to redirect to if specified. This is used in case of user errors in the parameters.
Specified by:
setErrorRedirectURL in interface ResetPasswordRegisterCmd

setNewPassword

public void setNewPassword(java.lang.String strNewPassword)
Sets the new password of the user whose password is being changed.
Specified by:
setNewPassword in interface ResetPasswordRegisterCmd
Parameters:
strNewPassword - New password.

setNewPasswordVerify

public void setNewPasswordVerify(java.lang.String strNewPasswordVerify)
Sets the confirm new password of the user whose password is being changed.
Specified by:
setNewPasswordVerify in interface ResetPasswordRegisterCmd
Parameters:
strNewPasswordVerify - Confirmation of new password.

setOldPassword

public void setOldPassword(java.lang.String strOldPassword)
Sets the old password of the user whose password is being changed.
Specified by:
setOldPassword in interface ResetPasswordRegisterCmd
Parameters:
strOldPassword - Old password to be changed.

validateParameters

public void validateParameters()
                        throws ECException
Validates the parameters. Ensures that oldPassword, password, and passwordVerify are non-zero length strings. Next, ensures that password and passwordVerify match. Finally, checks to ensure that the new password satisfies all defined password policies.
Specified by:
validateParameters in interface ECCommand
Overrides:
validateParameters in class AbstractECTargetableCommand
Throws:
ECException