com.ibm.commerce.security.commands
Class ResetPasswordCmdImpl

com.ibm.commerce.command.AbstractECTargetableCommand
  |
  +--com.ibm.commerce.command.ControllerCommandImpl
        |
        +--com.ibm.commerce.security.commands.ResetPasswordCmdImpl
All Implemented Interfaces:
AccCommand, ControllerCommand, ECCommand, ECTargetableCommand, Protectable, ResetPasswordCmd

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 commands:

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

		setLogonPassword
		setLogonPasswordOld
		setLogonPasswordVerify
		setRedirectURL
 

If the user is currently not logged into the system, to reset the password of the user's registered identity, the following set methods should be invoked before calling the execute method on the command.

		setLogonId
		setChallengeAnswer
		setRedirectURL
 


Field Summary
static java.lang.String COPYRIGHT
           
static java.lang.String ERRTASK_NAME
           
 
Fields inherited from class com.ibm.commerce.command.ControllerCommandImpl
requestProperties, responseProperties, retriable, viewReqProperties
 
Fields inherited from class com.ibm.commerce.command.AbstractECTargetableCommand
commandContext
 
Fields inherited from interface com.ibm.commerce.security.commands.ResetPasswordCmd
defaultCommandClassName, NAME
 
Constructor Summary
ResetPasswordCmdImpl()
           
 
Method Summary
protected  java.lang.String getChallengeAnswer()
          Retrieves the answer to the challenge question; used to confirm identity.
protected  java.lang.String getErrorRedirectURL()
          Retrieves optional URL that the user should be redirected to on error conditions.
protected  java.lang.String getLogonId()
          Retrieves the logon ID of the shopper or administrator whose password needs to be reset.
protected  java.lang.String getLogonPassword()
          Retrieves the new password of the user whose password is being changed.
protected  java.lang.String getLogonPasswordOld()
          Retrieves the old password of the user whose password is being changed.
protected  java.lang.String getLogonPasswordVerify()
          Retrieves the confirm new password of the user whose password is being changed.
protected  java.lang.String getRedirectURL()
          Retrieves the URL to which the user should be redirected after a successful password reset.
 void performExecute()
          Contains the actual business logic of the command It should be implemented by all the command writer.
 void setChallengeAnswer(java.lang.String strChallengeAnswer)
          Sets the answer to the challenge question; used to confirm identity.
 void setErrorRedirectURL(java.lang.String newErrorURL)
          Sets the URL specified in the request to redirect in cases of user errror.
 void setLogonId(java.lang.String strLogonId)
          Sets the logon ID of the shopper or administrator whose password needs to be reset.
 void setLogonPassword(java.lang.String strNewPassword)
          Sets the new password of the user whose password is being changed.
 void setLogonPasswordOld(java.lang.String strOldPassword)
          Sets the old password of the user whose password is being changed.
 void setLogonPasswordVerify(java.lang.String strNewPasswordVerify)
          Sets the confirm new password of the user whose password is being changed.
 void setRedirectURL(java.lang.String strRedirectURL)
          Sets the URL that the user should be redirected after successful password reset.
 void setRequestProperties(TypedProperty hshReqParameters)
          The WebController calls this method before invoking the execute method in this command to set the request properties for this command.
 void validateParameters()
          Performs server side parameter checking.
 
Methods inherited from class com.ibm.commerce.command.ControllerCommandImpl
fulfills, getForUserId, getGeneric, getOwner, getRequestProperties, getResolvedRequestProperties, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setForUserId, setGeneric, setOwner, setResponseProperties, setRetriable, setViewInputProperties
 
Methods inherited from class com.ibm.commerce.command.AbstractECTargetableCommand
accessControlCheck, checkIsAllowed, checkResourcePermission, execute, finalize, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getResources, getStoreId, getUser, getUserId, isReadyToCallExecute, reset, setAccCheck, setCommandContext, setCommandIfName, setDefaultProperties
 
Methods inherited from interface com.ibm.commerce.command.ControllerCommand
execute, getGeneric, getRequestProperties, getResolvedRequestProperties, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setGeneric, setRetriable, setViewInputProperties
 
Methods inherited from interface com.ibm.commerce.command.AccCommand
accessControlCheck, getAccCheck, getForUserId, setAccCheck, setForUserId, setOwner
 
Methods inherited from interface com.ibm.commerce.command.ECCommand
checkIsAllowed, checkResourcePermission, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getResources, getStoreId, getUser, getUserId, setCommandContext, setCommandIfName, setDefaultProperties
 
Methods inherited from interface com.ibm.commerce.security.Protectable
fulfills, getOwner
 

Field Detail

COPYRIGHT

public static final java.lang.String COPYRIGHT

ERRTASK_NAME

public static final java.lang.String ERRTASK_NAME
Constructor Detail

ResetPasswordCmdImpl

public ResetPasswordCmdImpl()
Method Detail

getChallengeAnswer

protected java.lang.String getChallengeAnswer()
Retrieves the answer to the challenge question; used to confirm identity.
Returns:
The answer to the challenge question.

getErrorRedirectURL

protected java.lang.String getErrorRedirectURL()
Retrieves optional URL that the user should be redirected to on error conditions.
Returns:
URL which to redirect.

getLogonId

protected java.lang.String getLogonId()
Retrieves the logon ID of the shopper or administrator whose password needs to be reset.
Returns:
LoginID to be set.

getLogonPassword

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

getLogonPasswordOld

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

getLogonPasswordVerify

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

getRedirectURL

protected java.lang.String getRedirectURL()
Retrieves the URL to which the user should be redirected after a successful password reset.
Returns:
URL which to redirect.

performExecute

public void performExecute()
                    throws ECException
Description copied from interface: ECCommand
Contains the actual business logic of the command It should be implemented by all the command writer.
Specified by:
performExecute in interface ECCommand
Overrides:
performExecute in class AbstractECTargetableCommand
Following copied from interface: com.ibm.commerce.command.ECCommand
Throws:
com.ibm.commerce.command.CommandException - The superclass for all ECExceptions.

setChallengeAnswer

public void setChallengeAnswer(java.lang.String strChallengeAnswer)
Sets the answer to the challenge question; used to confirm identity.
Specified by:
setChallengeAnswer in interface ResetPasswordCmd
Parameters:
strChallengeAnswer - The answer to the challenge question.

setErrorRedirectURL

public void setErrorRedirectURL(java.lang.String newErrorURL)
Sets the URL specified in the request to redirect in cases of user errror.
Parameters:
newErrorURL - ErrorRedirectURL to be set.

setLogonId

public void setLogonId(java.lang.String strLogonId)
Sets the logon ID of the shopper or administrator whose password needs to be reset.
Specified by:
setLogonId in interface ResetPasswordCmd
Parameters:
strLoginID - LoginID to be set.

setLogonPassword

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

setLogonPasswordOld

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

setLogonPasswordVerify

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

setRedirectURL

public void setRedirectURL(java.lang.String strRedirectURL)
Sets the URL that the user should be redirected after successful password reset.
Specified by:
setRedirectURL in interface ResetPasswordCmd
Parameters:
strRedirectURL - URL to redirect to.

setRequestProperties

public void setRequestProperties(TypedProperty hshReqParameters)
                          throws ECApplicationException
Description copied from interface: ControllerCommand
The WebController calls this method before invoking the execute method in this command to set the request properties for this command. It is the responsibility of the implementer of the ControllerCommand to extract the required input parameters from the request properties and perform parameter checking.
Specified by:
setRequestProperties in interface ControllerCommand
Overrides:
setRequestProperties in class ControllerCommandImpl
Following copied from interface: com.ibm.commerce.command.ControllerCommand
Parameters:
requestProperties - com.ibm.commerce.datatype.TypedProperty
Throws:
com.ibm.commerce.exception.ECException. -  

validateParameters

public void validateParameters()
                        throws ECException
Description copied from interface: ECCommand
Performs server side parameter checking. This method replaces the checkParameters() method in a previous version of the code.

Specified by:
validateParameters in interface ECCommand
Overrides:
validateParameters in class AbstractECTargetableCommand
Following copied from interface: com.ibm.commerce.command.ECCommand
Throws:
ECException. -