public class ProcessSubscriptionCreateActionCmdImpl extends AbstractProcessCreateActionUsingBusinessObjectMediatorCmdImpl implements ProcessSubscriptionActionCmd
Modifier and Type | Field and Description |
---|---|
static java.lang.String | COPYRIGHT
IBM Copyright notice field.
|
Constructor and Description |
---|
ProcessSubscriptionCreateActionCmdImpl() |
Modifier and Type | Method and Description |
---|---|
protected void | buildPaymentScheduleFrequencyInfo(com.ibm.commerce.subscription.facade.datatypes.SubscriptionType subscription)
This method is used to build the payment schedule and set the frequency information.
|
protected java.util.Collection<? extends ApplicationError> | checkSchedulesMatch(com.ibm.commerce.foundation.common.datatypes.ScheduleInfoType fulfillmentSchedule, com.ibm.commerce.foundation.common.datatypes.ScheduleInfoType paymentSchedule, boolean isRecurring)
This method checks if the fulfillment and payment schedules.By default, we do not consider the start and end information for a payment schedule.
|
protected java.lang.Long | findRenewedSubscription(java.lang.Object subscriptionNoun)
This method is used to determine an existing subscription which can be said to have been renewed to obtain the current subscription.
|
protected CatalogEntryType | getCatalogEntry(CatalogEntryIdentifierType catalogEntryIdentifier)
Fetches the catalog entry details based on the catalog entry identifier passed.
|
protected CommerceFoundationFactory | getCommerceFoundationFactory()
Returns an instance of the commerce foundation factory.
|
protected java.lang.String | getScheduleTypeFromScheduleInfo(com.ibm.commerce.foundation.common.datatypes.ScheduleInfoType schedule)
This method returns the type of schedule represented by the ScheduleInfoType instance specified as parameter.
|
protected com.ibm.commerce.subscription.facade.datatypes.SubscriptionFactory | getSubscriptionFactory()
Returns an instance of the subscription factory.
|
boolean | isReadyToCallExecute()
This method returns if the command can be executed.
|
protected boolean | isValidSubscribedItem(CatalogEntryType catalogEntry)
This method validates if the catalogEntry is a valid subscription item.
|
void | performExecute()
This method creates the recurring order or subscription.
|
protected void | processSubscriptionRenew(java.lang.Object aNoun)
This method is used to perform an internal check for renewals on all types of subscriptions It calls the findRenewedSubscription to find the subscription renew candidate and if null, sets the subscription ID
|
protected java.lang.String | resolveToSingleSubscriptionId(java.util.HashMap<java.lang.String,java.lang.Long> hshMpsubscrCandidateDetails)
This method is used to determine the subscription that is closest to the newly created subscription, in terms of having the least difference between its end date and the start date of the new subscription
|
void | validate()
This method performs business logic validation for this action.
|
protected java.util.Collection<? extends ApplicationError> | validateFulfillmentSchedule(com.ibm.commerce.subscription.facade.datatypes.SubscriptionType subscription, com.ibm.commerce.foundation.common.datatypes.ScheduleInfoType fulfillmentSchedule, boolean isRecurring)
Validates the fulfillment schedule provided in the subscription noun.
|
protected java.util.Collection<? extends ApplicationError> | validatePaymentInfo(com.ibm.commerce.subscription.facade.datatypes.SubscriptionType subscription, com.ibm.commerce.foundation.common.datatypes.SubscriptionPaymentInfoType paymentDetails, boolean isRecurring)
Validates the payment information provided in the noun.
|
protected java.util.Collection<? extends ApplicationError> | validatePaymentSchedule(com.ibm.commerce.subscription.facade.datatypes.SubscriptionType subscription, com.ibm.commerce.foundation.common.datatypes.ScheduleInfoType paymentSchedule, boolean isRecurring)
This method validates the payment schedule for a subscription.
|
protected java.util.Collection<? extends ApplicationError> | validatePurchaseDetails(com.ibm.commerce.subscription.facade.datatypes.SubscriptionType subscription, com.ibm.commerce.subscription.facade.datatypes.SubscriptionPurchaseDetailsType purchaseDetails, boolean isRecurring)
Validates the purchase details for the Subscription or recurring order.
|
public static final java.lang.String COPYRIGHT
public ProcessSubscriptionCreateActionCmdImpl()
public void validate() throws AbstractApplicationException
protected java.util.Collection<? extends ApplicationError> checkSchedulesMatch(com.ibm.commerce.foundation.common.datatypes.ScheduleInfoType fulfillmentSchedule, com.ibm.commerce.foundation.common.datatypes.ScheduleInfoType paymentSchedule, boolean isRecurring)
protected java.util.Collection<? extends ApplicationError> validatePaymentSchedule(com.ibm.commerce.subscription.facade.datatypes.SubscriptionType subscription, com.ibm.commerce.foundation.common.datatypes.ScheduleInfoType paymentSchedule, boolean isRecurring)
protected java.util.Collection<? extends ApplicationError> validateFulfillmentSchedule(com.ibm.commerce.subscription.facade.datatypes.SubscriptionType subscription, com.ibm.commerce.foundation.common.datatypes.ScheduleInfoType fulfillmentSchedule, boolean isRecurring) throws SubscriptionApplicationException
protected java.lang.String getScheduleTypeFromScheduleInfo(com.ibm.commerce.foundation.common.datatypes.ScheduleInfoType schedule)
protected java.util.Collection<? extends ApplicationError> validatePaymentInfo(com.ibm.commerce.subscription.facade.datatypes.SubscriptionType subscription, com.ibm.commerce.foundation.common.datatypes.SubscriptionPaymentInfoType paymentDetails, boolean isRecurring) throws SubscriptionApplicationException
protected java.util.Collection<? extends ApplicationError> validatePurchaseDetails(com.ibm.commerce.subscription.facade.datatypes.SubscriptionType subscription, com.ibm.commerce.subscription.facade.datatypes.SubscriptionPurchaseDetailsType purchaseDetails, boolean isRecurring) throws AbstractApplicationException
protected CommerceFoundationFactory getCommerceFoundationFactory()
protected com.ibm.commerce.subscription.facade.datatypes.SubscriptionFactory getSubscriptionFactory()
public boolean isReadyToCallExecute()
public void performExecute() throws java.lang.Exception
protected CatalogEntryType getCatalogEntry(CatalogEntryIdentifierType catalogEntryIdentifier)
protected boolean isValidSubscribedItem(CatalogEntryType catalogEntry)
protected void processSubscriptionRenew(java.lang.Object aNoun) throws SubscriptionApplicationException
protected java.lang.Long findRenewedSubscription(java.lang.Object subscriptionNoun)
protected java.lang.String resolveToSingleSubscriptionId(java.util.HashMap<java.lang.String,java.lang.Long> hshMpsubscrCandidateDetails)
protected void buildPaymentScheduleFrequencyInfo(com.ibm.commerce.subscription.facade.datatypes.SubscriptionType subscription)