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 aBillingTimePriceDataobject which can be used by the sub classes.
-
-
Constructor Summary
Constructors Constructor Description AbstractSubscriptionOrderPopulator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected 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 java.util.List<BillingTimeData>buildBillingTimes(AbstractOrderModel source)This method builds an ordered list of billing times in the carts.java.util.List<OrderPriceData>buildOrderPrices(AbstractOrderModel source)protected java.util.ComparatorgetBillingTimeComparator()protected Converter<BillingTimeModel,BillingTimeData>getBillingTimeConverter()protected CartServicegetCartService()protected java.lang.DoublegetDeliveryCost(AbstractOrderModel source)protected java.lang.IntegergetMasterOrderEntryNo(AbstractOrderModel abstractOrder, PromotionOrderEntryConsumedData consumedEntry)protected OrderServicegetOrderService()protected java.util.List<PromotionResultData>getSubscriptionPromotions(AbstractOrderModel abstractOrder, java.util.List<PromotionResult> promotionsResultList)re-map the consumed order entry numbers in child carts to the master cart entry number.voidpopulate(SOURCE source, TARGET target)Populate 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
-
-
-
-
Method Detail
-
populate
public void populate(SOURCE source, TARGET target) throws ConversionException
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
protected void addCommon(AbstractOrderModel source, AbstractOrderData prototype)
- Overrides:
addCommonin classAbstractOrderPopulator<SOURCE extends AbstractOrderModel,TARGET extends AbstractOrderData>
-
addTotals
protected void addTotals(AbstractOrderModel source, AbstractOrderData prototype)
- Overrides:
addTotalsin classAbstractOrderPopulator<SOURCE extends AbstractOrderModel,TARGET extends AbstractOrderData>
-
getDeliveryCost
protected java.lang.Double getDeliveryCost(AbstractOrderModel source)
-
buildOrderPrices
public java.util.List<OrderPriceData> buildOrderPrices(AbstractOrderModel source)
-
addPromotions
protected void addPromotions(AbstractOrderModel source, AbstractOrderData prototype)
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
protected java.util.List<BillingTimeData> buildBillingTimes(AbstractOrderModel source)
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 java.util.List<PromotionResultData> getSubscriptionPromotions(AbstractOrderModel abstractOrder, java.util.List<PromotionResult> promotionsResultList)
re-map the consumed order entry numbers in child carts to the master cart entry number.
-
getMasterOrderEntryNo
protected java.lang.Integer getMasterOrderEntryNo(AbstractOrderModel abstractOrder, PromotionOrderEntryConsumedData consumedEntry)
-
getBillingTimeConverter
protected Converter<BillingTimeModel,BillingTimeData> getBillingTimeConverter()
-
setBillingTimeConverter
public void setBillingTimeConverter(Converter<BillingTimeModel,BillingTimeData> billingTimeConverter)
-
getCartService
protected CartService getCartService()
-
setCartService
public void setCartService(CartService cartService)
-
getOrderService
protected OrderService getOrderService()
-
setOrderService
public void setOrderService(OrderService orderService)
-
getBillingTimeComparator
protected java.util.Comparator getBillingTimeComparator()
-
setBillingTimeComparator
public void setBillingTimeComparator(BillingTimeComparator billingTimeComparator)
-
-