Class AbstractOrderRaoToOrderConverter

    • Constructor Detail

      • AbstractOrderRaoToOrderConverter

        public AbstractOrderRaoToOrderConverter()
    • Method Detail

      • convert

        public Order convert​(AbstractOrderRAO cartRao)
        Description copied from interface: Converter
        Converts the source object, creating a new instance of the destination type
        Specified by:
        convert in interface Converter<AbstractOrderRAO,​Order>
        Specified by:
        convert in interface org.springframework.core.convert.converter.Converter<AbstractOrderRAO,​Order>
        Parameters:
        cartRao - the source object
        Returns:
        the converted object
      • convertEntriesToLineItems

        protected java.util.List<LineItem> convertEntriesToLineItems​(AbstractOrderRAO cartRao)
      • convertToShippingOrderCharge

        protected OrderCharge convertToShippingOrderCharge​(AbstractOrderRAO cartRao)
        creates the OrderCharge of type SHIPPING based on the given cart. If the cart contains a ShipmentRAO it will be taken for the shipping charge calculation, otherwise the AbstractOrderRAO.getDeliveryCost() is used.
        Parameters:
        cartRao - the cart to get the shipping order charge from
        Returns:
        an OrderCharge of type SHIPPING or null if no shipping cost is available
      • convertToPaymentOrderCharge

        protected OrderCharge convertToPaymentOrderCharge​(AbstractOrderRAO cartRao)
        creates the OrderCharge of type PAYMENT based on the given cart.
        Parameters:
        cartRao - the cart to get the payment order charge from
        Returns:
        an OrderCharge of type PAYMENT or null if no payment cost is available
      • convert

        public Order convert​(AbstractOrderRAO paramSOURCE,
                             Order paramTARGET)
        Description copied from interface: Converter
        Convert the source object by filling the prototype
        Specified by:
        convert in interface Converter<AbstractOrderRAO,​Order>
        Parameters:
        paramSOURCE - the source object
        paramTARGET - the prototype to fill
        Returns:
        the converted object, identical to the prototype
      • setAbstractOrderRaoToCurrencyConverter

        public void setAbstractOrderRaoToCurrencyConverter​(Converter<AbstractOrderRAO,​Currency> abstractOrderRaoToCurrencyConverter)
      • setOrderEntryRaoToNumberedLineItemConverter

        public void setOrderEntryRaoToNumberedLineItemConverter​(Converter<OrderEntryRAO,​NumberedLineItem> orderEntryRaoToNumberedLineItemConverter)
      • setCalculationStrategies

        public void setCalculationStrategies​(CalculationStrategies calculationStrategies)
      • getOrderUtils

        protected OrderUtils getOrderUtils()
      • setOrderUtils

        public void setOrderUtils​(OrderUtils orderUtils)
      • getRaoUtils

        protected RaoUtils getRaoUtils()
      • setRaoUtils

        public void setRaoUtils​(RaoUtils raoUtils)