com.ibm.commerce.price.commands

Class AbstractGetDynamicKitUnitPriceCmdImpl

  • java.lang.Object
    • com.ibm.websphere.command.CacheableCommandImpl
      • com.ibm.commerce.command.MeasuredCacheableCommandImpl
        • com.ibm.commerce.command.AbstractECTargetableCommand
          • com.ibm.commerce.command.TaskCommandImpl
            • com.ibm.commerce.price.commands.AbstractGetDynamicKitUnitPriceCmdImpl
  • All Implemented Interfaces:
    com.ibm.commerce.command.CacheableECCommand, com.ibm.commerce.command.ECCommand, com.ibm.commerce.command.ECTargetableCommand, com.ibm.commerce.command.TaskCommand, GetDynamicKitUnitPriceCmd, com.ibm.websphere.command.CacheableCommand, com.ibm.websphere.command.Command
    Direct Known Subclasses:
    GetDynamicKitDisplayUnitPriceCmdImpl, GetDynamicKitEntitledUnitPriceCmdImpl, GetDynamicKitUnitPriceCmdImpl


    public abstract class AbstractGetDynamicKitUnitPriceCmdImpl
    extends com.ibm.commerce.command.TaskCommandImpl
    implements GetDynamicKitUnitPriceCmd
    This is the implementation of GetDynamicKitUnitPriceCmd.

    The business logic is divide into two steps. Firstly adds up all entitled components' price through calculateTotalPriceOfComponents(). Then If there is a contract with PriceRuleTC, applies PriceRuleTC to dynamic kit level through calculateFinalPriceOfDynamicKit(). Here we don't consider the PriceTC.

    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String CLASSNAME
      The name of this class.
      static java.lang.String COPYRIGHT
      IBM copyright notice field.
      • Fields inherited from interface com.ibm.commerce.command.CacheableECCommand

        defaultCommandClassName
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.Long[] getApplicableTradingIds()
      Returns the identifiers of the trading agreements that were used to determine the prices for a catalog entry.
      MonetaryAmount[] getApplicableTradingUnitPrices()
      Returns the prices that were determined for each of the applied trading agreements for a catalog entry.
      CatEntryPrices[] getDKComponentPrices()
      Returns the components' price info.
      boolean getLockedPriceFromConfigurationXML()
      Parse the configuration xml to get the total price if the price is locked
      QuantityAmount getQuantity()
      Gets quantity of the dynamic kit.
      java.lang.Long getTradingId()
      Returns the identifier of the trading agreement which was used to calculate the best price.
      MonetaryAmount getUnitPrice()
      Returns the best unit price of the dynamic kit in the requested currency.
      void performExecute()
      The main logic to execute the command.
      void setCurrency(java.lang.String currency)
      Sets the desired currency to be used for the output price.
      void setDefaultConfiguration(java.lang.String defaultConfiguration)
      Set the configuration BOM xml of the PDC
      void setDKComponentPrices(CatEntryPrices[] componentPrices)
      Sets components of the dynamic kit.
      void setDynamicKitId(java.lang.Long dynamicKitId)
      Sets the dynamic kit id.
      void setQuantity(QuantityAmount newQuantity)
      Sets quantity of the dynamic kit.
      void setTradingIds(java.lang.Long[] tradingIdsIn)
      Sets the identifiers of the input trading agreements.
      void validateParameters()
      Checks mandatory parameters.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from class com.ibm.commerce.command.AbstractECTargetableCommand

        accessControlCheck, checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getObjectSize, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, isReadyToCallExecute, reset, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
      • Methods inherited from interface com.ibm.commerce.command.CacheableECCommand

        execute
      • Methods inherited from interface com.ibm.commerce.command.ECCommand

        checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties