com.ibm.commerce.emarketing.commands

Class ListEmailRecipientsInMemberGroupTaskCmdImpl

  • java.lang.Object
    • com.ibm.websphere.command.CacheableCommandImpl
      • com.ibm.commerce.command.MeasuredCacheableCommandImpl
        • com.ibm.commerce.command.AbstractECTargetableCommand
          • com.ibm.commerce.command.TaskCommandImpl
            • com.ibm.commerce.emarketing.commands.ListEmailRecipientsInMemberGroupTaskCmdImpl
  • All Implemented Interfaces:
    com.ibm.commerce.command.CacheableECCommand, com.ibm.commerce.command.ECCommand, com.ibm.commerce.command.ECTargetableCommand, com.ibm.commerce.command.TaskCommand, ListEmailRecipientsInMemberGroupTaskCmd, EmailRecipientSupplier, com.ibm.websphere.command.CacheableCommand, com.ibm.websphere.command.Command


    public class ListEmailRecipientsInMemberGroupTaskCmdImpl
    extends com.ibm.commerce.command.TaskCommandImpl
    implements ListEmailRecipientsInMemberGroupTaskCmd
    The default implementation of ListEmailRecipientsInMemberGroupTaskCmd.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.util.List getEmailRecipients()
      Returns a list of EmailRecipient objects created from the customer segment.
      java.lang.String getQuery()
      Returns the SQL query used to generate the list of members in the group.
      boolean isReadyToCallExecute()
      Checks if this command is ready to execute.
      void performExecute()
      Runs this command.
      void setMemberGroupId(java.lang.Long memberGroupId)
      Sets the member group ID of the customer profile from which to create EmailRecipient objects.
      void setMemberGroupIds(java.lang.String[] mbrGrpIds, java.lang.String anyOrAll)
      This method sets the additonal member group IDs of the customer segment to which to send the the bulk email.
      void setQueryOnly(boolean flag)
      Defers executing the query generated for querying members of the group to the caller.
      void setStoreEntityId(java.lang.Integer storeId)
      Sets the store entity ID.
      void setUserId(java.lang.Long userId)
      Sets the user ID.
      • Methods inherited from class java.lang.Object

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

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

        execute
      • Methods inherited from interface com.ibm.commerce.command.ECCommand

        checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties, validateParameters
    • Field Detail

    • Constructor Detail

      • ListEmailRecipientsInMemberGroupTaskCmdImpl

        public ListEmailRecipientsInMemberGroupTaskCmdImpl()
    • Method Detail

      • getQuery

        public java.lang.String getQuery()
        Returns the SQL query used to generate the list of members in the group.
        Specified by:
        getQuery in interface EmailRecipientSupplier
        Returns:
        the SQL query used to generate the list of members in the group.
      • isReadyToCallExecute

        public boolean isReadyToCallExecute()
        Checks if this command is ready to execute.
        Overrides:
        isReadyToCallExecute in class com.ibm.commerce.command.AbstractECTargetableCommand
        Returns:
        True if the member group ID passed is not null; false otherwise.
      • performExecute

        public void performExecute()
                            throws com.ibm.commerce.exception.ECException
        Runs this command.
        Specified by:
        performExecute in interface com.ibm.commerce.command.ECCommand
        Overrides:
        performExecute in class com.ibm.commerce.command.AbstractECTargetableCommand
        Throws:
        com.ibm.commerce.exception.ECSystemException - Thrown when MemberGroupAccessBean cannot retreive data, or when or ListUsersInMemberGroupCmd cannot execute successfully.
        com.ibm.commerce.exception.ECException
      • setMemberGroupId

        public void setMemberGroupId(java.lang.Long memberGroupId)
        Sets the member group ID of the customer profile from which to create EmailRecipient objects.
        Specified by:
        setMemberGroupId in interface ListEmailRecipientsInMemberGroupTaskCmd
        Parameters:
        memberGroupId - The member group ID.
      • setMemberGroupIds

        public void setMemberGroupIds(java.lang.String[] mbrGrpIds,
                                      java.lang.String anyOrAll)
        This method sets the additonal member group IDs of the customer segment to which to send the the bulk email. These IDs are in addition to the member group passed in through the request property parameter memberGroupId to this command.
        Specified by:
        setMemberGroupIds in interface ListEmailRecipientsInMemberGroupTaskCmd
        Parameters:
        mbrGrpIds - The set of IDs of the member groups to which to send the bulk email.
        anyOrAll - Should the email be sent to the customers in each of the specified groups (any), or should the email be sent to those who are in all of the specified groups (all). Valid values are: any, all.
      • setQueryOnly

        public void setQueryOnly(boolean flag)
        Defers executing the query generated for querying members of the group to the caller. Useful when the caller wishes to manage the database connection and result set. The caller should use getQuery() to retreive the resulting SQL.
        Specified by:
        setQueryOnly in interface ListEmailRecipientsInMemberGroupTaskCmd
        Parameters:
        flag - Set to true if only the SQL query is required, false otherwise.