Class AbstractSubscriptionFacade
- java.lang.Object
-
- de.hybris.platform.subscriptionfacades.impl.AbstractSubscriptionFacade
-
- All Implemented Interfaces:
SubscriptionFacade
- Direct Known Subclasses:
DefaultCisSubscriptionFacade,DefaultSubscriptionFacade
public abstract class AbstractSubscriptionFacade extends java.lang.Object implements SubscriptionFacade
Abstract subscription facade.
-
-
Constructor Summary
Constructors Constructor Description AbstractSubscriptionFacade()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected CCPaymentInfoDatacreateEmptyCCPaymentInfoData()Creates an emptyCCPaymentInfoDataobject.protected SubscriptionPaymentDatacreateEmptySubscriptionPaymentData()Creates an emptySubscriptionPaymentDataobject.protected BaseStoreServicegetBaseStoreService()protected CartServicegetCartService()protected CheckoutFacadegetCheckoutFacade()protected Converter<CreditCardPaymentInfoModel,CCPaymentInfoData>getCreditCardPaymentInfoConverter()protected java.lang.StringgetCurrencyIso()protected java.lang.StringgetCurrentCustomerId()protected CustomerAccountServicegetCustomerAccountService()protected CustomerResolutionServicegetCustomerResolutionService()protected ModelServicegetModelService()AbstractOrderEntryModelgetOrderEntryForOrderCodeAndEntryNumber(java.lang.String orderCode, int entryNumber)Returns theAbstractOrderEntryModelfor the given orderCode and entryNumber.protected OrderServicegetOrderService()protected ProductFacadegetProductFacade()java.util.DategetSubscriptionEndDate(ProductData subscriptionProductData, java.util.Date startDate)Calculates an end date for a subscription product based on its subscription term details.java.util.List<SubscriptionData>getSubscriptionsForPaymentMethod(java.lang.String paymentMethodId)Returns a list of subscriptions for the given paymentMethodId of the current user.java.util.List<ProductData>getUpsellingOptionsForSubscription(java.lang.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)CCPaymentInfoDataupdateCreatedPaymentMethod(CCPaymentInfoData paymentInfo, java.util.Map<java.lang.String,java.lang.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, wait
-
Methods 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
-
-
-
-
Method Detail
-
createEmptyCCPaymentInfoData
@Nonnull protected CCPaymentInfoData createEmptyCCPaymentInfoData()
Creates an emptyCCPaymentInfoDataobject.- Returns:
- An empty
CCPaymentInfoDataobject
-
createEmptySubscriptionPaymentData
@Nonnull protected SubscriptionPaymentData createEmptySubscriptionPaymentData()
Creates an emptySubscriptionPaymentDataobject.- Returns:
- An empty
SubscriptionPaymentDataobject
-
getCurrencyIso
@Nullable protected java.lang.String getCurrencyIso()
-
getSubscriptionEndDate
@Nonnull public java.util.Date getSubscriptionEndDate(@Nonnull ProductData subscriptionProductData, @Nullable java.util.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
@Nonnull public java.util.List<ProductData> getUpsellingOptionsForSubscription(@Nonnull java.lang.String productCode)
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
@Nullable protected java.lang.String getCurrentCustomerId()
-
getOrderEntryForOrderCodeAndEntryNumber
@Nullable public AbstractOrderEntryModel getOrderEntryForOrderCodeAndEntryNumber(@Nonnull java.lang.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 java.util.List<SubscriptionData> getSubscriptionsForPaymentMethod(@Nullable java.lang.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 java.util.Map<java.lang.String,java.lang.String> paramMap) throws SubscriptionFacadeException
Description 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
protected CartService getCartService()
-
setCartService
public void setCartService(CartService cartService)
-
getCheckoutFacade
protected CheckoutFacade getCheckoutFacade()
-
setCheckoutFacade
public void setCheckoutFacade(CheckoutFacade checkoutFacade)
-
getCreditCardPaymentInfoConverter
protected Converter<CreditCardPaymentInfoModel,CCPaymentInfoData> getCreditCardPaymentInfoConverter()
-
setCreditCardPaymentInfoConverter
public void setCreditCardPaymentInfoConverter(Converter<CreditCardPaymentInfoModel,CCPaymentInfoData> creditCardPaymentInfoConverter)
-
getCustomerResolutionService
protected CustomerResolutionService getCustomerResolutionService()
-
setCustomerResolutionService
public void setCustomerResolutionService(CustomerResolutionService customerResolutionService)
-
getProductFacade
protected ProductFacade getProductFacade()
-
setProductFacade
public void setProductFacade(ProductFacade productFacade)
-
getCustomerAccountService
protected CustomerAccountService getCustomerAccountService()
-
setCustomerAccountService
public void setCustomerAccountService(CustomerAccountService customerAccountService)
-
getBaseStoreService
protected BaseStoreService getBaseStoreService()
-
setBaseStoreService
public void setBaseStoreService(BaseStoreService baseStoreService)
-
getOrderService
protected OrderService getOrderService()
-
setOrderService
public void setOrderService(OrderService orderService)
-
getModelService
protected ModelService getModelService()
-
setModelService
public void setModelService(ModelService modelService)
-
-