|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object atg.nucleus.logging.VariableArgumentApplicationLoggingImpl atg.nucleus.GenericService atg.commerce.pricing.Qualifier
public class Qualifier
A Helper class for discount calculators. Calculators call their helper method in this class to determine to which items they should apply their discount. As a side effect, the Qualifier also keeps track of which items acted as qualifiers for the input promotion, if applicable, and marks their priceInfos as appropriate.
By default, the Qualifier evaluates rules written in PMDL (Pricing Model Description Language). evaluateQualifier and evaluateTarget evaluate the qualfier and target elements of PMDL repspectively. The evaluateQualfier and evaluateTarget methods are protected and are available to be extended.
In all of the properties listed below, a value of true indicates that items with the specified attributes should be excluded from the qualification process.
Qualifier filters:
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string |
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 | |
---|---|
Qualifier()
|
Method Summary | |
---|---|
protected java.util.Map |
createPMDLBindings(java.util.List pItems,
RepositoryItem pProfile,
Order pOrder,
ShippingGroup pShippingGroup,
java.util.Locale pLocale,
java.util.Map pExtraParameters)
Create the map of bindings that are used during evaluation of the any PMDL This will make the following bindings: Constants.ITEMS_BINDING_NAME -> pItems Constants.PROFILE_BINDING_NAME -> pProfile Constants.ORDER_BINDING_NAME -> pOrder Constants.SHIPPING_GROUP_BINDING_NAME -> pShippingGroup Constants.LOCALE_BINDING_NAME -> pLocale |
void |
doStartService()
GenericService override |
protected java.lang.Object |
evaluateQualifier(java.util.List pPriceQuotes,
java.util.List pItems,
RepositoryItem pPricingModel,
RepositoryItem pProfile,
java.util.Locale pLocale,
Order pOrder,
OrderPriceInfo pOrderPriceInfo,
ShippingGroup pShippingGroup,
ShippingPriceInfo pShippingPriceInfo,
java.util.Map pExtraParameters)
evaluates the qualifier of a cached PMDL rule. |
protected java.lang.Object |
evaluateTarget(java.util.List pPriceQuotes,
java.util.List pItems,
RepositoryItem pPricingModel,
RepositoryItem pProfile,
java.util.Locale pLocale,
Order pOrder,
OrderPriceInfo pOrderPriceInfo,
ShippingGroup pShippingGroup,
ShippingPriceInfo pShippingPriceInfo,
java.util.Map pExtraParameters)
evaluates the target of a cached PMDL rule. |
protected void |
filterItemsForQualifier(java.util.List pPriceQuotes,
java.util.List pItems,
RepositoryItem pPricingModel,
RepositoryItem pProfile,
java.util.Locale pLocale,
Order pOrder,
OrderPriceInfo pOrderPriceInfo,
ShippingGroup pShippingGroup,
ShippingPriceInfo pShippingPriceInfo,
java.util.Map pExtraParameters,
java.util.Map pDetailsRangesToReceiveDiscount,
java.util.List pNewPriceInfos,
java.util.List pNewItems)
Filtering routine to remove quantities of the given items so that "iterator" rules can be accurately evaluated. |
protected void |
filterItemsForTarget(java.util.List pPriceQuotes,
java.util.List pItems,
RepositoryItem pPricingModel,
RepositoryItem pProfile,
java.util.Locale pLocale,
Order pOrder,
OrderPriceInfo pOrderPriceInfo,
ShippingGroup pShippingGroup,
ShippingPriceInfo pShippingPriceInfo,
java.util.Map pExtraParameters,
java.util.Map pDetailsPendingActingAsQualifier,
java.util.Map pDetailsRangesToReceiveDiscount,
java.util.List pNewPriceInfos,
java.util.List pNewItems)
Filtering routine to remove quantities of the given items so that iterator rules can be accurately evaluated. |
protected boolean |
filterShippingForTarget(java.util.List pPriceQuotes,
java.util.List pItems,
RepositoryItem pPricingModel,
RepositoryItem pProfile,
java.util.Locale pLocale,
Order pOrder,
OrderPriceInfo pOrderPriceInfo,
ShippingGroup pShippingGroup,
ShippingPriceInfo pShippingPriceInfo,
java.util.Map pExtraParameters)
Filtering routine that checks if the given shipping group is allowed to receive the given discount (pPricingModel). |
java.util.Collection |
findQualifyingItems(java.util.List pPriceQuotes,
java.util.List pItems,
RepositoryItem pPricingModel,
RepositoryItem pProfile,
java.util.Locale pLocale,
Order pOrder,
OrderPriceInfo pOrderPriceInfo,
ShippingGroup pShippingGroup,
ShippingPriceInfo pShippingPriceInfo,
java.util.Map pExtraParameters)
determines which items, if any, should receive a discount based on the given running environment. |
protected MatchingObject |
findQualifyingObjectNoTargetEvaluation(java.util.List pPriceQuotes,
java.util.List pItems,
RepositoryItem pPricingModel,
RepositoryItem pProfile,
java.util.Locale pLocale,
Order pOrder,
OrderPriceInfo pOrderPriceInfo,
ShippingGroup pShippingGroup,
ShippingPriceInfo pShippingPriceInfo,
java.util.Map pExtraParameters,
java.lang.Object pTarget)
This method is used by both findQualifyingOrder and findQualifyingShipping since they both use the same logic. |
MatchingObject |
findQualifyingOrder(java.util.List pPriceQuotes,
java.util.List pItems,
RepositoryItem pPricingModel,
RepositoryItem pProfile,
java.util.Locale pLocale,
Order pOrder,
OrderPriceInfo pOrderPriceInfo,
ShippingGroup pShippingGroup,
ShippingPriceInfo pShippingPriceInfo,
java.util.Map pExtraParameters)
determines whether an order should receive a discount based on the given running environment. |
MatchingObject |
findQualifyingShipping(java.util.List pPriceQuotes,
java.util.List pItems,
RepositoryItem pPricingModel,
RepositoryItem pProfile,
java.util.Locale pLocale,
Order pOrder,
OrderPriceInfo pOrderPriceInfo,
ShippingGroup pShippingGroup,
ShippingPriceInfo pShippingPriceInfo,
java.util.Map pExtraParameters)
determines whether a ShippingGroup should receive a discount based on the given running environment. |
java.lang.String |
getClosenessQualifierItemDescriptorName()
Returns a the name of the closenessQualifier item descriptor |
boolean |
getFilterForQualifierDiscountedByAnyDiscountId()
filter from the qualifier's pricing environment those items already discounted by any discount Id |
boolean |
getFilterForQualifierDiscountedByCurrentDiscountId()
filter from the qualifier's pricing environment those items already discounted by the current discount Id |
boolean |
getFilterForQualifierNegativePrices()
remove from the qualifier rule's pricing environment items whose price is negative |
boolean |
getFilterForQualifierOnSale()
remove from the qualifier rule's pricing environment items that were on sale |
boolean |
getFilterForQualifierZeroPrices()
remove from the qualifier rule's pricing environment items whose price is zero |
boolean |
getFilterForTargetActedAsQualifierForAnyDiscount()
remove from the target rule's pricing environment items who have acted as a target for any promotion |
boolean |
getFilterForTargetDiscountedByAnyDiscountId()
filter from the target's pricing environment those items already discounted by any discount Id |
boolean |
getFilterForTargetDiscountedByCurrentDiscountId()
filter from the target's pricing environment those items already discounted by the current discount Id |
boolean |
getFilterForTargetNegativePrices()
remove from the target rule's pricing environment items whose price is negative |
boolean |
getFilterForTargetOnSale()
remove from the target rule's pricing environment items that were on sale |
boolean |
getFilterForTargetPricesLessThanOrEqualToPromotionPrice()
remove from the target rule's pricing environment items whose price is already less or equal to the price it will be given by a "fixed price" promotion |
boolean |
getFilterForTargetZeroPrices()
remove from the target rule's pricing environment items whose price is zero |
Cache |
getPMDLCache()
Get property PMDLCache |
PricingModelProperties |
getPricingModelProperties()
Returns a bean that contains properties for a PricingModel |
Repository |
getPricingModelRepository()
Returns the repository that holds the pricing model information. |
boolean |
isExactlyPromotionLoopThrough()
If true, Exactly promotion will try to loop through all items in collecion. |
boolean |
isFilterForQualifierDiscountedByAnyDiscountId()
Test property FilterForQualifierDiscountedByAnyDiscountId |
boolean |
isFilterForQualifierDiscountedByCurrentDiscountId()
Test property FilterForQualifierDiscountedByCurrentDiscountId |
boolean |
isFilterForQualifierNegativePrices()
Test property FilterForQualifierNegativePrices |
boolean |
isFilterForQualifierOnSale()
Test property FilterForQualifierOnSale |
boolean |
isFilterForQualifierZeroPrices()
Test property FilterForQualifierZeroPrices |
boolean |
isFilterForTargetActedAsQualifierForAnyDiscount()
Test property FilterForTargetActedAsQualifierForAnyDiscount |
boolean |
isFilterForTargetDiscountedByAnyDiscountId()
Test property FilterForTargetDiscountedByAnyDiscountId |
boolean |
isFilterForTargetDiscountedByCurrentDiscountId()
Test property FilterForTargetDiscountedByCurrentDiscountId |
boolean |
isFilterForTargetNegativePrices()
Test property FilterForTargetNegativePrices |
boolean |
isFilterForTargetOnSale()
Test property FilterForTargetOnSale |
boolean |
isFilterForTargetPricesLessThanOrEqualToPromotionPrice()
Test property FilterForTargetPricesLessThanOrEqualToPromotionPrice |
boolean |
isFilterForTargetZeroPrices()
Test property FilterForTargetZeroPrices |
void |
setClosenessQualifierItemDescriptorName(java.lang.String pClosenessQualifierItemDescriptorName)
|
void |
setExactlyPromotionLoopThrough(boolean pExactlyPromotionLoopThrough)
|
void |
setFilterForQualifierDiscountedByAnyDiscountId(boolean pFilterForQualifierDiscountedByAnyDiscountId)
filter from the qualifier's pricing environment those items already discounted by the current discount Id |
void |
setFilterForQualifierDiscountedByCurrentDiscountId(boolean pFilterForQualifierDiscountedByCurrentDiscountId)
filter from the qualifier's pricing environment those items already discounted by the current discount Id |
void |
setFilterForQualifierNegativePrices(boolean pFilterForQualifierNegativePrices)
remove from the qualifier rule's pricing environment items whose price is negative |
void |
setFilterForQualifierOnSale(boolean pFilterForQualifierOnSale)
remove from the qualifier rule's pricing environment items that were on sale |
void |
setFilterForQualifierZeroPrices(boolean pFilterForQualifierZeroPrices)
remove from the qualifier rule's pricing environment items whose price is zero |
void |
setFilterForTargetActedAsQualifierForAnyDiscount(boolean pFilterForTargetActedAsQualifierForAnyDiscount)
remove from the target rule's pricing environment items who have acted as a target for any promotion |
void |
setFilterForTargetDiscountedByAnyDiscountId(boolean pFilterForTargetDiscountedByAnyDiscountId)
filter from the target's pricing environment those items already discounted by the current discount Id |
void |
setFilterForTargetDiscountedByCurrentDiscountId(boolean pFilterForTargetDiscountedByCurrentDiscountId)
filter from the target's pricing environment those items already discounted by the current discount Id |
void |
setFilterForTargetNegativePrices(boolean pFilterForTargetNegativePrices)
remove from the target rule's pricing environment items whose price is negative |
void |
setFilterForTargetOnSale(boolean pFilterForTargetOnSale)
remove from the target rule's pricing environment items that were on sale |
void |
setFilterForTargetPricesLessThanOrEqualToPromotionPrice(boolean pFilterForTargetPricesLessThanOrEqualToPromotionPrice)
remove from the target rule's pricing environment items whose price is already less or equal to the price it will be given by a "fixed price" promotion |
void |
setFilterForTargetZeroPrices(boolean pFilterForTargetZeroPrices)
remove from the target rule's pricing environment items whose price is zero |
void |
setPMDLCache(Cache pPMDLCache)
Set property PMDLCache |
void |
setPricingModelProperties(PricingModelProperties pPricingModelProperties)
|
void |
setPricingModelRepository(Repository pPricingModelRepository)
|
protected java.util.List |
wrapCommerceItems(java.util.List pItems,
java.util.List pPriceQuotes)
produce a list of FilteredCommerceItems from a list of CommerceItems |
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 final java.lang.String CLASS_VERSION
Constructor Detail |
---|
public Qualifier()
Method Detail |
---|
public void setPMDLCache(Cache pPMDLCache)
pPMDLCache
- new value to setpublic Cache getPMDLCache()
public void setPricingModelProperties(PricingModelProperties pPricingModelProperties)
public PricingModelProperties getPricingModelProperties()
public void setClosenessQualifierItemDescriptorName(java.lang.String pClosenessQualifierItemDescriptorName)
public java.lang.String getClosenessQualifierItemDescriptorName()
public void setPricingModelRepository(Repository pPricingModelRepository)
public Repository getPricingModelRepository()
public void setFilterForQualifierNegativePrices(boolean pFilterForQualifierNegativePrices)
pFilterForQualifierNegativePrices
- new value to setpublic boolean getFilterForQualifierNegativePrices()
public boolean isFilterForQualifierNegativePrices()
public void setFilterForQualifierZeroPrices(boolean pFilterForQualifierZeroPrices)
pFilterForQualifierZeroPrices
- new value to setpublic boolean getFilterForQualifierZeroPrices()
public boolean isFilterForQualifierZeroPrices()
public void setFilterForQualifierOnSale(boolean pFilterForQualifierOnSale)
pFilterForQualifierOnSale
- new value to setpublic boolean getFilterForQualifierOnSale()
public boolean isFilterForQualifierOnSale()
public void setFilterForQualifierDiscountedByCurrentDiscountId(boolean pFilterForQualifierDiscountedByCurrentDiscountId)
pFilterForQualifierDiscountedByCurrentDiscountId
- new value to setpublic boolean getFilterForQualifierDiscountedByCurrentDiscountId()
public boolean isFilterForQualifierDiscountedByCurrentDiscountId()
public void setFilterForQualifierDiscountedByAnyDiscountId(boolean pFilterForQualifierDiscountedByAnyDiscountId)
pFilterForQualifierDiscountedByAnyDiscountId
- new value to setpublic boolean getFilterForQualifierDiscountedByAnyDiscountId()
public boolean isFilterForQualifierDiscountedByAnyDiscountId()
public void setFilterForTargetNegativePrices(boolean pFilterForTargetNegativePrices)
pFilterForTargetNegativePrices
- new value to setpublic boolean getFilterForTargetNegativePrices()
public boolean isFilterForTargetNegativePrices()
public void setFilterForTargetZeroPrices(boolean pFilterForTargetZeroPrices)
pFilterForTargetZeroPrices
- new value to setpublic boolean getFilterForTargetZeroPrices()
public boolean isFilterForTargetZeroPrices()
public void setFilterForTargetPricesLessThanOrEqualToPromotionPrice(boolean pFilterForTargetPricesLessThanOrEqualToPromotionPrice)
pFilterForTargetPricesLessThanOrEqualToPromotionPrice
- new value to setpublic boolean getFilterForTargetPricesLessThanOrEqualToPromotionPrice()
public boolean isFilterForTargetPricesLessThanOrEqualToPromotionPrice()
public void setFilterForTargetOnSale(boolean pFilterForTargetOnSale)
pFilterForTargetOnSale
- new value to setpublic boolean getFilterForTargetOnSale()
public boolean isFilterForTargetOnSale()
public void setFilterForTargetDiscountedByCurrentDiscountId(boolean pFilterForTargetDiscountedByCurrentDiscountId)
pFilterForTargetDiscountedByCurrentDiscountId
- new value to setpublic boolean getFilterForTargetDiscountedByCurrentDiscountId()
public boolean isFilterForTargetDiscountedByCurrentDiscountId()
public void setFilterForTargetDiscountedByAnyDiscountId(boolean pFilterForTargetDiscountedByAnyDiscountId)
pFilterForTargetDiscountedByAnyDiscountId
- new value to setpublic boolean getFilterForTargetDiscountedByAnyDiscountId()
public boolean isFilterForTargetDiscountedByAnyDiscountId()
public void setFilterForTargetActedAsQualifierForAnyDiscount(boolean pFilterForTargetActedAsQualifierForAnyDiscount)
pFilterForTargetActedAsQualifierForAnyDiscount
- new value to setpublic boolean getFilterForTargetActedAsQualifierForAnyDiscount()
public boolean isFilterForTargetActedAsQualifierForAnyDiscount()
public MatchingObject findQualifyingOrder(java.util.List pPriceQuotes, java.util.List pItems, RepositoryItem pPricingModel, RepositoryItem pProfile, java.util.Locale pLocale, Order pOrder, OrderPriceInfo pOrderPriceInfo, ShippingGroup pShippingGroup, ShippingPriceInfo pShippingPriceInfo, java.util.Map pExtraParameters) throws PricingException
This method will call findQualifyingObjectNoTargetEvaluation
NOTE: because findQualifyingOrder needs to tinker with a CommerceItem's quantity,
input CommerceItems are wrapped inside FilteredCommerceItems. Any code which
extends Qualifier functionality can access the original input item at any time
by referencing the wrappedItem
property of the wrapper
FilteredCommerceItem.
pPriceQuotes
- a list of prices corresponding 1:1 to the entries in pItems.pItems
- a list of CommerceItems in the environment.pPricingModel
- the discount whose rule is being evaluatedpProfile
- the current profilepLocale
- the current localepOrder
- the current order, if anypOrderPriceInfo
- the price of the current order, if anypShippingGroup
- the current shipping group, if anypShippingPriceInfo
- the price of the current shipping group, if any.pExtraParameters
- any extra information that might need to be passed in.
PricingException
findQualifyingObjectNoTargetEvaluation(java.util.List, java.util.List, atg.repository.RepositoryItem, atg.repository.RepositoryItem, java.util.Locale, atg.commerce.order.Order, atg.commerce.pricing.OrderPriceInfo, atg.commerce.order.ShippingGroup, atg.commerce.pricing.ShippingPriceInfo, java.util.Map, java.lang.Object)
public MatchingObject findQualifyingShipping(java.util.List pPriceQuotes, java.util.List pItems, RepositoryItem pPricingModel, RepositoryItem pProfile, java.util.Locale pLocale, Order pOrder, OrderPriceInfo pOrderPriceInfo, ShippingGroup pShippingGroup, ShippingPriceInfo pShippingPriceInfo, java.util.Map pExtraParameters) throws PricingException
This method will first call filterShippingForTarget
. If that
returns true then, this method will call findQualifyingObjectNoTargetEvaluation
.
NOTE: because findQualifyingOrder needs to tinker with a CommerceItem's quantity,
input CommerceItems are wrapped inside FilteredCommerceItems. Any code which
extends Qualifier functionality can access the original input item at any time
by referencing the wrappedItem
property of the wrapper
FilteredCommerceItem.
pPriceQuotes
- a list of prices corresponding 1:1 to the entries in pItems.pItems
- a list of CommerceItems in the environment.pPricingModel
- the discount whose rule is being evaluatedpProfile
- the current profilepLocale
- the current localepOrder
- the current order, if anypOrderPriceInfo
- the price of the current order, if anypShippingGroup
- the current shipping group, if anypShippingPriceInfo
- the price of the current shipping group, if anypExtraParameters
- any extra information that might need to be passed in.
PricingException
findQualifyingObjectNoTargetEvaluation(java.util.List, java.util.List, atg.repository.RepositoryItem, atg.repository.RepositoryItem, java.util.Locale, atg.commerce.order.Order, atg.commerce.pricing.OrderPriceInfo, atg.commerce.order.ShippingGroup, atg.commerce.pricing.ShippingPriceInfo, java.util.Map, java.lang.Object)
public java.util.Collection findQualifyingItems(java.util.List pPriceQuotes, java.util.List pItems, RepositoryItem pPricingModel, RepositoryItem pProfile, java.util.Locale pLocale, Order pOrder, OrderPriceInfo pOrderPriceInfo, ShippingGroup pShippingGroup, ShippingPriceInfo pShippingPriceInfo, java.util.Map pExtraParameters) throws PricingException
This method will first call filterItemsForQualifier
to remove
items that should not be available while processing the PMDL rule. It will
then call evaluateQualifier
to see if the shipping group
qualifies for the given promotion (pPricingModel). It is possible evaluateQualifier
will be called more than once to see if the promotion is applicable more than
once.
NOTE: because findQualifyingOrder needs to tinker with a CommerceItem's quantity,
input CommerceItems are wrapped inside FilteredCommerceItems. Any code which
extends Qualifier functionality can access the original input item at any time
by referencing the wrappedItem
property of the wrapper
FilteredCommerceItem.
pPriceQuotes
- a list of prices corresponding 1:1 to the entries in pItems.pItems
- a list of CommerceItems in the environment.pPricingModel
- the discount whose rule is being evaluatedpProfile
- the current profilepLocale
- the current localepOrder
- the current order, if anypOrderPriceInfo
- the price of the current order, if anypShippingGroup
- the current shipping group, if anypShippingPriceInfo
- the price of the current shipping group, if anypExtraParameters
- any extra information that might need to be passed in.
PricingException
filterItemsForQualifier(java.util.List, java.util.List, atg.repository.RepositoryItem, atg.repository.RepositoryItem, java.util.Locale, atg.commerce.order.Order, atg.commerce.pricing.OrderPriceInfo, atg.commerce.order.ShippingGroup, atg.commerce.pricing.ShippingPriceInfo, java.util.Map, java.util.Map, java.util.List, java.util.List)
,
evaluateQualifier(java.util.List, java.util.List, atg.repository.RepositoryItem, atg.repository.RepositoryItem, java.util.Locale, atg.commerce.order.Order, atg.commerce.pricing.OrderPriceInfo, atg.commerce.order.ShippingGroup, atg.commerce.pricing.ShippingPriceInfo, java.util.Map)
,
evaluateTarget(java.util.List, java.util.List, atg.repository.RepositoryItem, atg.repository.RepositoryItem, java.util.Locale, atg.commerce.order.Order, atg.commerce.pricing.OrderPriceInfo, atg.commerce.order.ShippingGroup, atg.commerce.pricing.ShippingPriceInfo, java.util.Map)
protected MatchingObject findQualifyingObjectNoTargetEvaluation(java.util.List pPriceQuotes, java.util.List pItems, RepositoryItem pPricingModel, RepositoryItem pProfile, java.util.Locale pLocale, Order pOrder, OrderPriceInfo pOrderPriceInfo, ShippingGroup pShippingGroup, ShippingPriceInfo pShippingPriceInfo, java.util.Map pExtraParameters, java.lang.Object pTarget) throws PricingException
pTarget
. It assumes the necessary parameters are not null. (pOrder
if pTarget is an order, pShippingGroup if pTarget is a shipping group
This method will first call filterItemsForQualifier
to remove
items that should not be available while processing the PMDL rule. It will
then call evaluateQualifier
to see if the object
qualifies for the given promotion (pPricingModel). It is possible evaluateQualifier
will be called more than once to see if the promotion is applicable more than
once. This method will never call evaluateTarget
NOTE: because findQualifyingObject needs to tinker with a CommerceItem's quantity,
input CommerceItems are wrapped inside FilteredCommerceItems. Any code which
extends Qualifier functionality can access the original input item at any time
by referencing the wrappedItem
property of the wrapper
FilteredCommerceItem.
pPriceQuotes
- a list of prices corresponding 1:1 to the entries in pItems.pItems
- a list of CommerceItems in the environment.pPricingModel
- the discount whose rule is being evaluatedpProfile
- the current profilepLocale
- the current localepOrder
- the current order, if anypOrderPriceInfo
- the price of the current order, if anypShippingGroup
- the current shipping group, if anypShippingPriceInfo
- the price of the current shipping group, if any.pExtraParameters
- any extra information that might need to be passed in.pTarget
- The object that will be discounted if the pricing model is evaluated successfully
PricingException
filterItemsForQualifier(java.util.List, java.util.List, atg.repository.RepositoryItem, atg.repository.RepositoryItem, java.util.Locale, atg.commerce.order.Order, atg.commerce.pricing.OrderPriceInfo, atg.commerce.order.ShippingGroup, atg.commerce.pricing.ShippingPriceInfo, java.util.Map, java.util.Map, java.util.List, java.util.List)
,
evaluateQualifier(java.util.List, java.util.List, atg.repository.RepositoryItem, atg.repository.RepositoryItem, java.util.Locale, atg.commerce.order.Order, atg.commerce.pricing.OrderPriceInfo, atg.commerce.order.ShippingGroup, atg.commerce.pricing.ShippingPriceInfo, java.util.Map)
protected java.lang.Object evaluateQualifier(java.util.List pPriceQuotes, java.util.List pItems, RepositoryItem pPricingModel, RepositoryItem pProfile, java.util.Locale pLocale, Order pOrder, OrderPriceInfo pOrderPriceInfo, ShippingGroup pShippingGroup, ShippingPriceInfo pShippingPriceInfo, java.util.Map pExtraParameters) throws PricingException
We then get the appropriate pricing model from the pricing model cache.
Next, it remembers the original price info values. These price infos may be manipulated during the coures of evaluation. We need to make sure they get reset to the proper values.
Next, call createPMDLBindings
evaluate the target
Restore the price infos
return the result. If there's a current working price associated with one of these items, the working price becomes the current price.
pPriceQuotes
- a list of prices corresponding 1:1 to the entries in pItems.pItems
- a list of CommerceItems in the environment.pPricingModel
- the discount whose rule is being evaluatedpProfile
- the current profilepLocale
- the current localepOrder
- the current order, if anypOrderPriceInfo
- the price of the current order, if anypShippingGroup
- the current shipping group, if anypShippingPriceInfo
- the price of the current shipping group, if anypExtraParameters
- any extra information that might need to be passed in.
MatchingObjects
PricingException
validateEvaluationParams(java.util.List, java.util.List, atg.repository.RepositoryItem, atg.repository.RepositoryItem, java.util.Locale, atg.commerce.order.Order, atg.commerce.pricing.OrderPriceInfo, atg.commerce.order.ShippingGroup, atg.commerce.pricing.ShippingPriceInfo, java.util.Map)
,
createPMDLBindings(java.util.List, atg.repository.RepositoryItem, atg.commerce.order.Order, atg.commerce.order.ShippingGroup, java.util.Locale, java.util.Map)
,
atg.commerce.pricing.PMDLCache
,
MatchingObject
protected java.lang.Object evaluateTarget(java.util.List pPriceQuotes, java.util.List pItems, RepositoryItem pPricingModel, RepositoryItem pProfile, java.util.Locale pLocale, Order pOrder, OrderPriceInfo pOrderPriceInfo, ShippingGroup pShippingGroup, ShippingPriceInfo pShippingPriceInfo, java.util.Map pExtraParameters) throws PricingException
We then get the appropriate pricing model from the pricing model cache.
Next, it remembers the remembers the original price info values. These price infos may be manipulated during the coures of evaluation. We need to make sure they get reset to the proper values.
Next, call createPMDLBindings
evaluate the target
Restore the price infos
return the result. If there's a current working price associated with one of these items, the working price becomes the current price.
pPriceQuotes
- a list of prices corresponding 1:1 to the entries in pItems.pItems
- a list of CommerceItems in the environment.pPricingModel
- the discount whose rule is being evaluatedpProfile
- the current profilepLocale
- the current localepOrder
- the current order, if anypOrderPriceInfo
- the price of the current order, if anypShippingGroup
- the current shipping group, if anypShippingPriceInfo
- the price of the current shipping group, if anypExtraParameters
- any extra information that might need to be passed in.
MatchingObjects
PricingException
validateEvaluationParams(java.util.List, java.util.List, atg.repository.RepositoryItem, atg.repository.RepositoryItem, java.util.Locale, atg.commerce.order.Order, atg.commerce.pricing.OrderPriceInfo, atg.commerce.order.ShippingGroup, atg.commerce.pricing.ShippingPriceInfo, java.util.Map)
,
createPMDLBindings(java.util.List, atg.repository.RepositoryItem, atg.commerce.order.Order, atg.commerce.order.ShippingGroup, java.util.Locale, java.util.Map)
,
atg.commerce.pricing.PMDLCache
,
MatchingObject
protected java.util.List wrapCommerceItems(java.util.List pItems, java.util.List pPriceQuotes)
pItems
- A list of CommerceItemspPriceQuotes
- The prices of the commerce items
protected java.util.Map createPMDLBindings(java.util.List pItems, RepositoryItem pProfile, Order pOrder, ShippingGroup pShippingGroup, java.util.Locale pLocale, java.util.Map pExtraParameters)
pItems
- The list of items available to the rulepProfile
- The users profilepOrder
- The order that the rule applies to, if applicablepShippingGroup
- The shipping group the rule applies to, if applicablepLocale
- The locale that this pricing operation is forpExtraParameters
- A Map of extra parameters. This is currently ignored.
protected void filterItemsForQualifier(java.util.List pPriceQuotes, java.util.List pItems, RepositoryItem pPricingModel, RepositoryItem pProfile, java.util.Locale pLocale, Order pOrder, OrderPriceInfo pOrderPriceInfo, ShippingGroup pShippingGroup, ShippingPriceInfo pShippingPriceInfo, java.util.Map pExtraParameters, java.util.Map pDetailsRangesToReceiveDiscount, java.util.List pNewPriceInfos, java.util.List pNewItems) throws PricingException
The filtering criteria are configured via the "filter" properties of this class.
See class-level javadoc for description of filter properties. This method
uses filters with names of the type filterForQualifier...
The output params pNewPriceInfos and pNewItems are initialized and returned containing the filtered quantities and price infos
pPriceQuotes
- a list of prices corresponding 1:1 to the entries in pItems.pItems
- a list of CommerceItems in the environment.pPricingModel
- the discount whose rule is being evaluatedpProfile
- the profile of the current userpLocale
- the locale of the current pricingpOrder
- the current order being pricedpOrderPriceInfo
- the price info of the order currently being pricedpShippingGroup
- the shipping group currently being pricedpShippingPriceInfo
- the price info of the shipping group currently being priced.pExtraParameters
- any extra info needed to filter items for the qualifierpDetailsRangesToReceiveDiscount
- the Ranges of various DetailedItemPriceInfos
that are going to receive the discountpNewPriceInfos
- output parameter which represents the ItemPriceInfos of the
items that have not been weeded out by the filter.pNewItems
- output param which represents the CommerceItems not weeded out
by the filter.
PricingException
- if items can't be filtered from the input environmentprotected void filterItemsForTarget(java.util.List pPriceQuotes, java.util.List pItems, RepositoryItem pPricingModel, RepositoryItem pProfile, java.util.Locale pLocale, Order pOrder, OrderPriceInfo pOrderPriceInfo, ShippingGroup pShippingGroup, ShippingPriceInfo pShippingPriceInfo, java.util.Map pExtraParameters, java.util.Map pDetailsPendingActingAsQualifier, java.util.Map pDetailsRangesToReceiveDiscount, java.util.List pNewPriceInfos, java.util.List pNewItems) throws PricingException
The filtering criteria are configured via the "filter" properties of this class.
See class-level javadoc for description of filter properties. This method
uses filters with names of the type filterForTarget...
pPriceQuotes
- a list of prices corresponding 1:1 to the entries in pItems.pItems
- a list of CommerceItems in the environment.pPricingModel
- the discount whose rule is being evaluatedpProfile
- the profile of the current userpLocale
- the locale of the current pricingpOrder
- the current order being pricedpOrderPriceInfo
- the price info of the order currently being pricedpShippingGroup
- the shipping group currently being pricedpShippingPriceInfo
- the price info of the shipping group currently being priced.pExtraParameters
- any extra info needed to filter items for the qualifierpDetailsRangesToReceiveDiscount
- the Ranges of various DetailedItemPriceInfos
that are going to receive the discountpNewPriceInfos
- output parameter which represents the ItemPriceInfos of the
items that have not been weeded out by the filter.pNewItems
- output param which represents the CommerceItems not weeded out
by the filter.
PricingException
- if items can't be filtered from the input environmentprotected boolean filterShippingForTarget(java.util.List pPriceQuotes, java.util.List pItems, RepositoryItem pPricingModel, RepositoryItem pProfile, java.util.Locale pLocale, Order pOrder, OrderPriceInfo pOrderPriceInfo, ShippingGroup pShippingGroup, ShippingPriceInfo pShippingPriceInfo, java.util.Map pExtraParameters) throws PricingException
pPriceQuotes
- a list of prices corresponding 1:1 to the entries in pItems.pItems
- a list of CommerceItems in the environment.pPricingModel
- the discount whose rule is being evaluatedpProfile
- the current profilepLocale
- the current localepOrder
- the current order, if anypOrderPriceInfo
- the price of the current order, if anypShippingGroup
- the current shipping group, if anypShippingPriceInfo
- the price of the current shipping group, if anypExtraParameters
- any extra information that might need to be passed in.
PricingException
public void doStartService() throws ServiceException
doStartService
in class GenericService
ServiceException
- if the Service had a problem starting uppublic void setExactlyPromotionLoopThrough(boolean pExactlyPromotionLoopThrough)
public boolean isExactlyPromotionLoopThrough()
default value is true
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |