public class DefaultMultiAddressDeliveryCostsStrategy extends java.lang.Object implements DeliveryCostsStrategy
AbstractOrder by grouping its AbstractOrderEntry based
on their assigned DeliveryMode and 'DeliveryAddress'. For each of these "groups" a new order
createTempCart(java.util.List<de.hybris.platform.jalo.order.AbstractOrderEntry>, de.hybris.platform.jalo.user.Address, de.hybris.platform.jalo.order.delivery.DeliveryMode, de.hybris.platform.jalo.user.User, de.hybris.platform.jalo.c2l.Currency, boolean) and the total of their delivery costs will be
returned by getCost(de.hybris.platform.jalo.SessionContext, de.hybris.platform.jalo.order.AbstractOrder).| Constructor and Description |
|---|
DefaultMultiAddressDeliveryCostsStrategy() |
| Modifier and Type | Method and Description |
|---|---|
protected AbstractOrder |
createTempCart(java.util.List<AbstractOrderEntry> entries,
Address deliveryAddress,
DeliveryMode mode,
User user,
Currency curr,
boolean net)
Creates a temporary order, which will be used for calculating the delivery costs of the assigned
AbstractOrderEntry. |
PriceValue |
findDeliveryCosts(SessionContext ctx,
AbstractOrder order)
Called during
AbstractOrder.calculate(), AbstractOrder.calculate(java.util.Date),
AbstractOrder.recalculate() and AbstractOrder.recalculate(java.util.Date) to fetch and set the
delivery cost for the assigned order. |
CartFactory |
getCartFactory() |
protected PriceValue |
getCost(SessionContext ctx,
AbstractOrder order)
Calculates the delivery costs of the specified
AbstractOrder by grouping its AbstractOrderEntry
based on their assigned DeliveryMode and 'DeliveryAddress'. |
void |
setCartFactory(CartFactory cartFactory) |
public DefaultMultiAddressDeliveryCostsStrategy()
public CartFactory getCartFactory()
public void setCartFactory(CartFactory cartFactory)
public PriceValue findDeliveryCosts(SessionContext ctx, AbstractOrder order)
AbstractOrder.calculate(), AbstractOrder.calculate(java.util.Date),
AbstractOrder.recalculate() and AbstractOrder.recalculate(java.util.Date) to fetch and set the
delivery cost for the assigned order.findDeliveryCosts in interface DeliveryCostsStrategyprotected PriceValue getCost(SessionContext ctx, AbstractOrder order) throws JaloDeliveryModeException
AbstractOrder by grouping its AbstractOrderEntry
based on their assigned DeliveryMode and 'DeliveryAddress'. For each of these "groups" a new order
createTempCart(java.util.List<de.hybris.platform.jalo.order.AbstractOrderEntry>, de.hybris.platform.jalo.user.Address, de.hybris.platform.jalo.order.delivery.DeliveryMode, de.hybris.platform.jalo.user.User, de.hybris.platform.jalo.c2l.Currency, boolean) will be created and its delivery cost calculated.ctx - the session contextorder - the original order (containing AbstractOrderEntry, which can have their own 'DeliveryAddress'JaloDeliveryModeExceptionprotected AbstractOrder createTempCart(java.util.List<AbstractOrderEntry> entries, Address deliveryAddress, DeliveryMode mode, User user, Currency curr, boolean net) throws JaloGenericCreationException, JaloAbstractTypeException
AbstractOrderEntry. The configured CartFactory will be used for the internal cart/order creationentries - the order entries, which will be added to the returned orderdeliveryAddress - the delivery address of the ordermode - the DeliveryMode of the orderuser - the order usercurr - the currencynet - the pricing of the orderJaloGenericCreationExceptionJaloAbstractTypeExceptionCopyright © 2018 SAP SE. All Rights Reserved.