com.ibm.commerce.security.commands
Class UpdateCredentialsCmdImpl

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

public class UpdateCredentialsCmdImpl
extends TaskCommandImpl
implements UpdateCredentialsCmd

This command will take the input credentials and update them in either the database, LDAP, or third party system depending on how the WCS system was configured.

Before executing this task command the following sets should be performed:

    setLogonId
    setPassword
Error View Task: UpdateCredentialsCredentialsErrorView
See Also:
Serialized Form

Field Summary
static java.lang.String ERRTASK_NAME
          Error task name.
 
Fields inherited from class com.ibm.commerce.command. AbstractECTargetableCommand
commandContext
 
Fields inherited from interface com.ibm.commerce.security.commands. UpdateCredentialsCmd
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
UpdateCredentialsCmdImpl()
           
 
Method Summary
protected  java.lang.String getLogonId()
          Retrieves the logon ID under which the current user wishes to logon.
protected  java.lang.String getPassword()
          Retrieves the password to be used for authentication with the new logon ID.
protected  boolean isPasswordTemporary()
          Indicates whether the password is temporary.
 void markPasswordTemporary()
          Call this method to indicate that the updated password is temporary.
 void performExecute()
          Execute the command.
 void setLogonId(java.lang.String strLogonId)
          Sets the logonId of the user whose password is to be updated.
 void setPassword(java.lang.String strPassword)
          Sets the value of the new password
 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 name.
See Also:
Constant Field Values
Constructor Detail

UpdateCredentialsCmdImpl

public UpdateCredentialsCmdImpl()
Method Detail

getLogonId

protected java.lang.String getLogonId()
Retrieves the logon ID under which the current user wishes to logon.
Returns:
The logon ID.

getPassword

protected java.lang.String getPassword()
Retrieves the password to be used for authentication with the new logon ID.
Returns:
The password.

isPasswordTemporary

protected boolean isPasswordTemporary()
Indicates whether the password is temporary.
Returns:
True if password temporary.

markPasswordTemporary

public void markPasswordTemporary()
Call this method to indicate that the updated password is temporary.
Specified by:
markPasswordTemporary in interface UpdateCredentialsCmd

performExecute

public void performExecute()
                    throws ECException
Execute the command. Updates the security credentials in LDAP, DB, or third party authentication repository depending on how commerce is configured.
Specified by:
performExecute in interface ECCommand
Overrides:
performExecute in class AbstractECTargetableCommand
Throws:
ECException

setLogonId

public void setLogonId(java.lang.String strLogonId)
Sets the logonId of the user whose password is to be updated.
Specified by:
setLogonId in interface UpdateCredentialsCmd
Parameters:
strLogonId - The loginId.

setPassword

public void setPassword(java.lang.String strPassword)
Sets the value of the new password
Specified by:
setPassword in interface UpdateCredentialsCmd
Parameters:
strPassword - The password.

validateParameters

public void validateParameters()
                        throws ECException
Validates the parameters. Ensures that the logonId and password are non-zero length strings.
Specified by:
validateParameters in interface ECCommand
Overrides:
validateParameters in class AbstractECTargetableCommand
Throws:
java.lang.Exception
ECException