|
|||||||||
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 qualifier and target elements of PMDL respectively. 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 DiscountStructure |
checkTargetPricesLessThanOrEqualToPromotionPrice(java.util.List<DiscountStructure> pDiscountStructures)
Utility method to decide if we need to check items for filtering against prices less than or equal to the promotion price. |
protected java.util.Map |
createPMDLBindings(java.util.List pItems,
RepositoryItem pProfile,
Order pOrder,
ShippingGroup pShippingGroup,
java.util.Locale pLocale,
java.util.Map pExtraParametersMap)
Deprecated. replaced by createPMDLBindings(PromotionQualifyingDetails) |
protected java.util.Map |
createPMDLBindings(PricingContext pPricingContext,
java.util.Map pExtraParametersMap,
java.util.List pFilteredItems)
Create the map of bindings that are used during evaluation of the any PMDL This will make the following bindings: ITEMS_BINDING_NAME -> pItems PROFILE_BINDING_NAME -> pProfile ORDER_BINDING_NAME -> pOrder SHIPPING_GROUP_BINDING_NAME -> pShippingGroup LOCALE_BINDING_NAME -> pLocale |
protected void |
doFilters(int pFilterContext,
PricingContext pPricingContext,
java.util.Map pExtraParametersMap,
java.util.Map pDetailsPendingActingAsQualifier,
java.util.Map pDetailsRangesToReceiveDiscount,
java.util.List pFilteredItems)
Loops through the configured filters to allow them to filter out items for the rule evaluations. |
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 pExtraParametersMap)
Deprecated. replaced by evaluateQualifier(PricingContext, Map, List) |
protected java.lang.Object |
evaluateQualifier(PricingContext pPricingContext,
java.util.Map pExtraParametersMap,
java.util.List pFilteredQualifierItems)
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 pExtraParametersMap)
Deprecated. replaced by evaluateTarget(PricingContext, Map, List) |
protected java.lang.Object |
evaluateTarget(PricingContext pPricingContext,
java.util.Map pExtraParametersMap,
java.util.List pFilteredTargetItems)
evaluates the target of a cached PMDL rule. |
protected FilteredCommerceItem |
filterItemByPrice(FilteredCommerceItem pItem,
DiscountStructure pDiscountStructure)
This method will check if any of the given filtered commerce item should be filtered out because it's unit price is less than the fixed price discount. |
void |
filterItems(int pFilterContext,
PricingContext pPricingContext,
java.util.Map pExtraParametersMap,
java.util.Map pDetailsPendingActingAsQualifier,
java.util.Map pDetailsRangesToReceiveDiscount,
java.util.List pFilteredItems)
Implementations should populate the filteredItems list with the appropriate items for the given filterContext. |
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 pExtraParametersMap,
java.util.Map pDetailsRangesToReceiveDiscount,
java.util.List pNewPriceInfos,
java.util.List pNewItems)
Deprecated. replaced by filterItemsForQualifier(PricingContext, Map, Map, List) |
protected void |
filterItemsForQualifier(PricingContext pPricingContext,
java.util.Map pExtraParametersMap,
java.util.Map pDetailsRangesToReceiveDiscount,
java.util.List pFilteredQualifierItems)
Filtering routine to remove quantities of the given items so that qualifier condition 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 pExtraParametersMap,
java.util.Map pDetailsPendingActingAsQualifier,
java.util.Map pDetailsRangesToReceiveDiscount,
java.util.List pNewPriceInfos,
java.util.List pNewItems)
Deprecated. As of ATG10, replaced by filterItemsForTarget(PromotionQualifyingDetails,Map,Map,List) . |
protected void |
filterItemsForTarget(PricingContext pPricingContext,
java.util.Map pExtraParametersMap,
java.util.Map pDetailsPendingActingAsQualifier,
java.util.Map pDetailsRangesToReceiveDiscount,
java.util.List pFilteredTargetItems)
Filtering routine to remove quantities of the given items so that target offer 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 pExtraParametersMap)
Deprecated. replaced by filterShippingForTarget(PricingContext,Map) |
protected boolean |
filterShippingForTarget(PricingContext pPricingContext,
java.util.Map pExtraParametersMap)
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 pExtraParametersMap)
Deprecated. replaced by findQualifyingItems(PricingContext, Map) |
java.util.Collection |
findQualifyingItems(PricingContext pPricingContext,
java.util.Map pExtraParametersMap)
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 pExtraParametersMap,
java.lang.Object pTarget)
Deprecated. replaced by findQualifyingObjectNoTargetEvaluation(PricingContext, Map, Object) |
protected MatchingObject |
findQualifyingObjectNoTargetEvaluation(PricingContext pPricingContext,
java.util.Map pExtraParametersMap,
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 pExtraParametersMap)
Deprecated. replaced by findQualifyingOrder(PricingContext, Map) |
MatchingObject |
findQualifyingOrder(PricingContext pPricingContext,
java.util.Map pExtraParametersMap)
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 pExtraParametersMap)
Deprecated. replaced by findQualifyingShipping(PricingContext, Map) |
MatchingObject |
findQualifyingShipping(PricingContext pPricingContext,
java.util.Map pExtraParametersMap)
determines whether a ShippingGroup should receive a discount based on the given running environment. |
AggregatorManager |
getAggregatorManager()
Returns the aggregation manager. |
int |
getCallingContext()
Get property CallingContext |
java.lang.String |
getClosenessQualifierItemDescriptorName()
Returns a the name of the closenessQualifier item descriptor |
java.lang.String |
getDetailSortOrder()
Getter for the detailSortOrder property, which is the order in which to order DIPI objects |
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 |
PromotionQualifyingFilter[] |
getFilters()
Returns property Filters |
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. |
PricingTools |
getPricingTools()
Returns PricingTools |
PromotionTools |
getPromotionTools()
Returns PromotionTools |
protected boolean |
isClosenessQualifier(RepositoryItem pPricingModel)
Method checks if the pricing model is a closeness qualifier. |
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 |
protected void |
markQualifierItems(java.util.List pItemsFromQualifier,
java.util.Map pItemsPendingActingAsQualifier)
This method marks the matching objects that were returned by the evaluateQualifier method as having acted as qualifiers during this iteration. |
protected atg.commerce.pricing.Qualifier.ProcessReturn |
processQualifier(PricingContext pPricingContext,
java.util.Map pExtraParametersMap,
java.util.Map pDetailsPendingActingAsQualifier,
java.util.Map pDetailsTaggedToReceiveDiscount,
java.util.Map pOriginalItemQuantities)
Carry out a call to evaluateQualifier and process the return. |
protected atg.commerce.pricing.Qualifier.ProcessReturn |
processTarget(java.lang.Object pTargetRet,
PricingContext pPricingContext,
java.util.Map pExtraParametersMap,
java.util.Collection<QualifiedItem> pQualifiedItems,
java.util.Map<java.lang.String,java.util.Map<java.lang.String,QualifiedItem>> pQualifiedItemsDetails,
java.util.Map pDetailsTaggedToReceiveDiscount)
Processes the return from a call to evaluateTarget. |
void |
setAggregatorManager(AggregatorManager pAggregatorManager)
|
void |
setCallingContext(int pCallingContext)
Set property CallingContext |
void |
setClosenessQualifierItemDescriptorName(java.lang.String pClosenessQualifierItemDescriptorName)
|
void |
setDetailSortOrder(java.lang.String pDetailSortOrder)
|
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 |
setFilters(PromotionQualifyingFilter[] pFilters)
Sets property Filters |
void |
setPMDLCache(Cache pPMDLCache)
Set property PMDLCache |
void |
setPricingModelProperties(PricingModelProperties pPricingModelProperties)
|
void |
setPricingModelRepository(Repository pPricingModelRepository)
|
void |
setPricingTools(PricingTools pPricingTools)
Sets PricingTools |
void |
setPromotionTools(PromotionTools pPromotionTools)
Sets PromotionTools |
protected java.util.Map |
tagDetailsAsDiscounted(ItemPriceInfo pItemPrice,
FilteredCommerceItem pItem,
long pMatchingQuantity,
QualifiedItem pQualifiedItem,
java.util.Map pDetailsTaggedToReceiveDiscount)
This method will cycle through the qualified item targeted by the pricing model and marks the correct details as discounted. |
protected void |
tagTargetItems(java.lang.Object pTargetEvalValue,
java.util.Map pDetailsTaggedToReceiveDiscount)
Tag the the items returned from the target evaluation by marking them in the pDetailsTaggedToReceiveDiscount map, using the tagDetailsAsDiscounted method. |
protected boolean |
validatePromotion(PricingContext pPricingContext,
java.util.Map pExtraParameters)
Method to do up front validation of a promotion to determine if it isn't valid for further evaluation. This method should only return false if it can guarantee that the promotion could not qualify
and find a valid target.This validation is performed on an unfiltered and unsorted list of commerce items in the cart. The purpose of the method is to improve performance by avoiding a full evaluation of a promotion if possible. |
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, vlogDebugTrace, 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 setPricingTools(PricingTools pPricingTools)
public PricingTools getPricingTools()
public void setPromotionTools(PromotionTools pPromotionTools)
public PromotionTools getPromotionTools()
public void setFilters(PromotionQualifyingFilter[] pFilters)
public PromotionQualifyingFilter[] getFilters()
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 setAggregatorManager(AggregatorManager pAggregatorManager)
public AggregatorManager getAggregatorManager()
public void setDetailSortOrder(java.lang.String pDetailSortOrder)
public java.lang.String getDetailSortOrder()
public void setCallingContext(int pCallingContext)
pCallingContext
- new value to setpublic int getCallingContext()
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()
@Deprecated 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 pExtraParametersMap) throws PricingException
findQualifyingOrder(PricingContext, Map)
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.pExtraParametersMap
- 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 findQualifyingOrder(PricingContext pPricingContext, java.util.Map pExtraParametersMap) throws PricingException
This method will call findQualifyingObjectNoTargetEvaluation
NOTE: because findQualifyingOrder needs to tinker with a CommerceItem's quantity,
input CommerceItems must be 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.
pPricingContext
- PricingContext environmentpExtraParametersMap
- 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)
@Deprecated 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 pExtraParametersMap) throws PricingException
findQualifyingShipping(PricingContext, Map)
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 anypExtraParametersMap
- 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(PricingContext pPricingContext, java.util.Map pExtraParametersMap) 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 must be 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.
pPricingContext
- PricingContext environmentpExtraParametersMap
- 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)
@Deprecated 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 pExtraParametersMap) throws PricingException
findQualifyingItems(PricingContext, Map)
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 anypExtraParametersMap
- 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)
public java.util.Collection findQualifyingItems(PricingContext pPricingContext, java.util.Map pExtraParametersMap) 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 pricingContext CommerceItems should be 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.
pPricingContext
- Pricing parameters where Items should be FilteredCommerceItem'spExtraParametersMap
- any extra information that might need to be passed in.
PricingException
- if an error occured during processingfilterItemsForQualifier(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 void tagTargetItems(java.lang.Object pTargetEvalValue, java.util.Map pDetailsTaggedToReceiveDiscount)
pTargetEvalValue
- value returned from the call to evaluateTargetpDetailsTaggedToReceiveDiscount
- map of dipis tagged to receive a discountprotected atg.commerce.pricing.Qualifier.ProcessReturn processQualifier(PricingContext pPricingContext, java.util.Map pExtraParametersMap, java.util.Map pDetailsPendingActingAsQualifier, java.util.Map pDetailsTaggedToReceiveDiscount, java.util.Map pOriginalItemQuantities) throws PricingException
Carry out a call to evaluateQualifier and process the return. A return object holds the result from the evaluation and also a boolean value indicating if further processing should stop.
Processing should stop if a null value or false
value was returned
from the evaluateQualifier call.
pPricingContext
- Pricing parameters where Items should be FilteredCommerceItem'spExtraParametersMap
- any extra information that might need to be passed inpDetailsPendingActingAsQualifier
- map of dipis pending as acting as qualifierpDetailsTaggedToReceiveDiscount
- map of dipis tagged to receive a discountpOriginalItemQuantities
- original item quantities
PricingException
- if an error occurred during processingprotected atg.commerce.pricing.Qualifier.ProcessReturn processTarget(java.lang.Object pTargetRet, PricingContext pPricingContext, java.util.Map pExtraParametersMap, java.util.Collection<QualifiedItem> pQualifiedItems, java.util.Map<java.lang.String,java.util.Map<java.lang.String,QualifiedItem>> pQualifiedItemsDetails, java.util.Map pDetailsTaggedToReceiveDiscount) throws PricingException
Processes the return from a call to evaluateTarget. A return object holds the result from the evaluation and also a boolean value indicating if further processing should stop.
Processing should stop if a null value or false
value was returned
from the evaluateTarget call.
pPricingContext
- Pricing parameters where Items should be FilteredCommerceItem'spExtraParametersMap
- any extra information that might need to be passed inpQualifiedItems
- collection of items that are acting as qualifierspQualifiedItemsDetails
- map of details of the qualifying itemspDetailsTaggedToReceiveDiscount
- map of dipis tagged to receive a discount
PricingException
- if an error occurred during processing@Deprecated 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 pExtraParametersMap, java.lang.Object pTarget) throws PricingException
findQualifyingObjectNoTargetEvaluation(PricingContext, Map, Object)
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.pExtraParametersMap
- 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 MatchingObject findQualifyingObjectNoTargetEvaluation(PricingContext pPricingContext, java.util.Map pExtraParametersMap, 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 pricingContext CommerceItems must be 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.
pPricingContext
- Pricing parameterspExtraParametersMap
- 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.util.Map tagDetailsAsDiscounted(ItemPriceInfo pItemPrice, FilteredCommerceItem pItem, long pMatchingQuantity, QualifiedItem pQualifiedItem, java.util.Map pDetailsTaggedToReceiveDiscount)
pItemPrice
- The ItemPriceInfo for the given itempItem
- A FilteredCommerceItem that was "matched" during target evaluationpMatchingQuantity
- The quantity of pItem that matchpQualifiedItem
- The QualifiedItem for pItempDetailsTaggedToReceiveDiscount
- A Map from DetailedItemPriceInfos to ranges that
identify what specifically will receive a discount
@Deprecated 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 pExtraParametersMap) throws PricingException
evaluateQualifier(PricingContext, Map, List)
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 anypExtraParametersMap
- any extra information that might need to be passed in.
MatchingObjects
PricingException
#validateEvaluationParams
,
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 evaluateQualifier(PricingContext pPricingContext, java.util.Map pExtraParametersMap, java.util.List pFilteredQualifierItems) 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.
pPricingContext
- PricingContext for this evaluationpExtraParametersMap
- Map of extra parameterspFilteredQualifierItems
- List of FilteredCommerceItem to evaluate against
MatchingObjects
PricingException
#validateEvaluationParams
,
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
@Deprecated 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 pExtraParametersMap) throws PricingException
evaluateTarget(PricingContext, Map, List)
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 anypExtraParametersMap
- any extra information that might need to be passed in.
MatchingObjects
PricingException
#validateEvaluationParams
,
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(PricingContext pPricingContext, java.util.Map pExtraParametersMap, java.util.List pFilteredTargetItems) 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.
pPricingContext
- PricingContext to evaluatepExtraParametersMap
- Map of extra parameterspFilteredTargetItems
- List of FilteredCommerceItem to evaluate against
MatchingObjects
PricingException
#validateEvaluationParams
,
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 DiscountStructure checkTargetPricesLessThanOrEqualToPromotionPrice(java.util.List<DiscountStructure> pDiscountStructures)
pDiscountStructures
- Listprotected FilteredCommerceItem filterItemByPrice(FilteredCommerceItem pItem, DiscountStructure pDiscountStructure)
pItem
- FilteredCommerceItem to checkpDiscountStructure
- DiscountStructure to check price
protected java.util.List wrapCommerceItems(java.util.List pItems, java.util.List pPriceQuotes)
pItems
- A list of CommerceItemspPriceQuotes
- The prices of the commerce items
@Deprecated protected java.util.Map createPMDLBindings(java.util.List pItems, RepositoryItem pProfile, Order pOrder, ShippingGroup pShippingGroup, java.util.Locale pLocale, java.util.Map pExtraParametersMap)
createPMDLBindings(PromotionQualifyingDetails)
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 forpExtraParametersMap
- A Map of extra parameters. This is currently ignored.
protected java.util.Map createPMDLBindings(PricingContext pPricingContext, java.util.Map pExtraParametersMap, java.util.List pFilteredItems)
pPricingContext
- PricingContext to bindpExtraParametersMap
- Map of extra parameters to bindpFilteredItems
- List of FilteredCommerceItem to bind
public void filterItems(int pFilterContext, PricingContext pPricingContext, java.util.Map pExtraParametersMap, java.util.Map pDetailsPendingActingAsQualifier, java.util.Map pDetailsRangesToReceiveDiscount, java.util.List pFilteredItems) throws PricingException
filterItems
in interface PromotionQualifyingFilter
pFilterContext
- int context of this filtering, e.g. qualifier or target filteringpPricingContext
- PricingContext to filter withpExtraParametersMap
- Map of extra parameterspDetailsPendingActingAsQualifier
- the Ranges of various DetailedItemPriceInfos
that are pending for qualifying this promotion.pDetailsRangesToReceiveDiscount
- the Ranges of various DetailedItemPriceInfos
that are going to receive the discountpFilteredItems
- output param which represents the CommerceItems not weeded out
by the filter.
PricingException
- for problems filteringprotected void doFilters(int pFilterContext, PricingContext pPricingContext, java.util.Map pExtraParametersMap, java.util.Map pDetailsPendingActingAsQualifier, java.util.Map pDetailsRangesToReceiveDiscount, java.util.List pFilteredItems) throws PricingException
pFilterContext
- context of this filter, e.g. qualifier or target filteringpPricingContext
- PricingContext to use for filteringpExtraParametersMap
- Map of extra parameterspDetailsPendingActingAsQualifier
- the Ranges of various DetailedItemPriceInfos
that are pending for qualifying this promotion.pDetailsRangesToReceiveDiscount
- the Ranges of various DetailedItemPriceInfos
that are going to receive the discountpFilteredItems
- output param which represents the FilteredCommerceItems not weeded out
by the filter.
PricingException
- for problems filtering items.@Deprecated 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 pExtraParametersMap, java.util.Map pDetailsRangesToReceiveDiscount, java.util.List pNewPriceInfos, java.util.List pNewItems) throws PricingException
filterItemsForQualifier(PricingContext, Map, Map, List)
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.pExtraParametersMap
- 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 filterItemsForQualifier(PricingContext pPricingContext, java.util.Map pExtraParametersMap, java.util.Map pDetailsRangesToReceiveDiscount, java.util.List pFilteredQualifierItems) 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 param pDetails.filteredItems is returned containing the filtered items with updated quantities Note, this method is coded to be able to handle it being the first filter as it is OOTB OR to be able to be later in the filter list.
pPricingContext
- PricingContext for this promotionpExtraParametersMap
- Map of extra parameterspDetailsRangesToReceiveDiscount
- the Ranges of various DetailedItemPriceInfos
that are going to receive the discountpFilteredQualifierItems
- output param which represents the FilteredCommerceItems not
weeded out by the filter.
PricingException
- if items can't be filtered from the input environment@Deprecated 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 pExtraParametersMap, java.util.Map pDetailsPendingActingAsQualifier, java.util.Map pDetailsRangesToReceiveDiscount, java.util.List pNewPriceInfos, java.util.List pNewItems) throws PricingException
filterItemsForTarget(PromotionQualifyingDetails,Map,Map,List)
.
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.pExtraParametersMap
- 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(PricingContext pPricingContext, java.util.Map pExtraParametersMap, java.util.Map pDetailsPendingActingAsQualifier, java.util.Map pDetailsRangesToReceiveDiscount, java.util.List pFilteredTargetItems) 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...
Note: This method is the first filter OOTB but it can be optionally configured to be
a later filter.
pPricingContext
- PricingContext to use for filteringpExtraParametersMap
- Map of extra parameterspDetailsPendingActingAsQualifier
- the Ranges of various DetailedItemPriceInfos
that are pending for qualifying this promotion.pDetailsRangesToReceiveDiscount
- the Ranges of various DetailedItemPriceInfos
that are going to receive the discountpFilteredTargetItems
- output param which represents the CommerceItems not weeded out
by the filter.
PricingException
- if items can't be filtered from the input environment@Deprecated 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 pExtraParametersMap) throws PricingException
filterShippingForTarget(PricingContext,Map)
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 anypExtraParametersMap
- any extra information that might need to be passed in.
PricingException
protected boolean filterShippingForTarget(PricingContext pPricingContext, java.util.Map pExtraParametersMap) throws PricingException
pPricingContext
- PricingContext environmentpExtraParametersMap
- any extra information that might need to be passed in.
PricingException
protected void markQualifierItems(java.util.List pItemsFromQualifier, java.util.Map pItemsPendingActingAsQualifier) throws PricingException
pItemsFromQualifier
- List of MatchingObject returned by evaluateQualifierpItemsPendingActingAsQualifier
- Map of DIPI to a List of Range objects that are marked as qualifiers.
PricingException
- if the is a problem marking the rangespublic void doStartService() throws ServiceException
doStartService
in class GenericService
ServiceException
- if the Service had a problem starting upprotected boolean isClosenessQualifier(RepositoryItem pPricingModel) throws PricingException
pPricingModel
- RepositoryItem pricing model to check
PricingException
- for repository exceptions.public void setExactlyPromotionLoopThrough(boolean pExactlyPromotionLoopThrough)
public boolean isExactlyPromotionLoopThrough()
default value is true
protected boolean validatePromotion(PricingContext pPricingContext, java.util.Map pExtraParameters) throws PricingException
false
if it can guarantee that the promotion could not qualify
and find a valid target.
pPricingContext
- PricingContext with the promotion and commerce items to validatepExtraParameters
- Map of extra parameters, must not be null
false
only if the promotion is guaranteed to not qualify and find a valid target,
otherwise it should return true
.
PricingException
- for problems during the validation
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |