Class DefaultTmaAbstractOrderEntryPriceBuilder

java.lang.Object
de.hybris.platform.b2ctelcoservices.pricing.strategy.builder.orderentry.DefaultTmaAbstractOrderEntryPriceBuilder
All Implemented Interfaces:
TmaAbstractOrderEntryPriceBuilder
Direct Known Subclasses:
TmaAbstractOrderOneTimeChargePriceBuilder, TmaAbstractOrderPriceValueBuilder, TmaAbstractOrderProductOfferingPriceBuilder, TmaAbstractOrderRecurringChargePriceBuilder, TmaAbstractOrderUsageChargePriceBuilder, TmaAbstractOrderUsageChargesPriceBuilder

public abstract class DefaultTmaAbstractOrderEntryPriceBuilder extends Object implements TmaAbstractOrderEntryPriceBuilder
Abstract builder for defining a template used to create a list of TmaAbstractOrderPriceModel to be set on the order entry
Since:
1907
  • Constructor Details

    • DefaultTmaAbstractOrderEntryPriceBuilder

      public DefaultTmaAbstractOrderEntryPriceBuilder()
  • Method Details

    • buildPrices

      public List<TmaAbstractOrderPriceModel> buildPrices(PriceRowModel price, AbstractOrderEntryModel entry, List<de.hybris.platform.util.TaxValue> taxes)
      Description copied from interface: TmaAbstractOrderEntryPriceBuilder
      Builds a list of TmaAbstractOrderPriceModel for the given param.
      Specified by:
      buildPrices in interface TmaAbstractOrderEntryPriceBuilder
      Parameters:
      price - the price used to create and populate the order entry prices list
      entry - the order entry for which the price is created
      taxes - the taxes to be applied on the order price
      Returns:
      the list of order entry prices
    • shouldCreatePrices

      protected abstract boolean shouldCreatePrices(PriceRowModel price)
      Verify is the list of prices for order entry should be created
      Parameters:
      price - the priceCharge based on which the order entry priceCharge should be created
      Returns:
      Returns true if the condition that verifies if prices should be created is fulfilled, otherwise false
    • createPrices

      protected abstract List<TmaAbstractOrderPriceModel> createPrices(PriceRowModel price, AbstractOrderEntryModel entry, List<de.hybris.platform.util.TaxValue> taxes)
      Creates a list of TmaAbstractOrderPriceModel based on the param.
      Parameters:
      price - the priceCharge used to create and populate the prices list
      entry - the entry for which the priceCharge is computed
      taxes - the taxes that should be applied on the order entry priceCharge
      Returns:
      the created and populated priceCharge list
    • populatePriceValues

      protected void populatePriceValues(Double price, AbstractOrderEntryModel entry, List<de.hybris.platform.util.TaxValue> taxes, TmaAbstractOrderChargePriceModel priceCharge)
      Populates the price values for the order entry price charge. If the price is net then the taxes are added to the duty free amount value, otherwise the taxes are subtracted from the duty free amount value
      Parameters:
      price - the price value to be set on the charge
      entry - the entry for which the price charge is populated
      taxes - the taxes to be applied
      priceCharge - the charge for which the price is populated
    • populateBillingTime

      protected void populateBillingTime(ChargeEntryModel chargeEntry, TmaAbstractOrderChargePriceModel priceCharge)
      Populates the TmaAbstractOrderChargePriceModel with the billing time information.
      Parameters:
      chargeEntry - the ChargeEntryModel from which the billing time is retrieved in case it exists
      priceCharge - the charge price for which the billing time will be populated
    • retrieveDefaultBillingTime

      protected BillingTimeModel retrieveDefaultBillingTime()
      Retrieves the BillingTimeModel of the default configured subscription term.
      Returns:
      the BillingTimeModel of the default term if any configured.
    • getModelService

      protected de.hybris.platform.servicelayer.model.ModelService getModelService()
    • setModelService

      public void setModelService(de.hybris.platform.servicelayer.model.ModelService modelService)
    • getKeyGenerator

      protected de.hybris.platform.servicelayer.keygenerator.KeyGenerator getKeyGenerator()
    • setKeyGenerator

      public void setKeyGenerator(de.hybris.platform.servicelayer.keygenerator.KeyGenerator keyGenerator)
    • getTmaRetrieveTaxRateStrategy

      protected TmaRetrieveTaxRateStrategy getTmaRetrieveTaxRateStrategy()
    • setTmaRetrieveTaxRateStrategy

      public void setTmaRetrieveTaxRateStrategy(TmaRetrieveTaxRateStrategy tmaRetrieveTaxRateStrategy)
    • getSubscriptionTermService

      protected TmaSubscriptionTermService getSubscriptionTermService()
    • setSubscriptionTermService

      public void setSubscriptionTermService(TmaSubscriptionTermService subscriptionTermService)