com.ibm.commerce.price.commands

Interface GetDynamicKitUnitPriceCmd

    • Field Summary

      Fields 
      Modifier and Type Field and Description
      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 Abstract 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 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[] tradingIds)
      Sets the identifiers of the input trading agreements.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • 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, performExecute, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties, validateParameters
    • Field Detail

      • COPYRIGHT

        static final java.lang.String COPYRIGHT
        IBM copyright notice field.
        See Also:
        Constant Field Values
    • Method Detail

      • getApplicableTradingIds

        java.lang.Long[] getApplicableTradingIds()
        Returns the identifiers of the trading agreements that were used to determine the prices for a catalog entry.
        Returns:
        The identifiers of all the trading agreements that were used to obtain the prices for the specified catalog entry. This array may be empty.
      • getApplicableTradingUnitPrices

        MonetaryAmount[] getApplicableTradingUnitPrices()
        Returns the prices that were determined for each of the applied trading agreements for a catalog entry. Each element in the returned array corresponds to the element at the same index in the array returned by getApplicableTradingIds().
        Returns:
        The unit price amounts of the specified catalog entry in that each of them was determined individually for its corresponding trading agreement. This array may be empty.
      • getDKComponentPrices

        CatEntryPrices[] getDKComponentPrices()
        Returns the components' price info.
        Returns:
        Returns the components' price info.
      • getLockedPriceFromConfigurationXML

        boolean getLockedPriceFromConfigurationXML()
        Parse the configuration xml to get the total price if the price is locked
        Returns:
        true if the price is locked from the sterling configurator, false otherwise
      • getQuantity

        QuantityAmount getQuantity()
        Gets quantity of the dynamic kit.
        Returns:
        the quantity of the dynamic kit
      • getTradingId

        java.lang.Long getTradingId()
        Returns the identifier of the trading agreement which was used to calculate the best price.
        Returns:
        The identifier of the trading agreement that was used to determine the best price. This value may be null if no trading agreement was used to determine the price.
      • getUnitPrice

        MonetaryAmount getUnitPrice()
        Returns the best unit price of the dynamic kit in the requested currency.
        Returns:
        The best unit price of the dynamic kit. If the components setted by the methodsetDKComponentPrices is null or empty, the unit price will be null.
      • setCurrency

        void setCurrency(java.lang.String currency)
        Sets the desired currency to be used for the output price.

        This input value is optional. The default value is obtained from another source, such as CurrencyManager#getCurrency(StoreAccessBean, String, Integer).

        Parameters:
        currency - The currency to look up the price. If null, the default value will be used. If the supplied currency is empty or not supported for the store, a default store currency will be used.
      • setDefaultConfiguration

        void setDefaultConfiguration(java.lang.String defaultConfiguration)
        Set the configuration BOM xml of the PDC
        Parameters:
        defaultConfiguration - the configuration xml of the PDC
      • setDKComponentPrices

        void setDKComponentPrices(CatEntryPrices[] componentPrices)
        Sets components of the dynamic kit.

        For CatEntryPrices, you just need set catalog entry id and quantity.

        Parameters:
        componentPrices - The components of the dynamic kit. If null or empty, the unit price returned is zero.
      • setDynamicKitId

        void setDynamicKitId(java.lang.Long dynamicKitId)
        Sets the dynamic kit id.
        Parameters:
        dynamicKitId - The dynamic kit id can not be null.
      • setQuantity

        void setQuantity(QuantityAmount newQuantity)
        Sets quantity of the dynamic kit.
        Parameters:
        newQuantity - the quantity of the dynamic kit
      • setTradingIds

        void setTradingIds(java.lang.Long[] tradingIds)
        Sets the identifiers of the input trading agreements.

        Each member is entitled to a number of trading agreements (possibly zero). The trading agreements for each catalog entry are provided in one of two ways (from highest to lowest precedence):

        1. This method;
        2. ContractCmdUtil#getCurrentTradingAgreements(CommandContext).

        This input value is optional. The default value is null.

        Parameters:
        tradingIds - The identifiers of the trading agreements to be used to determine the prices. If null or empty, the current or entitled trading agreements will be used as described above.