com.ibm.commerce.emarketing.commands

Class EmailIndividualCreateCmdImpl

  • java.lang.Object
    • com.ibm.websphere.command.CacheableCommandImpl
      • com.ibm.commerce.command.MeasuredCacheableCommandImpl
        • com.ibm.commerce.command.AbstractECTargetableCommand
          • com.ibm.commerce.command.ControllerCommandImpl
            • com.ibm.commerce.emarketing.commands.EmailIndividualCreateCmdImpl
  • All Implemented Interfaces:
    com.ibm.commerce.command.AccCommand, com.ibm.commerce.command.ControllerCommand, com.ibm.commerce.command.ECCommand, com.ibm.commerce.command.ECTargetableCommand, EmailIndividualCreateCmd, com.ibm.commerce.security.Protectable, com.ibm.websphere.command.CacheableCommand, com.ibm.websphere.command.Command


    public class EmailIndividualCreateCmdImpl
    extends com.ibm.commerce.command.ControllerCommandImpl
    implements EmailIndividualCreateCmd
    This command sends an email to an individual customer. The email can either be sent immediately, or for better performance, the emails are sent once per day (for the duration of the activity) at the scheduled daily time. A member group is created each day in which the users for that day are placed.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      static void cleanup()
      This method cleans up the thread local resources.
      java.lang.Integer getElementId()
      This method gets the ID of the element.
      com.ibm.commerce.accesscontrol.AccessVector getResources()
      Gets the access vector accessed by this command.
      void performExecute()
      This method sends an email to an individual customer.
      void setElementId(java.lang.Integer newElementId)
      This method sets the ID of the element.
      void setTriggerParameters(java.util.Map parameters)
      This method sets the trigger parameters associated with the event that is going to send the e-mail.
      void validateParameters()
      This method validates the parameters expected in the request properties.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from class com.ibm.commerce.command.ControllerCommandImpl

        checkPermission, fulfills, getForUserId, getGeneric, getOwner, getRequestProperties, getResolvedRequestProperties, getResourceOwners, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setForUserId, setGeneric, setOwner, setRequestProperties, setResponseProperties, setRetriable, setViewInputProperties
      • Methods inherited from class com.ibm.commerce.command.AbstractECTargetableCommand

        accessControlCheck, checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getObjectSize, getPostInvokeParameters, getPreInvokeParameters, getStoreId, getUser, getUserId, isReadyToCallExecute, reset, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
      • Methods inherited from interface com.ibm.commerce.command.ControllerCommand

        checkPermission, execute, getGeneric, getRequestProperties, getResolvedRequestProperties, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setGeneric, setRequestProperties, setRetriable, setViewInputProperties
      • Methods inherited from interface com.ibm.commerce.command.AccCommand

        accessControlCheck, getAccCheck, getForUserId, getResourceOwners, setAccCheck, setForUserId, setOwner
      • Methods inherited from interface com.ibm.commerce.command.ECCommand

        checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getPostInvokeParameters, getPreInvokeParameters, getStoreId, getUser, getUserId, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
      • Methods inherited from interface com.ibm.commerce.security.Protectable

        fulfills, getOwner
    • Field Detail

      • COPYRIGHT

        public static final java.lang.String COPYRIGHT
        IBM copyright notice field.
        See Also:
        Constant Field Values
    • Constructor Detail

      • EmailIndividualCreateCmdImpl

        public EmailIndividualCreateCmdImpl()
    • Method Detail

      • cleanup

        public static void cleanup()
        This method cleans up the thread local resources. E-mail activity information is stored in a thread local variable when running under a batch dialog activity.
      • getElementId

        public java.lang.Integer getElementId()
        This method gets the ID of the element.
        Returns:
        This method returns the ID of the element.
      • getResources

        public com.ibm.commerce.accesscontrol.AccessVector getResources()
                                                                 throws com.ibm.commerce.exception.ECException
        Gets the access vector accessed by this command. This method returns null. It is assumed that only a site administrator will run this command.
        Specified by:
        getResources in interface com.ibm.commerce.command.ECCommand
        Overrides:
        getResources in class com.ibm.commerce.command.AbstractECTargetableCommand
        Returns:
        This method will return null.
        Throws:
        com.ibm.commerce.exception.ECException
      • performExecute

        public void performExecute()
                            throws com.ibm.commerce.exception.ECException
        This method sends an email to an individual customer. The email can either be sent immediately, or for better performance, the emails are sent once per day (for the duration of the activity) at the scheduled daily time. A member group is created each day in which the users for that day are placed.
        Specified by:
        performExecute in interface com.ibm.commerce.command.ECCommand
        Overrides:
        performExecute in class com.ibm.commerce.command.AbstractECTargetableCommand
        Throws:
        com.ibm.commerce.exception.ECException - If anything goes wrong with the data resources being queried.
      • setElementId

        public void setElementId(java.lang.Integer newElementId)
        This method sets the ID of the element.
        Parameters:
        newElementId - The ID of the element.
      • setTriggerParameters

        public void setTriggerParameters(java.util.Map parameters)
        This method sets the trigger parameters associated with the event that is going to send the e-mail. These parameters are passed to the e-mail JSP.
        Specified by:
        setTriggerParameters in interface EmailIndividualCreateCmd
        Parameters:
        parameters - A map that contains the trigger parameters.
      • validateParameters

        public void validateParameters()
                                throws com.ibm.commerce.exception.ECException
        This method validates the parameters expected in the request properties. Expected paramters are userId, storeEntityId, emailMessageId, and name. Optional parameters are replyTo and sendImmediate.
        Specified by:
        validateParameters in interface com.ibm.commerce.command.ECCommand
        Overrides:
        validateParameters in class com.ibm.commerce.command.AbstractECTargetableCommand
        Throws:
        com.ibm.commerce.exception.ECException - If any of the required parameters are missing.