com.ibm.commerce.emarketing.commands
Class SendEmailActivityTaskCmdImpl

java.lang.Object
  |
  +--CacheableCommandImpl
        |
        +--com.ibm.commerce.command.AbstractECTargetableCommand
              |
              +--com.ibm.commerce.command.TaskCommandImpl
                    |
                    +--com.ibm.commerce.emarketing.commands.SendEmailActivityTaskCmdImpl
All Implemented Interfaces:
ECCommand, ECTargetableCommand, SendEmailActivityTaskCmd, TaskCommand

public class SendEmailActivityTaskCmdImpl
extends TaskCommandImpl
implements SendEmailActivityTaskCmd

The TaskCommand implementation used to send e-mail activities that have been configured in WebSphere Commerce Accelerator.

See Also:
Serialized Form

Field Summary
static java.lang.String COPYRIGHT
          Copyright.
 
Fields inherited from class com.ibm.commerce.command. AbstractECTargetableCommand
commandContext
 
Fields inherited from interface com.ibm.commerce.emarketing.commands. SendEmailActivityTaskCmd
defaultCommandClassName
 
Fields inherited from interface com.ibm.commerce.command. ECCommand
defaultCommandClassName
 
Constructor Summary
SendEmailActivityTaskCmdImpl()
           
 
Method Summary
 void performExecute()           Performs the operations required to deliver the e-mail activity set by the setEmailPromotionId method. Delivery is performed by the following steps: EmailPromotionAccessBean is used to lookup the e-mail activity configuration based on the value passed to setEmailPromotionId.
 void setEmailPromotionId(java.lang.Integer newEmailPromotionId)
          Sets the unique identifier of the e-mail activity that is to be sent.
 
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, validateParameters
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail
public static final java.lang.String COPYRIGHT
Copyright.
See Also:
Constant Field Values
Constructor Detail

SendEmailActivityTaskCmdImpl

public SendEmailActivityTaskCmdImpl()
Method Detail

performExecute

public void performExecute()
                    throws ECException
Performs the operations required to deliver the e-mail activity set by the setEmailPromotionId method. Delivery is performed by the following steps:
  1. EmailPromotionAccessBean is used to lookup the e-mail activity configuration based on the value passed to setEmailPromotionId.
  2. The membergroupId within the EmailPromotionAccessBean is passed to ListEmailRecipientsInMemberGroupTaskCmd and executed.
  3. An EmailDistributor implementation is passed the listEmailRecipientsInMemberGroupTaskCmd as an EmailRecipientSupplier.
  4. A PersonalizedEmailContent object is created from the e-mail message template assigned to the e-mail activity and passed to the EmailDistributor implementation.
  5. The e-mail server information is looked up for the store and passed to the EmailDistributor implementation.
  6. The distribute method is called on the EmailDistributor implementation.
  7. The list of recipients returned from ListEmailRecipientsInMemberGroupTaskCmd is used to create a new EmailRecipientsAccessBean to record the recipient addresses passed to EmailDistributor (to whom distribution was attempted).
Specified by:
performExecute in interface ECCommand
Overrides:
performExecute in class AbstractECTargetableCommand
Throws:
ECException
ECException

setEmailPromotionId

public void setEmailPromotionId(java.lang.Integer newEmailPromotionId)
Sets the unique identifier of the e-mail activity that is to be sent.
Specified by:
setEmailPromotionId in interface SendEmailActivityTaskCmd