| 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectatg.nucleus.logging.VariableArgumentApplicationLoggingImpl
atg.nucleus.GenericService
atg.commerce.pricing.PricingEngineService
atg.commerce.pricing.ShippingPricingEngineImpl
public class ShippingPricingEngineImpl
A ShippingPricingEngine implementation which computes the shipping price for an order. It accomplishes this task by invoking a series of ShippingPricingCalculators which incrementally compute the tax price:
Properties:
ShippingPriceInfo, 
ShippingPricingCalculator| Field Summary | |
|---|---|
static java.lang.String | 
CLASS_VERSION
Class version string  | 
| Fields inherited from class atg.commerce.pricing.PricingEngineService | 
|---|
mGlobalPromotions | 
| Fields inherited from class atg.nucleus.GenericService | 
|---|
SERVICE_INFO_KEY | 
| Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging | 
|---|
DEFAULT_LOG_TRACE_STATUS | 
| Fields inherited from interface atg.nucleus.logging.ApplicationLogging | 
|---|
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS | 
| Constructor Summary | |
|---|---|
ShippingPricingEngineImpl()
 | 
|
| Method Summary | |
|---|---|
 void | 
checkPromotionsForCloseness(ShippingPriceInfo pPriceInfo,
                            ShippingGroup pShippingGroup,
                            java.util.Collection pPricingModels,
                            java.util.Locale pLocale,
                            RepositoryItem pProfile,
                            Order pOrder,
                            java.util.Map pExtraParameters)
Check to see if the shipping group qualifies under any of the pricingModels' "closenessQualifiers".  | 
 java.util.List | 
getAvailableMethods(ShippingGroup pShipment,
                    java.util.Collection pPricingModels,
                    java.util.Locale pLocale,
                    RepositoryItem pProfile,
                    java.util.Map pExtraParameters)
Get shipping methods available to deliver the shipping group.  | 
protected  java.lang.String | 
getCurrencyCode(ShippingGroup pShipment,
                java.util.Collection pPricingModels,
                java.util.Locale pLocale,
                RepositoryItem pProfile,
                java.util.Map pExtraParameters)
Return the currency code that should be used in the context of this pricing request  | 
 ShippingPricingCalculator[] | 
getPostCalculators()
Gets the PricingCalculators which are run after any discounts are applied  | 
 ShippingPricingCalculator[] | 
getPreCalculators()
Gets the PricingCalculators which are run before any discounts are applied  | 
 java.util.Collection | 
getPricingModels(RepositoryItem pProfile)
Returns a List of pricing models (e.g.  | 
 boolean | 
isIgnoreEmptyShippingGroups()
If this is true, then empty shipping groups are given a price of zero.  | 
 boolean | 
isShippingGroupEmpty(ShippingGroup pShippingGroup)
Return true if the given shipping group is null or empty  | 
 ShippingPriceInfo | 
priceShippingGroup(Order pOrder,
                   ShippingGroup pShipment,
                   java.util.Collection pPricingModels,
                   java.util.Locale pLocale,
                   RepositoryItem pProfile,
                   java.util.Map pExtraParameters)
Price a shipment within a context.  | 
 void | 
setIgnoreEmptyShippingGroups(boolean pIgnoreEmptyShippingGroups)
 | 
 void | 
setPostCalculators(ShippingPricingCalculator[] pPostCalculators)
Sets the PricingCalculators which are run after any discounts are applied  | 
 void | 
setPreCalculators(ShippingPricingCalculator[] pPreCalculators)
Sets the PricingCalculators which are run before any discounts are applied  | 
| Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl | 
|---|
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
public static java.lang.String CLASS_VERSION
| Constructor Detail | 
|---|
public ShippingPricingEngineImpl()
| Method Detail | 
|---|
public void setIgnoreEmptyShippingGroups(boolean pIgnoreEmptyShippingGroups)
public boolean isIgnoreEmptyShippingGroups()
public void setPreCalculators(ShippingPricingCalculator[] pPreCalculators)
public ShippingPricingCalculator[] getPreCalculators()
public void setPostCalculators(ShippingPricingCalculator[] pPostCalculators)
public ShippingPricingCalculator[] getPostCalculators()
public java.util.Collection getPricingModels(RepositoryItem pProfile)
getPricingModels in interface PricingEnginepProfile - The user's profile from which the engine will extract promotions
protected java.lang.String getCurrencyCode(ShippingGroup pShipment,
                                           java.util.Collection pPricingModels,
                                           java.util.Locale pLocale,
                                           RepositoryItem pProfile,
                                           java.util.Map pExtraParameters)
                                    throws PricingException
PricingException - if an error occurs while attempting to determine the currency code
public ShippingPriceInfo priceShippingGroup(Order pOrder,
                                            ShippingGroup pShipment,
                                            java.util.Collection pPricingModels,
                                            java.util.Locale pLocale,
                                            RepositoryItem pProfile,
                                            java.util.Map pExtraParameters)
                                     throws PricingException
priceShippingGroup in interface ShippingPricingEnginepOrder - the Order in the context of which pShipment is being priced.pShipment - The shipment to pricepPricingModels - A Collection of RepositoryItems representing PricingModelspLocale - The Locale to use for pricingpProfile - The user's profilepExtraParameters - A Map of extra parameters to be used in the pricing, may be null
PricingException - if an error occurs while attempting to price
public java.util.List getAvailableMethods(ShippingGroup pShipment,
                                          java.util.Collection pPricingModels,
                                          java.util.Locale pLocale,
                                          RepositoryItem pProfile,
                                          java.util.Map pExtraParameters)
                                   throws PricingException
getAvailableMethods in interface ShippingPricingEnginepShipment - The shipping group to deliverpPricingModels - A Collection of RepositoryItems representing PricingModelspLocale - The Locale to use for determining available shipping methodspProfile - The user's profilepExtraParameters - A Map of extra parameters to be used in the pricing, may be null
PricingException - if an error occurs while attempting to pricepublic boolean isShippingGroupEmpty(ShippingGroup pShippingGroup)
public void checkPromotionsForCloseness(ShippingPriceInfo pPriceInfo,
                                        ShippingGroup pShippingGroup,
                                        java.util.Collection pPricingModels,
                                        java.util.Locale pLocale,
                                        RepositoryItem pProfile,
                                        Order pOrder,
                                        java.util.Map pExtraParameters)
                                 throws PricingException
pPriceInfo - The ShippingPriceInfo object associated with the shipping
        group.pShippingGroup - The shipping group to checkpPricingModels - A Collection of RepositoryItems representing PricingModelspLocale - The Locale to use for pricingpProfile - The user's profilepOrder - The order the shipping group belongs topExtraParameters - A Map of extra parameters to be used in the pricing, may be null
PricingException
  | 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||