com.ibm.commerce.price.commands

Class PriceCalculationHelper

  • java.lang.Object
    • com.ibm.commerce.price.commands.PriceCalculationHelper


  • public class PriceCalculationHelper
    extends java.lang.Object
    This PriceCalculationHelper Class provides utility methods for performing the price calculation.
    • Constructor Summary

      Constructors 
      Constructor and Description
      PriceCalculationHelper()
      PriceCalculationHelper constructor comment.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void createPriceBusinessPolicy(java.lang.String aPriceListName, java.lang.Long aPriceListOwner, java.lang.Integer aStoreEntityId, java.lang.String aPolicyName)
      Creates a price business policy.
      void deletePriceBusinessPolicy(java.lang.String aPriceListId, java.lang.Integer aStoreEntityId)
      Deletes a price business policy.
      java.lang.Long[] findAllMasterCatalogPriceLists(com.ibm.commerce.common.objects.StoreAccessBean aStoreAB)
      Retrieves the price lists associated with master catalog (Fast Method).
      java.lang.String genMarkers(int num)
      Generates parameter markers for the IN search predicate.
      java.lang.Long[] getAllMasterCatalogPriceLists(com.ibm.commerce.common.objects.StoreAccessBean aStoreAB)
      Retrieves the price lists associated with master catalog (Alternative Method).
      java.util.Hashtable getAllPolicyPriceLists(com.ibm.commerce.common.objects.StoreAccessBean aStoreAB)
      Retrieves the price list business policies.
      java.util.Hashtable getAllPolicyPriceProperties(com.ibm.commerce.common.objects.StoreAccessBean aStoreAB)
      Retrieves the price list business policy properties.
      java.util.Vector getAllStandardPriceListAccessBeans()
      Retrieves the standard price list access beans.
      java.util.Vector getAllStandardPriceLists()
      Retrieves the ids of standard price list.
      MonetaryAmount getDynamicKitConfigurationPriceWithPredefinedConfiguration(java.lang.String aCurrency, java.lang.Long tradingId, com.ibm.commerce.order.objects.OrderItemAccessBean oiab, java.lang.Long dynamicKitCatalogEntryId, java.lang.Long dynamicKitPredefinedConfigurationId, MonetaryAmount predefinedConfigurationPrice, com.ibm.commerce.command.CommandContext commandContext)
      Returns the cost of the dynamic kit configuration represented by the passed OrderItemAccessBean, oiab using the starting point represented by startPointOfferAccessBean.
      MonetaryAmount getDynamicKitPrice(java.lang.String aCurrency, com.ibm.commerce.command.CommandContext aCommandContext, java.lang.String astrConfigurationId, com.ibm.commerce.order.objects.OrderItemAccessBean aabOrderItem)
      get dynamic kit price
      MonetaryAmount getDynamicKitPrice(java.lang.String aCurrency, com.ibm.commerce.command.CommandContext aCommandContext, java.lang.String astrConfigurationId, com.ibm.commerce.order.objects.OrderItemAccessBean aabOrderItem, java.util.Vector avecOrderItemComponents)
      get dynamic kit price
      MonetaryAmount getDynamicKitPrice(java.lang.String aCurrency, com.ibm.commerce.command.CommandContext aCommandContext, java.lang.String astrConfigurationId, com.ibm.commerce.order.objects.OrderItemAccessBean aabOrderItem, java.util.Vector avecOrderItemComponents, java.lang.Long[] tradingIds)
      Calls getDynamicKitPrice(aCurrency, aCommandContext, astrConfigurationId, aabOrderItem, avecOrderItemComponents, tradingIds, true) to find the dynamic kit price using starting points.
      MonetaryAmount getDynamicKitPrice(java.lang.String aCurrency, com.ibm.commerce.command.CommandContext aCommandContext, java.lang.String astrConfigurationId, com.ibm.commerce.order.objects.OrderItemAccessBean aabOrderItem, java.util.Vector avecOrderItemComponents, java.lang.Long[] tradingIds, boolean useStartingPoint, java.lang.Long dynamicKitPredefinedConfigurationId)
      get dynamic kit price
      java.lang.String getInPredicate(java.lang.Object[] objects)
      Composes the IN search predicate.
      static PriceCalculationHelper getInstance()
      Get PriceCalculationHelper instance
      java.lang.Long getMemberIdFromPrcPolicyProperties(com.ibm.commerce.datatype.TypedProperty aparam)
      Get member Id from properties retrieved from price policy
      com.ibm.commerce.order.objects.OfferPriceAccessBean getNominalCost(java.lang.Long aCatEntryID, java.lang.Long aTpcID, java.lang.Integer aStoreID)
      Retrieve the nominal cost in the form of OfferPriceAccessBean for the input data: i) a given catalog entry ID (mandatory), ii) the nominal cost pricelist ID (optional), iii) the store ID (mandatory).
      java.util.List getNominalCostOfferABs(java.lang.Long aCatEntryID, java.lang.Long aTpcID, java.lang.Integer aStoreID)
      Retrieve the nominal cost in the form of OfferAccessBean for the input data: i) a given catalog entry ID (mandatory), ii) the nominal cost pricelist ID (optional), iii) the store ID (mandatory).
      java.lang.Long getNominalCostPriceList(java.lang.Integer aStoreID)
      Retrieve the nominal cost pricelist ID for a given store (there is one and only one pricelist).
      java.lang.String getPolicyPriceList(java.lang.String aPolicyProperties)
      Retrieves the price list associated with a policy.
      java.lang.String getPolicyProductSet(java.lang.String aPolicyProperties)
      Retrieves the product set associated with a policy.
      java.lang.String getPriceListType(java.lang.String properties)
      Determine the type of the pricelist based on the value of PROPERTIES attribute of a policy entity.
      PricedDynamicKitPredefinedConfiguration getStartingOfferAndPriceOfPredefinedConfigurationFromTradingAgreement(java.lang.Long tradingId, java.lang.Long dynamicKitCatalogEntryId, java.lang.Long dynamicKitPredefinedConfigurationId, java.lang.Double quantity, java.lang.String currency, com.ibm.commerce.common.objects.StoreAccessBean storeAB)
      Returns the starting price of a predefined configuration of a dynamic kit.
      void handlePriceNotFoundException(ItemPriceInfo aItemPriceInfo, java.lang.String aCurrency, java.lang.String aClassName)
      Handles the price not found exception.
      boolean isBestPrice(QualifyingOfferInfo offerInfo, java.math.BigDecimal aPriceValue)
      Compares two prices for the best.
      boolean isHybridPriceLock(java.lang.String configXML) 
      boolean processOfferPricesVector(QualifyingOfferInfo offerInfo, java.util.Vector offerPricesVector, java.lang.String requestedCurrency, com.ibm.commerce.order.objects.OfferAccessBean offer, com.ibm.commerce.common.objects.StoreAccessBean storeAB)
      Process the prices for a specific offer.
      void setPriceListProductSetId(java.lang.String aPriceListId, java.lang.String aProductSetId)
      Sets the product set id in the price list.
      MonetaryAmount setRoundCustomizedPrice(MonetaryAmount aPrice, com.ibm.commerce.common.objects.StoreAccessBean aStoreAB)
      Rounds up the input price.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • BIG_DECIMAL_ZERO

        public static final java.math.BigDecimal BIG_DECIMAL_ZERO
        String of big decimal "0"
      • CONFIGURATOR_BOM_XML_ATTRIBUTE_PRICELOCK

        public static final java.lang.String CONFIGURATOR_BOM_XML_ATTRIBUTE_PRICELOCK
        The Price attribute in the ConfiguratorBOM XML generated from Sterling Dynamic Kit Configurator.
        See Also:
        Constant Field Values
      • CONFIGURATOR_BOM_XML_ATTRIBUTE_PRICELOCK_DEFAULTVALUE

        public static final java.lang.String CONFIGURATOR_BOM_XML_ATTRIBUTE_PRICELOCK_DEFAULTVALUE
        The default price lock of the component and dynamickit in the ConfiguratorBOM XML.
        See Also:
        Constant Field Values
      • CONFIGURATOR_BOM_XML_ATTRIBUTE_SKU

        public static final java.lang.String CONFIGURATOR_BOM_XML_ATTRIBUTE_SKU
        The SKU attribute in the ConfiguratorBOM XML generated from Sterling Dynamic Kit Configurator.
        See Also:
        Constant Field Values
      • CONFIGURATOR_BOM_XML_ELEMENT_LINE_ITEM

        public static final java.lang.String CONFIGURATOR_BOM_XML_ELEMENT_LINE_ITEM
        The LineItem element name in the ConfiguratorBOM XML generated from Sterling Dynamic Kit Configurator.
        See Also:
        Constant Field Values
      • CONFIGURATOR_BOM_XML_NODE_CONFIGURATOR_BOM

        public static final java.lang.String CONFIGURATOR_BOM_XML_NODE_CONFIGURATOR_BOM
        See Also:
        Constant Field Values
      • COPYRIGHT

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

        public static final java.lang.Double DOUBLE_ZERO
        String of "0" for double type
      • ERRTASK_NAME

        public static final java.lang.String ERRTASK_NAME
        String of RetrievePriceErrorView
        See Also:
        Constant Field Values
      • INTEGER_ZERO

        public static final java.lang.Integer INTEGER_ZERO
        String of "0" for integer type
      • LONG_ZERO

        public static final java.lang.Long LONG_ZERO
        String of "0" for Long type
      • NULL

        public static final java.lang.Object NULL
        String of object NULL
    • Constructor Detail

      • PriceCalculationHelper

        public PriceCalculationHelper()
        PriceCalculationHelper constructor comment.
    • Method Detail

      • createPriceBusinessPolicy

        public void createPriceBusinessPolicy(java.lang.String aPriceListName,
                                              java.lang.Long aPriceListOwner,
                                              java.lang.Integer aStoreEntityId,
                                              java.lang.String aPolicyName)
                                       throws com.ibm.commerce.exception.ECException,
                                              java.sql.SQLException
        Creates a price business policy.

        Parameters:
        aPriceListName - the name of the price list for the policy.
        aPriceListOwner - the owner id of the price list.
        aStoreEntityId - the id the store.
        aPolicyName - the name for the policy.
        Throws:
        com.ibm.commerce.exception.ECException
        java.sql.SQLException
      • deletePriceBusinessPolicy

        public void deletePriceBusinessPolicy(java.lang.String aPriceListId,
                                              java.lang.Integer aStoreEntityId)
                                       throws com.ibm.commerce.exception.ECException
        Deletes a price business policy.

        Parameters:
        aPriceListId - the id of the price list.
        aStoreEntityId - the id the store.
        Throws:
        com.ibm.commerce.exception.ECException
      • findAllMasterCatalogPriceLists

        public java.lang.Long[] findAllMasterCatalogPriceLists(com.ibm.commerce.common.objects.StoreAccessBean aStoreAB)
                                                        throws com.ibm.commerce.exception.ECException
        Retrieves the price lists associated with master catalog (Fast Method).

        Parameters:
        aStoreAB - the access bean of the store which owns the master catalog.

        Returns:
        A list of price list ids for the master catalogs.
        Throws:
        com.ibm.commerce.exception.ECException
      • genMarkers

        public java.lang.String genMarkers(int num)
        Generates parameter markers for the IN search predicate.
        Parameters:
        objects -
        Returns:
        the parameter markers for inPrdicate clause
      • getAllMasterCatalogPriceLists

        public java.lang.Long[] getAllMasterCatalogPriceLists(com.ibm.commerce.common.objects.StoreAccessBean aStoreAB)
                                                       throws com.ibm.commerce.exception.ECException
        Retrieves the price lists associated with master catalog (Alternative Method).

        Parameters:
        aStoreAB - the access bean of the store which owns the master catalog.

        Returns:
        A list of price list ids for the master catalogs.
        Throws:
        com.ibm.commerce.exception.ECException
      • getAllPolicyPriceLists

        public java.util.Hashtable getAllPolicyPriceLists(com.ibm.commerce.common.objects.StoreAccessBean aStoreAB)
                                                   throws com.ibm.commerce.exception.ECException
        Retrieves the price list business policies.

        Parameters:
        aStoreAB - the access bean of the store which owns the policies.

        Returns:
        A list of price list policies.
        Throws:
        com.ibm.commerce.exception.ECException
      • getAllPolicyPriceProperties

        public java.util.Hashtable getAllPolicyPriceProperties(com.ibm.commerce.common.objects.StoreAccessBean aStoreAB)
                                                        throws com.ibm.commerce.exception.ECException
        Retrieves the price list business policy properties.

        Parameters:
        aStoreAB - the access bean of the store which owns the policies.

        Returns:
        A list of price list policy properties.
        Throws:
        com.ibm.commerce.exception.ECException
      • getAllStandardPriceListAccessBeans

        public java.util.Vector getAllStandardPriceListAccessBeans()
                                                            throws com.ibm.commerce.exception.ECException
        Retrieves the standard price list access beans.

        Parameters:
        aStoreAB - the access bean of the store which owns the standard price lists.

        Returns:
        A list of standard price list access beans.
        Throws:
        com.ibm.commerce.exception.ECException
      • getAllStandardPriceLists

        public java.util.Vector getAllStandardPriceLists()
                                                  throws com.ibm.commerce.exception.ECException
        Retrieves the ids of standard price list.

        Parameters:
        aStoreAB - the access bean of the store which owns the standard price lists.

        Returns:
        A list of standard price list ids.
        Throws:
        com.ibm.commerce.exception.ECException
      • getDynamicKitConfigurationPriceWithPredefinedConfiguration

        public MonetaryAmount getDynamicKitConfigurationPriceWithPredefinedConfiguration(java.lang.String aCurrency,
                                                                                         java.lang.Long tradingId,
                                                                                         com.ibm.commerce.order.objects.OrderItemAccessBean oiab,
                                                                                         java.lang.Long dynamicKitCatalogEntryId,
                                                                                         java.lang.Long dynamicKitPredefinedConfigurationId,
                                                                                         MonetaryAmount predefinedConfigurationPrice,
                                                                                         com.ibm.commerce.command.CommandContext commandContext)
                                                                                  throws java.lang.Exception
        Returns the cost of the dynamic kit configuration represented by the passed OrderItemAccessBean, oiab using the starting point represented by startPointOfferAccessBean.
        Parameters:
        aCurrency - The currency under which to return the cost.
        tradingId - The ID of the contract to use in retrieving individual dynamic kit component prices.
        oiab - The OrderItemAccessBean that represents the dynamic kit configuration for which to calculate cost.
        dynamicKitCatalogEntryId - The ID of the dynamic kit being priced.
        dynamicKitPredefinedConfigurationId - The ID of the predefined configuration used to calculate the dynamic kit configuration's cost.
        predefinedConfigurationPrice - The MonetaryAmount object used to represent the price of the predefined configuration.
        commandContext - The command context under which to run pricing commands.
        Returns:
        A MonetaryAmount object that contains the cost of the dynamic kit configuration using the starting point passed to the method.
        Throws:
        java.lang.Exception - Thrown whenever the cost cannot be determined.
      • getDynamicKitPrice

        public MonetaryAmount getDynamicKitPrice(java.lang.String aCurrency,
                                                 com.ibm.commerce.command.CommandContext aCommandContext,
                                                 java.lang.String astrConfigurationId,
                                                 com.ibm.commerce.order.objects.OrderItemAccessBean aabOrderItem)
                                          throws com.ibm.commerce.exception.ECException
        get dynamic kit price
        Parameters:
        aCurrency - the currency
        aCommandContext - the command context for this class
        astrConfigrationId - the configuration ID
        aabOrderItem - the orderItem accessbean
        Returns:
        MonetaryAmount the price for this dynamic kit
        Throws:
        com.ibm.commerce.exception.ECException
      • getDynamicKitPrice

        public MonetaryAmount getDynamicKitPrice(java.lang.String aCurrency,
                                                 com.ibm.commerce.command.CommandContext aCommandContext,
                                                 java.lang.String astrConfigurationId,
                                                 com.ibm.commerce.order.objects.OrderItemAccessBean aabOrderItem,
                                                 java.util.Vector avecOrderItemComponents)
                                          throws com.ibm.commerce.exception.ECException
        get dynamic kit price
        Parameters:
        aCurrency - the currency
        aCommandContext - the command context for this class
        astrConfigrationId - the configuration ID
        aabOrderItem - the orderItem accessbean
        avecOrderItemComponents - a vector of orderItems
        Returns:
        MonetaryAmount the price for this dynamic kit
        Throws:
        com.ibm.commerce.exception.ECException
      • getDynamicKitPrice

        public MonetaryAmount getDynamicKitPrice(java.lang.String aCurrency,
                                                 com.ibm.commerce.command.CommandContext aCommandContext,
                                                 java.lang.String astrConfigurationId,
                                                 com.ibm.commerce.order.objects.OrderItemAccessBean aabOrderItem,
                                                 java.util.Vector avecOrderItemComponents,
                                                 java.lang.Long[] tradingIds)
                                          throws com.ibm.commerce.exception.ECException
        Calls getDynamicKitPrice(aCurrency, aCommandContext, astrConfigurationId, aabOrderItem, avecOrderItemComponents, tradingIds, true) to find the dynamic kit price using starting points.
        Parameters:
        aCurrency - the currency
        aCommandContext - the command context for this class
        astrConfigrationId - the configuration ID
        aabOrderItem - the orderItem accessbean
        avecOrderItemComponents - a vector of orderItems
        tradingIds - a Long array of passed in trading ids.
        Returns:
        MonetaryAmount the price for this dynamic kit
        Throws:
        com.ibm.commerce.exception.ECException
      • getDynamicKitPrice

        public MonetaryAmount getDynamicKitPrice(java.lang.String aCurrency,
                                                 com.ibm.commerce.command.CommandContext aCommandContext,
                                                 java.lang.String astrConfigurationId,
                                                 com.ibm.commerce.order.objects.OrderItemAccessBean aabOrderItem,
                                                 java.util.Vector avecOrderItemComponents,
                                                 java.lang.Long[] tradingIds,
                                                 boolean useStartingPoint,
                                                 java.lang.Long dynamicKitPredefinedConfigurationId)
                                          throws com.ibm.commerce.exception.ECException
        get dynamic kit price
        Parameters:
        aCurrency - the currency
        aCommandContext - the command context for this class
        astrConfigrationId - the confifuration ID
        aabOrderItem - the orderItem accessbean
        avecOrderItemComponents - a vector of orderItems
        tradingIds - a Long array of passed in trading ids.
        useStartingPoint - a boolean used to control if starting points are to be used in determining price
        dynamicKitPredefinedConfigurationAccessBean - an access bean to the predefined configuration to use for pricing the dynamic kit
        Returns:
        MonetaryAmount the price for this dynamic kit
        Throws:
        com.ibm.commerce.exception.ECException
      • getInPredicate

        public java.lang.String getInPredicate(java.lang.Object[] objects)
        Composes the IN search predicate.
        Parameters:
        objects -
        Returns:
        the inPrdicate clause
      • getInstance

        public static PriceCalculationHelper getInstance()
        Get PriceCalculationHelper instance
        Returns:
        an instance of PriceCalculationHelper
      • getMemberIdFromPrcPolicyProperties

        public java.lang.Long getMemberIdFromPrcPolicyProperties(com.ibm.commerce.datatype.TypedProperty aparam)
                                                          throws com.ibm.commerce.exception.ECException
        Get member Id from properties retrieved from price policy
        Parameters:
        aparam - the TypedProperty
        Returns:
        the member ID
        Throws:
        com.ibm.commerce.exception.ECException
      • getNominalCost

        public com.ibm.commerce.order.objects.OfferPriceAccessBean getNominalCost(java.lang.Long aCatEntryID,
                                                                                  java.lang.Long aTpcID,
                                                                                  java.lang.Integer aStoreID)
                                                                           throws com.ibm.commerce.exception.ECException
        Retrieve the nominal cost in the form of OfferPriceAccessBean for the input data: i) a given catalog entry ID (mandatory), ii) the nominal cost pricelist ID (optional), iii) the store ID (mandatory).
        Parameters:
        aCatEntryID - A catalog entry ID
        aTpcID - A nominal cost pricelist ID
        aStoreID - A store ID
        Returns:
        OfferPriceAccessBean which represents the nominal cost
        Throws:
        com.ibm.commerce.exception.ECException - if encountering RemoteException, or NamingException, or CreateException, or there are multiple offerPrices (since one entry has at most one nominal cost)
      • getNominalCostOfferABs

        public java.util.List getNominalCostOfferABs(java.lang.Long aCatEntryID,
                                                     java.lang.Long aTpcID,
                                                     java.lang.Integer aStoreID)
                                              throws com.ibm.commerce.exception.ECException
        Retrieve the nominal cost in the form of OfferAccessBean for the input data: i) a given catalog entry ID (mandatory), ii) the nominal cost pricelist ID (optional), iii) the store ID (mandatory).
        Parameters:
        aCatEntryID - A catalog entry ID
        aTpcID - A nominal cost pricelist ID
        aStoreID - A store ID
        Returns:
        List a list of OfferAccessBeans
        Throws:
        com.ibm.commerce.exception.ECException - if encountering RemoteException, or NamingException, or CreateException
      • getNominalCostPriceList

        public java.lang.Long getNominalCostPriceList(java.lang.Integer aStoreID)
                                               throws com.ibm.commerce.exception.ECException
        Retrieve the nominal cost pricelist ID for a given store (there is one and only one pricelist).
        Parameters:
        aStoreID -
        Returns:
        Long the nominal cost pricelist ID
        Throws:
        com.ibm.commerce.exception.ECException - throw ECApplicationException if there is no nominal cost pricelist or there are multiple nominal cost pricelists.
      • getPolicyPriceList

        public java.lang.String getPolicyPriceList(java.lang.String aPolicyProperties)
                                            throws com.ibm.commerce.exception.ECException
        Retrieves the price list associated with a policy.

        Parameters:
        aPolicyProperties - the properties defined in the policy.

        Returns:
        The id of the price list associated with the policy.
        Throws:
        com.ibm.commerce.exception.ECException
      • getPolicyProductSet

        public java.lang.String getPolicyProductSet(java.lang.String aPolicyProperties)
                                             throws com.ibm.commerce.exception.ECException
        Retrieves the product set associated with a policy.

        Parameters:
        aPolicyProperties - the properties defined in the policy.

        Returns:
        The id of the product set associated with the policy.
        Throws:
        com.ibm.commerce.exception.ECException
      • getPriceListType

        public java.lang.String getPriceListType(java.lang.String properties)
        Determine the type of the pricelist based on the value of PROPERTIES attribute of a policy entity. Possible results could be 'cost', 'list', or 'nominal', and so forth.
        Parameters:
        properties -
        Returns:
        String the type of the pricelist
      • getStartingOfferAndPriceOfPredefinedConfigurationFromTradingAgreement

        public PricedDynamicKitPredefinedConfiguration getStartingOfferAndPriceOfPredefinedConfigurationFromTradingAgreement(java.lang.Long tradingId,
                                                                                                                             java.lang.Long dynamicKitCatalogEntryId,
                                                                                                                             java.lang.Long dynamicKitPredefinedConfigurationId,
                                                                                                                             java.lang.Double quantity,
                                                                                                                             java.lang.String currency,
                                                                                                                             com.ibm.commerce.common.objects.StoreAccessBean storeAB)
                                                                                                                      throws com.ibm.commerce.exception.ECException
        Returns the starting price of a predefined configuration of a dynamic kit.
        Parameters:
        tradingId - The ID of the contract under which to retrieve predefined configuration prices.
        dynamicKitCatalogEntryId - The ID of the dynamic kit to which the predefined configuration is related.
        dynamicKitPredefinedConfigurationId - The ID of the predefined configuration for which to lookup a price.
        quantity - The number of this predefined configuration to be priced.
        currency - The currency under which to price.
        storeAB - A StoreAccessBean object representing the store in which the predefined configuration is available.
        Returns:
        The starting price of the predefined configuration.
        Throws:
        com.ibm.commerce.exception.ECException - Thrown when a problem is encountered retrieving prices or converting currencies.
      • handlePriceNotFoundException

        public void handlePriceNotFoundException(ItemPriceInfo aItemPriceInfo,
                                                 java.lang.String aCurrency,
                                                 java.lang.String aClassName)
                                          throws com.ibm.commerce.exception.ECException
        Handles the price not found exception.

        Parameters:
        aItemPriceInfo - the item pricing info for a catalog entry.
        aCurrency - the currency for the catalog entry.
        aClassName - the name of the Class that detects the exception.
        Throws:
        com.ibm.commerce.exception.ECException
      • isBestPrice

        public boolean isBestPrice(QualifyingOfferInfo offerInfo,
                                   java.math.BigDecimal aPriceValue)
        Compares two prices for the best.

        Parameters:
        offerInfo - the offer info containing the price for comparison.
        aPriceValue - the second price for comparison.

        Returns:
        true if second price is lower; false otherwise.
      • isHybridPriceLock

        public boolean isHybridPriceLock(java.lang.String configXML)
                                  throws com.ibm.commerce.exception.ECApplicationException
        Parameters:
        configXML - The configuration xml
        Returns:
        true if the price is partially locked, otherwise return false.
        Throws:
        com.ibm.commerce.exception.ECApplicationException
      • processOfferPricesVector

        public boolean processOfferPricesVector(QualifyingOfferInfo offerInfo,
                                                java.util.Vector offerPricesVector,
                                                java.lang.String requestedCurrency,
                                                com.ibm.commerce.order.objects.OfferAccessBean offer,
                                                com.ibm.commerce.common.objects.StoreAccessBean storeAB)
                                         throws com.ibm.commerce.exception.ECException
        Process the prices for a specific offer. It is assumed that there is no price for the shopper's requested currency. And therefore all prices are converted to the requested currency. And the lowest one is chosen.
        Parameters:
        offerInfo - a qualified offer info.
        offerPricesVector - a vector of prices for an offer.
        requestedCurrency - the shopper's requested currency.
        offer - offer access bean
        storeAB - the store access bean.
        Returns:
        whether there was a successful conversion from any of the prices to the requested currency (and its the best yet).
        Throws:
        com.ibm.commerce.exception.ECException
      • setPriceListProductSetId

        public void setPriceListProductSetId(java.lang.String aPriceListId,
                                             java.lang.String aProductSetId)
                                      throws com.ibm.commerce.exception.ECException
        Sets the product set id in the price list.
        Parameters:
        aPriceListId - the price list ID
        aProductSetId - the product set ID
        Throws:
        com.ibm.commerce.exception.ECException
      • setRoundCustomizedPrice

        public MonetaryAmount setRoundCustomizedPrice(MonetaryAmount aPrice,
                                                      com.ibm.commerce.common.objects.StoreAccessBean aStoreAB)
                                               throws com.ibm.commerce.exception.ECSystemException
        Rounds up the input price.

        Parameters:
        aPrice - the price monetary amount.
        aCatEntryId - The input catalog entry.

        Returns:
        The rounded up quantity amount for the catalog entry.
        Throws:
        com.ibm.commerce.exception.ECSystemException