Class AbstractSubscriptionFacade
java.lang.Object
de.hybris.platform.subscriptionfacades.impl.AbstractSubscriptionFacade
- All Implemented Interfaces:
SubscriptionFacade
- Direct Known Subclasses:
DefaultCisSubscriptionFacade,DefaultSubscriptionFacade
Abstract subscription facade.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected CCPaymentInfoDataCreates an emptyCCPaymentInfoDataobject.protected SubscriptionPaymentDataCreates an emptySubscriptionPaymentDataobject.protected BaseStoreServiceprotected CartServiceprotected CheckoutFacadeprotected Converter<CreditCardPaymentInfoModel,CCPaymentInfoData> protected Stringprotected Stringprotected CustomerAccountServiceprotected CustomerResolutionServiceprotected ModelServicegetOrderEntryForOrderCodeAndEntryNumber(String orderCode, int entryNumber) Returns theAbstractOrderEntryModelfor the given orderCode and entryNumber.protected OrderServiceprotected ProductFacadegetSubscriptionEndDate(ProductData subscriptionProductData, Date startDate) Calculates an end date for a subscription product based on its subscription term details.getSubscriptionsForPaymentMethod(String paymentMethodId) Returns a list of subscriptions for the given paymentMethodId of the current user.getUpsellingOptionsForSubscription(String productCode) Returns a list of possible upgrade options for the given subscription product.voidsetBaseStoreService(BaseStoreService baseStoreService) voidsetCartService(CartService cartService) voidsetCheckoutFacade(CheckoutFacade checkoutFacade) voidsetCreditCardPaymentInfoConverter(Converter<CreditCardPaymentInfoModel, CCPaymentInfoData> creditCardPaymentInfoConverter) voidsetCustomerAccountService(CustomerAccountService customerAccountService) voidsetCustomerResolutionService(CustomerResolutionService customerResolutionService) voidsetModelService(ModelService modelService) voidsetOrderService(OrderService orderService) voidsetProductFacade(ProductFacade productFacade) updateCreatedPaymentMethod(CCPaymentInfoData paymentInfo, Map<String, String> paramMap) Updates an newly-created Payment Type with the Subscription Service information.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.hybris.platform.subscriptionfacades.SubscriptionFacade
changePaymentMethod, changeSubscriptionState, createPaymentSubscription, createSubscriptions, extendSubscriptionTermDuration, finalizeTransaction, getBillingActivityDetail, getBillingActivityList, getSubscription, getSubscriptions, getUpgradePreviewBillings, hpfUrl, initializeTransaction, replacePaymentMethod, replacePaymentMethod, updateProfile, updateSubscription, updateSubscriptionAutorenewal
-
Field Details
-
QUARTER_NUMBER_OF_MONTHS
public static final int QUARTER_NUMBER_OF_MONTHS- See Also:
-
MAXIMUM_NUMBER_OF_REFERENCES
public static final int MAXIMUM_NUMBER_OF_REFERENCES- See Also:
-
-
Constructor Details
-
AbstractSubscriptionFacade
public AbstractSubscriptionFacade()
-
-
Method Details
-
createEmptyCCPaymentInfoData
Creates an emptyCCPaymentInfoDataobject.- Returns:
- An empty
CCPaymentInfoDataobject
-
createEmptySubscriptionPaymentData
Creates an emptySubscriptionPaymentDataobject.- Returns:
- An empty
SubscriptionPaymentDataobject
-
getCurrencyIso
-
getSubscriptionEndDate
@Nonnull public Date getSubscriptionEndDate(@Nonnull ProductData subscriptionProductData, @Nullable Date startDate) Description copied from interface:SubscriptionFacadeCalculates an end date for a subscription product based on its subscription term details.- Specified by:
getSubscriptionEndDatein interfaceSubscriptionFacade- Parameters:
subscriptionProductData- ptoduct data with information about subscription termsstartDate- start date of the subscription- Returns:
- the calculated end date
-
getUpsellingOptionsForSubscription
Description copied from interface:SubscriptionFacadeReturns a list of possible upgrade options for the given subscription product.- Specified by:
getUpsellingOptionsForSubscriptionin interfaceSubscriptionFacade- Parameters:
productCode- code of the subscription product- Returns:
ListofProductData
-
getCurrentCustomerId
-
getOrderEntryForOrderCodeAndEntryNumber
@Nullable public AbstractOrderEntryModel getOrderEntryForOrderCodeAndEntryNumber(@Nonnull String orderCode, int entryNumber) Description copied from interface:SubscriptionFacadeReturns theAbstractOrderEntryModelfor the given orderCode and entryNumber.- Specified by:
getOrderEntryForOrderCodeAndEntryNumberin interfaceSubscriptionFacade- Parameters:
orderCode- code of the given orderentryNumber- entry number in the order- Returns:
AbstractOrderEntryModelornullif not found
-
getSubscriptionsForPaymentMethod
@Nonnull public List<SubscriptionData> getSubscriptionsForPaymentMethod(@Nullable String paymentMethodId) throws SubscriptionFacadeException Description copied from interface:SubscriptionFacadeReturns a list of subscriptions for the given paymentMethodId of the current user.- Specified by:
getSubscriptionsForPaymentMethodin interfaceSubscriptionFacade- Parameters:
paymentMethodId- the ID of the payment method- Returns:
- list of subscriptions
- Throws:
SubscriptionFacadeException- if operation cannot be performed
-
updateCreatedPaymentMethod
@Nonnull public CCPaymentInfoData updateCreatedPaymentMethod(@Nonnull CCPaymentInfoData paymentInfo, @Nonnull Map<String, String> paramMap) throws SubscriptionFacadeExceptionDescription copied from interface:SubscriptionFacadeUpdates an newly-created Payment Type with the Subscription Service information. This method differs fromSubscriptionFacade.changePaymentMethod(CCPaymentInfoData, String, boolean, Map)because it must be used only during the creation of a new payment method (created by the PaymentFacade).SubscriptionFacade.changePaymentMethod(CCPaymentInfoData, String, boolean, Map)must be used changing details at a later time.- Specified by:
updateCreatedPaymentMethodin interfaceSubscriptionFacade- Parameters:
paymentInfo- the payment info data relating to the recently-created Payment TypeparamMap- the detail map containing new subscription information.- Returns:
- an updated paymentInfo, or null if the update fails.
- Throws:
SubscriptionFacadeException- if created payment method cannot be updated
-
getCartService
-
setCartService
-
getCheckoutFacade
-
setCheckoutFacade
-
getCreditCardPaymentInfoConverter
protected Converter<CreditCardPaymentInfoModel,CCPaymentInfoData> getCreditCardPaymentInfoConverter() -
setCreditCardPaymentInfoConverter
public void setCreditCardPaymentInfoConverter(Converter<CreditCardPaymentInfoModel, CCPaymentInfoData> creditCardPaymentInfoConverter) -
getCustomerResolutionService
-
setCustomerResolutionService
-
getProductFacade
-
setProductFacade
-
getCustomerAccountService
-
setCustomerAccountService
-
getBaseStoreService
-
setBaseStoreService
-
getOrderService
-
setOrderService
-
getModelService
-
setModelService
-