atg.commerce.pricing
Interface ItemPricingEngine

All Superinterfaces:
PricingEngine
All Known Implementing Classes:
ItemPricingEngineImpl

public interface ItemPricingEngine
extends PricingEngine

This extension of the PricingEngine interface describes an object whose job it is to determine prices for CommerceItem objects. There are three different ways an ItemPricingEngine can determine items' prices:

priceItem prices a single item within an input context. priceEachItem prices a number of items all at once, but pretends that each is in its own context by itself. priceItems prices a number of items all at once, and assumes that they're all together in one big pricing context. The context in which items are priced can be important, because some modifications to an item's price may only take place if the item appears in a pricing context with other items. For example, a certain pricing model (promotion) may only give 10 percent off if there's one red item and one blue item in the pricing context. Alone, neither of the items would get the discount. Together, they may. An ItemPricingEngine assumes that the objects in pPricingModels are RepositoryItems that describe a price modification.


Field Summary
static java.lang.String CLASS_VERSION
          Class version string
 
Method Summary
 java.util.List priceEachItem(java.util.List pItems, java.util.Collection pPricingModels, java.util.Locale pLocale, RepositoryItem pProfile, java.util.Map pExtraParameters)
          Price each of a List of items in a context
 ItemPriceInfo priceItem(CommerceItem pItem, java.util.Collection pPricingModels, java.util.Locale pLocale, RepositoryItem pProfile, java.util.Map pExtraParameters)
          Price a single item in a context
 java.util.List priceItems(java.util.List pItems, java.util.Collection pPricingModels, java.util.Locale pLocale, RepositoryItem pProfile, Order pOrder, java.util.Map pExtraParameters)
          Price a List of items together in a context
 
Methods inherited from interface atg.commerce.pricing.PricingEngine
getPricingModels
 

Field Detail

CLASS_VERSION

static final java.lang.String CLASS_VERSION
Class version string

See Also:
Constant Field Values
Method Detail

priceItem

ItemPriceInfo priceItem(CommerceItem pItem,
                        java.util.Collection pPricingModels,
                        java.util.Locale pLocale,
                        RepositoryItem pProfile,
                        java.util.Map pExtraParameters)
                        throws PricingException
Price a single item in a context

Parameters:
pItem - The item to price
pPricingModels - A Collection of RepositoryItems representing PricingModels
pLocale - The Locale to use for pricing
pProfile - The user's profile
pExtraParameters - A Map of extra parameters to be used in the pricing, may be null
Returns:
ItemPriceInfo representing the price quote for the item
Throws:
PricingException

priceEachItem

java.util.List priceEachItem(java.util.List pItems,
                             java.util.Collection pPricingModels,
                             java.util.Locale pLocale,
                             RepositoryItem pProfile,
                             java.util.Map pExtraParameters)
                             throws PricingException
Price each of a List of items in a context

Parameters:
pItems - The items to price (individually)
pPricingModels - A Collection of RepositoryItems representing PricingModels
pLocale - The Locale to use for pricing
pProfile - The user's profile
pExtraParameters - A Map of extra parameters to be used in the pricing, may be null
Returns:
List of ItemPriceInfo objects representing the price quotes for each item
Throws:
PricingException

priceItems

java.util.List priceItems(java.util.List pItems,
                          java.util.Collection pPricingModels,
                          java.util.Locale pLocale,
                          RepositoryItem pProfile,
                          Order pOrder,
                          java.util.Map pExtraParameters)
                          throws PricingException
Price a List of items together in a context

Parameters:
pItems - The items to price
pPricingModels - A Collection of RepositoryItems representing PricingModels
pLocale - The Locale to use for pricing
pProfile - The user's profile
pOrder - The Order object of which the List of items are a part, may be null
pExtraParameters - A Map of extra parameters to be used in the pricing, may be null
Returns:
List of ItemPriceInfo objects representing the price quotes for the items
Throws:
PricingException