com.ibm.commerce.security.commands
Class SendPasswordNotificationCmdImpl

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

public class SendPasswordNotificationCmdImpl
extends TaskCommandImpl
implements SendPasswordNotificationCmd

Sends an email notification informing the user of their new password.

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

    setLogonId
    setPassword
Error View Task: SendPasswordNotificationErrorView
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. SendPasswordNotificationCmd
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
SendPasswordNotificationCmdImpl()
           
 
Method Summary
protected  java.lang.String getEmail()
          Retrieves the email address of the shopper or administrator to whom a notification will be sent.
protected  java.lang.String getLogonId()
          Retrieves the logon ID of the shopper or administrator to whom a notification will be sent.
protected  java.lang.String getPassword()
          Retrieves the password of the shopper or administrator to whom a notification will be sent.
protected  java.lang.String getSubject()
          Retrieves the subject of the email notification to be sent.
protected  java.lang.Long getUsersId()
          Retrieves the user ID to whom the email notification will be sent.
 void performExecute()
          Execute the command.
 void setLogonId(java.lang.String strLogonId)
          Sets the logon ID of the user, to which the password notification message should be sent.
 void setPassword(java.lang.String strPassword)
          Sets the new password of the user.
 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

SendPasswordNotificationCmdImpl

public SendPasswordNotificationCmdImpl()
Method Detail

getEmail

protected java.lang.String getEmail()
Retrieves the email address of the shopper or administrator to whom a notification will be sent.
Returns:
Email address of user.

getLogonId

protected java.lang.String getLogonId()
Retrieves the logon ID of the shopper or administrator to whom a notification will be sent.
Returns:
Logon ID of user.

getPassword

protected java.lang.String getPassword()
Retrieves the password of the shopper or administrator to whom a notification will be sent.
Returns:
Password of user.

getSubject

protected java.lang.String getSubject()
Retrieves the subject of the email notification to be sent.
Returns:
Subject of email.

getUsersId

protected java.lang.Long getUsersId()
Retrieves the user ID to whom the email notification will be sent.
Returns:
User ID.

performExecute

public void performExecute()
                    throws ECException
Execute the command. Sends a message to the user to notify them of their new password. Message is sent using SendTransacted.
Specified by:
performExecute in interface ECCommand
Overrides:
performExecute in class AbstractECTargetableCommand
Throws:
ECException

setLogonId

public void setLogonId(java.lang.String strLogonId)
Sets the logon ID of the user, to which the password notification message should be sent.
Specified by:
setLogonId in interface SendPasswordNotificationCmd
Parameters:
strLogonId - Logon ID of user to receive notification.

setPassword

public void setPassword(java.lang.String strPassword)
Sets the new password of the user. This password will be sent in the notification message.
Specified by:
setPassword in interface SendPasswordNotificationCmd
Parameters:
strPassword - The password to be sent to the user.

validateParameters

public void validateParameters()
                        throws ECException
Validates the parameters. Ensures that email is specified.
Specified by:
validateParameters in interface ECCommand
Overrides:
validateParameters in class AbstractECTargetableCommand
Throws:
ECException