com.ibm.commerce.subscription.scheduler.actions

Class SubscriptionCancelScheduledActionImpl

  • All Implemented Interfaces:
    com.ibm.commerce.command.CacheableECCommand, ECCommand, ECTargetableCommand, TaskCommand, SubscriptionScheduledActionCmd, 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 SubscriptionCancelScheduledActionImpl
    extends AbstractSubscriptionScheduledActionCmdImpl
    This class will be called by the scheduler to cancel a subscription or a recurring order. It performs the cancellation as a 3 step process wherein, it first cancels the parent order and then deletes all the future scheduled jobs of the subscription. It then updates the state of the subscription as the final step. Initially the state of the action will be updated to SubscriptionServerConstants.TRANSIENT_STATE_CANCEL_ORDER. As the first step the class will attempt to cancel the parent order or a recurring order or the parent order item of a subscription by invoking the cancelParentOrder method. In case of subscriptions, the shopper is refunded some amount proportional to the number of shipments remaining. Once this is successful, the state will be updated to SubscriptionServerConstants.TRANSIENT_STATE_DELETE_JOBS_AFTER_ORDER_CANCEL . The second step is to delete all the future scheduled jobs of the subscription by invoking the deleteSubscriptionJobs method. Once this is successful, the method will update the state to SubscriptionServerConstants.TRANSIENT_STATE_CANCEL_SUBSCRIPTION. The third step is to update the status of the subscription to CANCELLED. In case of any known order exception while canceling the parent order, this class will notify the merchant by sending a mail with the reason for the exception.
    See Also:
    Serialized Form
    • Field Detail

      • COPYRIGHT

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

      • SubscriptionCancelScheduledActionImpl

        public SubscriptionCancelScheduledActionImpl()
        Default constructor for the class.
    • Method Detail

      • getDelayBetweenRetries

        public int getDelayBetweenRetries()
        This method sets a static delay of 0 seconds for retries
        Returns:
        The number of seconds between retries