atg.commerce.pricing.PricingEngine is the main interface for interacting with the atg.commerce.pricing package. Extensions of this interface describe objects that calculate a price for a specific class of object. For example, OrderPricingEngine extends PricingEngine and calculates prices for orders passed to it.

All PricingEngine implementations process promotions. The PricingEngine interface itself contains only one method, getPricingModels, which extracts a collection of promotions from an input profile.

The PricingEngine interface itself does not describe any functionality other than the promotion extraction API because of the wide range of information that different PricingEngine implementations might require to calculate a price for their specific class of object. For example, the ItemPricingEngine implementation needs one set of input parameters, while the OrderPricingEngine needs a different set.

The individual extensions of the PricingEngine interface contain the API methods for generating a given type of price. There is a Java object type for each type of price that is generated. For example, atg.commerce.pricing.OrderPricingEngine inherits the promotion extraction API from PricingEngine and defines one new method, priceOrder, to generate a price for an order in a given context.

The pricing context is defined by the method’s input parameters. It varies among PricingEngine extensions, but typically it includes the following:

Extending the Base Pricing Engine

For all extensions of the PricingEngine, follow the same basic procedure:

ATG Commerce Extensions of the PricingEngine

ATG Commerce provides the following four extensions of the main PricingEngine interface:

These interfaces are described in the next section, Pricing Interfaces.

loading table of contents...