public class SubscriptionCancelScheduledActionImpl extends AbstractSubscriptionScheduledActionCmdImpl
Modifier and Type | Field and Description |
---|---|
static java.lang.String | COPYRIGHT
IBM Copyright notice field.
|
Constructor and Description |
---|
SubscriptionCancelScheduledActionImpl()
Default constructor for the class.
|
Modifier and Type | Method and Description |
---|---|
protected void | cancelParentOrder(java.lang.String subscriptionId)
This method is used to cancel a parent order.
|
protected void | cancelSubscription()
This method is the last step that is executed after canceling the future jobs.
|
protected void | deleteSubscriptionJobs()
This method invokes the getPhysicalDataContainer method to fetch the subscription record along with the future unprocessed jobs to be deleted.
|
int | getDelayBetweenRetries()
This method sets a static delay of 0 seconds for retries
|
protected java.lang.Integer | getFinalStateForSubscription()
This method gets the final state of a subscription, which is used by the scheduler
|
protected java.lang.Integer | getInitialState()
This method is used to set the initial state in the scheduler.
|
protected int | getMaximumNumberOfRetriesForState(java.lang.Integer state)
This method gets the maximum number of retries
|
protected PhysicalDataContainer | getPhysicalDataContainer()
This method initializes the physical data container with the subscription record and the set of unprocessed scheduled jobs whose action date > cancel date of the given subscription ID.
|
protected PhysicalDataContainer | getScheduledJobPdc()
This method returns the pdc containing the scheduled action job that is currently being processed
|
protected void | handleStateRetry(AbstractSubscriptionScheduledActionCmdImpl.StackEntry stateToRetry)
This method handles the state retry
|
protected boolean | isExceptionRetriable(java.lang.Exception exceptionToCheck)
This method specifies if the exception is retriable
|
protected boolean | isStateValid(Subscription phySubscription)
This method is used to find out if the state of the subscription is valid for any further processing If the state is either expired or cancelled, no further processing is done.
|
protected void | notifyMerchant(boolean isRecurring)
This method is to used to notify the merchant that order cancellation failed while processing the cancellation of a subscription
|
protected void | processSubscriptionState(AbstractSubscriptionScheduledActionCmdImpl.StackEntry entry)
This excutes the cancellation as a three step process.
|
protected void | recoverState(AbstractSubscriptionScheduledActionCmdImpl.StackEntry completedState)
This method is used to recover a state
|
protected void | saveFailedStateInActionParameters(java.lang.Integer failedState)
This method is used to save the last failed state in the job parameter so that the recover mechanism can retry from the appropriate state
|
protected void | sendOrderCancelFailureNotification()
This method sends the notification to indicate that there was failure in canceling the parent order.
|
public static final java.lang.String COPYRIGHT
public SubscriptionCancelScheduledActionImpl()
protected PhysicalDataContainer getPhysicalDataContainer()
protected PhysicalDataContainer getScheduledJobPdc()
protected void cancelSubscription()
protected void cancelParentOrder(java.lang.String subscriptionId)
protected java.lang.Integer getFinalStateForSubscription()
protected int getMaximumNumberOfRetriesForState(java.lang.Integer state)
protected void handleStateRetry(AbstractSubscriptionScheduledActionCmdImpl.StackEntry stateToRetry)
protected boolean isExceptionRetriable(java.lang.Exception exceptionToCheck)
protected void processSubscriptionState(AbstractSubscriptionScheduledActionCmdImpl.StackEntry entry)
protected void sendOrderCancelFailureNotification()
protected void deleteSubscriptionJobs()
protected void recoverState(AbstractSubscriptionScheduledActionCmdImpl.StackEntry completedState)
protected void saveFailedStateInActionParameters(java.lang.Integer failedState)
protected void notifyMerchant(boolean isRecurring)
protected java.lang.Integer getInitialState()
public int getDelayBetweenRetries()
protected boolean isStateValid(Subscription phySubscription)