com.ibm.commerce.subscription.commands

Class SubscriptionNotificationCmdImpl

  • All Implemented Interfaces:
    com.ibm.commerce.command.CacheableECCommand, ECCommand, ECTargetableCommand, TaskCommand, SubscriptionNotificationCmd, com.ibm.websphere.cache.Sizeable, com.ibm.websphere.command.CacheableCommand, com.ibm.websphere.command.Command, com.ibm.websphere.command.CommandCaller, com.ibm.websphere.command.TargetableCommand, java.io.Serializable


    public class SubscriptionNotificationCmdImpl
    extends TaskCommandImpl
    implements SubscriptionNotificationCmd
    This class is the default implementation for the SubscriptionNotificationCmd interface. The class implements the business logic to notify the merchant by e-mail, notify the user by e-mail and create a tickler for the customer care representative. The required notification can be chosen by setting the appropriate notification flags to True. The class uses SendMsgCmd to send the e-mail notifications and CreateTicklerCmd to create the tickler.
    See Also:
    Serialized Form
    • Field Detail

      • COPYRIGHT

        public static final java.lang.String COPYRIGHT
        The copy right field.
        See Also:
        Constant Field Values
    • Constructor Detail

      • SubscriptionNotificationCmdImpl

        public SubscriptionNotificationCmdImpl()
        Default implementation of the constructor.
    • Method Detail

      • setCreateTicklerForCSR

        public void setCreateTicklerForCSR(boolean createTickler)
        This method sets the tickler notification flag for the command. Based on the flag, the command chooses to create the tickler.
        Specified by:
        setCreateTicklerForCSR in interface SubscriptionNotificationCmd
        Parameters:
        createTickler - Boolean to indicate if the tickler needs to be created or not.
      • setNotifyMerchantByEmail

        public void setNotifyMerchantByEmail(boolean notifyMerchantByEmail)
        This method sets the merchant e-mail notification flag for the command. Based on the flag, the command chooses to send the e-mail to the store's contact address.
        Specified by:
        setNotifyMerchantByEmail in interface SubscriptionNotificationCmd
        Parameters:
        notifyMerchantByEmail - Boolean to indicate if the e-mail needs to be sent to the merchant or not.
      • setNotifyUser

        public void setNotifyUser(boolean notifyUserByEmail)
        This method sets the user e-mail notification flag for the command. Based on the flag, the command chooses to send the e-mail to the user's contact address.
        Specified by:
        setNotifyUser in interface SubscriptionNotificationCmd
        Parameters:
        notifyUserByEmail - Boolean to indicate if the e-mail needs to be sent to the user or not.
      • setSubscriptionId

        public void setSubscriptionId(java.lang.Long subscriptionId)
        This method sets the unique ID of the subscription for which the notifications are being sent.
        Specified by:
        setSubscriptionId in interface SubscriptionNotificationCmd
        Parameters:
        subscriptionId - The unique ID of the subscription.
      • performExecute

        public void performExecute()
                            throws ECException
        This method performs the business logic for the command. Based on the notification flags, this method invokes createTicklerForCSR, notifyMerchant and notifyUser methods.
        Specified by:
        performExecute in interface ECCommand
        Specified by:
        performExecute in interface com.ibm.websphere.command.TargetableCommand
        Overrides:
        performExecute in class AbstractECTargetableCommand
        Throws:
        ECException - If any exceptions occur while sending the notification.