Class SubscriptionPriceFindPriceHook
- java.lang.Object
-
- de.hybris.platform.subscriptionservices.subscription.impl.SubscriptionPriceFindPriceHook
-
- All Implemented Interfaces:
FindPriceHook,ServiceLayerOnlyCalculationVerifier
public class SubscriptionPriceFindPriceHook extends java.lang.Object implements FindPriceHook
This hook should implement the price finding strategy forProductModels.
-
-
Constructor Summary
Constructors Constructor Description SubscriptionPriceFindPriceHook()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected PriceValuecreatePriceValueForLastRecurringPrice(AbstractOrderModel order, SubscriptionPricePlanModel pricePlan)PriceValuefindCustomBasePrice(AbstractOrderEntryModel entry, PriceValue defaultPrice)Resolves the subscription price value for the given AbstractOrderEntryModel by searching aProductModelthat is applicable for the entry's subscription product.SubscriptionCommercePriceServicegetCommercePriceService()SubscriptionProductServicegetSubscriptionProductService()booleanisApplicable(AbstractOrderEntryModel entry)Indicates whether a custom base price can be found for the givenAbstractOrderEntryModel.voidsetCommercePriceService(SubscriptionCommercePriceService commercePriceService)voidsetSubscriptionProductService(SubscriptionProductService subscriptionProductService)-
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.order.strategies.calculation.ServiceLayerOnlyCalculationVerifier
isSLOnly
-
-
-
-
Method Detail
-
findCustomBasePrice
public PriceValue findCustomBasePrice(AbstractOrderEntryModel entry, PriceValue defaultPrice)
Resolves the subscription price value for the given AbstractOrderEntryModel by searching aProductModelthat is applicable for the entry's subscription product. In case the entry's product is not aProductModelor there is noProductModelfor it, the method is not applied- Specified by:
findCustomBasePricein interfaceFindPriceHook- Parameters:
entry-AbstractOrderEntryModel- Returns:
PriceValue
-
isApplicable
public boolean isApplicable(AbstractOrderEntryModel entry)
Description copied from interface:FindPriceHookIndicates whether a custom base price can be found for the givenAbstractOrderEntryModel.- Specified by:
isApplicablein interfaceFindPriceHook- Parameters:
entry-AbstractOrderEntryModel- Returns:
- whether hook is applicable
-
createPriceValueForLastRecurringPrice
protected PriceValue createPriceValueForLastRecurringPrice(AbstractOrderModel order, SubscriptionPricePlanModel pricePlan)
-
getCommercePriceService
public SubscriptionCommercePriceService getCommercePriceService()
-
setCommercePriceService
public void setCommercePriceService(SubscriptionCommercePriceService commercePriceService)
-
getSubscriptionProductService
public SubscriptionProductService getSubscriptionProductService()
-
setSubscriptionProductService
public void setSubscriptionProductService(SubscriptionProductService subscriptionProductService)
-
-