public class ShippingPricingEngineImpl extends PricingEngineService implements ShippingPricingEngine
Properties:
ShippingPriceInfo,
ShippingPricingCalculatorPricingEngineService.EmptyItemPriceInfo| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CLASS_VERSION
Class version string
|
ERR_CANNOT_CREATE_VETO_PROMOTION_ANALYSIS_MESSAGE, EXTRA_PARAM_QUALIFIERSERVICE, mGlobalPromotions, mPricingCalculatorServicesSERVICE_INFO_KEYDEFAULT_LOG_TRACE_STATUSDEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS| Constructor and Description |
|---|
ShippingPricingEngineImpl() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
applyCalculator(java.lang.Object pCalc,
ShippingPriceInfo pShippingPriceQuote,
ShippingGroup pShippingGroup,
PricingContext pPricingContext,
java.util.Map pExtraParameters)
Calls the supplied calculator service to price a ShippingGroup.
|
protected java.util.Collection<RepositoryItem> |
applyPromotions(java.util.Collection pPricingModels,
ShippingPriceInfo pShippingPriceQuote,
ShippingGroup pShippingGroup,
PricingContext pPricingContext,
java.util.Map pExtraParameters)
Apply the pricing models (promotions) to the object being priced.
|
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".
|
protected boolean |
didPromotionQualify(RepositoryItem pPricingModel,
PricingContext pPricingContext,
java.util.Map pExtraParameters)
Determines if a promotion qualified or not.
|
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
|
atg.commerce.pricing.PromotionProcessingComponent[] |
getPrePromotionProcessing()
Returns property PrePromotionProcessing
|
protected java.util.List<AmountInfo> |
getPriceInfoDetails(PricingContext pPricingContext,
java.util.Map pExtraParameters)
Returns price info details for each shipping group.
|
java.util.Collection |
getPricingModels(RepositoryItem pProfile)
Returns a List of pricing models (e.g.
|
protected java.lang.String |
getStackingRuleOrderLimitReachedMessageIdentifier()
Value for stacking rule order limit reached message identifier.
|
protected java.lang.String |
getStackingRulePromotionExcludedMessageIdentifier()
Value for stacking rule promotion excluded message identifier.
|
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
|
void |
setPrePromotionProcessing(atg.commerce.pricing.PromotionProcessingComponent[] pPrePromotionProcessing)
Sets property PrePromotionProcessing
|
addPromotion, addPromotionToList, applyPromotionProcessing, checkAndAddPromotions, checkAndMergePromotions, checkPromotionExpiration, createEmptyItemPriceInfo, createMaxCouponsPerOrderLimitExclusionMessage, createPriceInfo, createStackingRuleExclusionMessage, createVetoPromotionMessage, didPromotionApply, doStartService, doStopService, expirePromotion, findGlobalPromotions, generateMaxCouponsPerOrderInfo, generateStackingRuleInfo, getAdjustmentPricingModels, getAlwaysLoadGlobalPromotions, getAppliedPromotions, getCalculator, getCalculatorForCalculatorType, getCalculatorTypeCalculators, getCalculatorTypes, getClosenessQualifierEvaluator, getCurrencyCode, getDefaultLocale, getGlobalPromotions, getGlobalPromotionsQuery, getGlobalPromotionsSchedulableDate, getInitialPromotions, getLocale, getMaxNoOfCouponsPerOrderLimitReachedMessageIdentifier, getPriceInfoClass, getPricingCurrencyCode, getPricingModelComparator, getPricingModelEvaluationVetoers, getPricingModelHolderVetoers, getPricingModelProperties, getPricingTools, getProfileProperties, getPromotionItemDescriptors, getPromotionItemTypes, getPromotions, getPromotionsRepository, getPromotionTools, getQualifierService, getQualifierService, getQualifierService, getScheduler, getUpdateSchedule, getUserOnlyPromotions, isPromotionLinkedToCoupon, isUseMerge, isValidItemDescriptor, loadGlobalPromotions, performScheduledTask, prepareEvaluationVetoers, prepareHolderVetoers, pricingComplete, pricingStart, processCQPromotionAnalysisInformation, processDidPromotionApply, processDidPromotionApply, removeExpiredPromotions, resetEmptyItemPriceInfos, resolveCalculator, setAlwaysLoadGlobalPromotions, setCalculatorTypeCalculators, setClosenessQualifierEvaluator, setDefaultLocale, setGlobalPromotionsQuery, setGlobalPromotionsSchedulableDate, setPriceInfoClass, setPricingModelComparator, setPricingModelEvaluationVetoers, setPricingModelHolderVetoers, setPricingModelProperties, setPricingTools, setProfileProperties, setPromotionItemTypes, setPromotionsRepository, setPromotionTools, setQualifierService, setScheduler, setUpdateSchedule, setupMaxCouponsPerOrderCollection, setupStackingRuleCollections, setUseMerge, skipPromotion, skipPromotion, updateMaxCouponsPerOrderTracking, updateStackingRuleTracking, vetoPromotionsForEvaluation, wasPromotionSkipped, wasPromotionSkippedaddLogListener, createAdminServlet, getAbsoluteName, getAdminServlet, getAdminServletOutputStreamEncoding, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isAdminServletUseServletOutputStream, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, reResolveThis, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setAdminServletOutputStreamEncoding, setAdminServletUseServletOutputStream, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopServicevlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarningpublic void setIgnoreEmptyShippingGroups(boolean pIgnoreEmptyShippingGroups)
public boolean isIgnoreEmptyShippingGroups()
public void setPreCalculators(ShippingPricingCalculator[] pPreCalculators)
public ShippingPricingCalculator[] getPreCalculators()
public void setPrePromotionProcessing(atg.commerce.pricing.PromotionProcessingComponent[] pPrePromotionProcessing)
public atg.commerce.pricing.PromotionProcessingComponent[] getPrePromotionProcessing()
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 promotionsprotected 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 codepublic 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 nullPricingException - if an error occurs while attempting to priceprotected java.util.Collection<RepositoryItem> applyPromotions(java.util.Collection pPricingModels, ShippingPriceInfo pShippingPriceQuote, ShippingGroup pShippingGroup, PricingContext pPricingContext, java.util.Map pExtraParameters) throws PricingException
pPricingModels - Collection of PricingModel items to applypShippingPriceQuote - ShippingPriceInfo for the ShippingGroup being pricedpShippingGroup - ShippingGroup being pricedpPricingContext - PricingContextpExtraParameters - Map of extra parameters, may be nullPricingExceptionprotected void applyCalculator(java.lang.Object pCalc,
ShippingPriceInfo pShippingPriceQuote,
ShippingGroup pShippingGroup,
PricingContext pPricingContext,
java.util.Map pExtraParameters)
throws PricingException
pCalc - ShippingPricingCalculator to callpShippingPriceQuote - ShippingPriceInfo for the ShippingGroup being pricedpShippingGroup - ShippingGroup being pricedpPricingContext - PricingContextpExtraParameters - Map of extra parametersPricingExceptionpublic 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 nullPricingException - 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 nullPricingException - if a problem occurred when checking for closenessprotected boolean didPromotionQualify(RepositoryItem pPricingModel, PricingContext pPricingContext, java.util.Map pExtraParameters) throws PricingException
true if the promotion qualified,
false otherwise.didPromotionQualify in class PricingEngineServicepPricingModel - promotion to checkpPricingContext - PricingContextpExtraParameters - Map of extra parameters, may be nulltrue if the promotion qualified, false otherwisePricingException - if something went wrongprotected java.util.List<AmountInfo> getPriceInfoDetails(PricingContext pPricingContext, java.util.Map pExtraParameters)
getPriceInfoDetails in class PricingEngineServicepPricingContext - PricingContextpExtraParameters - Map of extra parameters, may be nullprotected java.lang.String getStackingRuleOrderLimitReachedMessageIdentifier()
getStackingRuleOrderLimitReachedMessageIdentifier in class PricingEngineServiceprotected java.lang.String getStackingRulePromotionExcludedMessageIdentifier()
getStackingRulePromotionExcludedMessageIdentifier in class PricingEngineService