Class AbstractSubscriptionOrderPopulator<SOURCE extends AbstractOrderModel,TARGET extends AbstractOrderData>
java.lang.Object
de.hybris.platform.commercefacades.order.converters.populator.AbstractOrderPopulator<SOURCE,TARGET>
de.hybris.platform.subscriptionfacades.order.converters.populator.AbstractSubscriptionOrderPopulator<SOURCE,TARGET>
- Type Parameters:
SOURCE- source classTARGET- target class
- All Implemented Interfaces:
Populator<SOURCE,TARGET>
- Direct Known Subclasses:
SubscriptionCartPopulator,SubscriptionMiniCartPopulator,SubscriptionOrderPopulator
public abstract class AbstractSubscriptionOrderPopulator<SOURCE extends AbstractOrderModel,TARGET extends AbstractOrderData>
extends AbstractOrderPopulator<SOURCE,TARGET>
Abstract class for order converters for subscriptions. This class is responsible to merge entries together from the
child carts, and the total, the total tax, delivery cost,discounts and subtotals are stored as per billing time in a
BillingTimePriceData object which can be used by the sub classes.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddCommon(AbstractOrderModel source, AbstractOrderData prototype) protected voidaddPromotions(AbstractOrderModel source, AbstractOrderData prototype) Modified to calculate discounts per billing time level.protected voidaddTotals(AbstractOrderModel source, AbstractOrderData prototype) protected List<BillingTimeData>buildBillingTimes(AbstractOrderModel source) This method builds an ordered list of billing times in the carts.buildOrderPrices(AbstractOrderModel source) protected Comparatorprotected Converter<BillingTimeModel,BillingTimeData> protected CartServiceprotected DoublegetDeliveryCost(AbstractOrderModel source) protected IntegergetMasterOrderEntryNo(AbstractOrderModel abstractOrder, PromotionOrderEntryConsumedData consumedEntry) protected OrderServiceprotected List<PromotionResultData>getSubscriptionPromotions(AbstractOrderModel abstractOrder, List<PromotionResult> promotionsResultList) re-map the consumed order entry numbers in child carts to the master cart entry number.voidPopulate the target instance with values from the source instance.voidsetBillingTimeComparator(BillingTimeComparator billingTimeComparator) voidsetBillingTimeConverter(Converter<BillingTimeModel, BillingTimeData> billingTimeConverter) voidsetCartService(CartService cartService) voidsetOrderService(OrderService orderService) Methods inherited from class de.hybris.platform.commercefacades.order.converters.populator.AbstractOrderPopulator
addComments, addDeliveryAddress, addDeliveryMethod, addDeliveryStatus, addEntries, addEntryGroups, addPaymentInformation, addPrincipalInformation, addPromotions, assignEntriesToGroups, assignParentGroups, calcTotalItems, calcTotalUnitCount, calcTotalWithTax, checkForGuestCustomer, createPrice, createZeroPrice, getAddressConverter, getCommerceEntryGroupUtils, getCommonI18NService, getCreditCardPaymentInfoConverter, getDeliveryModeConverter, getEntryGroupConverter, getEntryGroupService, getGroup, getModelService, getOrderCommentConverter, getOrderDiscountsAmount, getOrderEntryConverter, getPriceData, getPriceDataFactory, getPrincipalConverter, getProductsDiscountsAmount, getPromotionResultConverter, getPromotions, getPromotionsService, getQuoteDiscountsAmount, getQuoteDiscountsTypeAndRate, getTypeService, getVirtualEntryGroupStrategy, getZoneDeliveryModeConverter, mapGroupIdToEntryData, setAddressConverter, setCommerceEntryGroupUtils, setCommonI18NService, setCreditCardPaymentInfoConverter, setDeliveryModeConverter, setEntryGroupConverter, setEntryGroupService, setModelService, setOrderCommentConverter, setOrderEntryConverter, setPriceDataFactory, setPrincipalConverter, setPromotionResultConverter, setPromotionsService, setTypeService, setVirtualEntryGroupStrategy, setZoneDeliveryModeConverter, sortEntryGroups, updateEntryGroupReferences
-
Constructor Details
-
AbstractSubscriptionOrderPopulator
public AbstractSubscriptionOrderPopulator()
-
-
Method Details
-
populate
Description copied from interface:PopulatorPopulate the target instance with values from the source instance.- Parameters:
source- the source objecttarget- the target to fill- Throws:
ConversionException- if an error occurs
-
addCommon
- Overrides:
addCommonin classAbstractOrderPopulator<SOURCE extends AbstractOrderModel,TARGET extends AbstractOrderData>
-
addTotals
- Overrides:
addTotalsin classAbstractOrderPopulator<SOURCE extends AbstractOrderModel,TARGET extends AbstractOrderData>
-
getDeliveryCost
-
buildOrderPrices
-
addPromotions
Modified to calculate discounts per billing time level. Iterate over child carts and add promotions to totals- Overrides:
addPromotionsin classAbstractOrderPopulator<SOURCE extends AbstractOrderModel,TARGET extends AbstractOrderData>
-
buildBillingTimes
This method builds an ordered list of billing times in the carts.- Parameters:
source- - master cart model- Returns:
- List of BillingTimeData objects existing in the cart in the correct order
-
getSubscriptionPromotions
protected List<PromotionResultData> getSubscriptionPromotions(AbstractOrderModel abstractOrder, List<PromotionResult> promotionsResultList) re-map the consumed order entry numbers in child carts to the master cart entry number. -
getMasterOrderEntryNo
protected Integer getMasterOrderEntryNo(AbstractOrderModel abstractOrder, PromotionOrderEntryConsumedData consumedEntry) -
getBillingTimeConverter
-
setBillingTimeConverter
public void setBillingTimeConverter(Converter<BillingTimeModel, BillingTimeData> billingTimeConverter) -
getCartService
-
setCartService
-
getOrderService
-
setOrderService
-
getBillingTimeComparator
-
setBillingTimeComparator
-