Class DefaultDeliveryCostsStrategy
- java.lang.Object
-
- de.hybris.platform.jalo.order.delivery.DefaultDeliveryCostsStrategy
-
- All Implemented Interfaces:
DeliveryCostsStrategy
public class DefaultDeliveryCostsStrategy extends java.lang.Object implements DeliveryCostsStrategy
Interface for strategy to calculate the delivery costs of a existingAbstractOrder.Will be used by
AbstractOrder.findDeliveryCosts().
-
-
Constructor Summary
Constructors Constructor Description DefaultDeliveryCostsStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PriceValuefindDeliveryCosts(SessionContext ctx, AbstractOrder order)Called duringAbstractOrder.calculate(),AbstractOrder.calculate(java.util.Date),AbstractOrder.recalculate()andAbstractOrder.recalculate(java.util.Date)to fetch and set the delivery cost for this order.
-
-
-
Method Detail
-
findDeliveryCosts
public PriceValue findDeliveryCosts(SessionContext ctx, AbstractOrder order)
Called duringAbstractOrder.calculate(),AbstractOrder.calculate(java.util.Date),AbstractOrder.recalculate()andAbstractOrder.recalculate(java.util.Date)to fetch and set the delivery cost for this order.As default this method calls
DeliveryMode.getCost(AbstractOrder)when a delivery mode was set. You may override this method to implement different behavior. Please note that at this time no order total have been set (Except the order total which holds the entry total sum) so don't rely on these values.- Specified by:
findDeliveryCostsin interfaceDeliveryCostsStrategy- Returns:
- the delivery costs of this abstract order
-
-