|
|||||||||
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.PricingModelEvaluationSiteVetoer
public class PricingModelEvaluationSiteVetoer
Promotions site vetoer for pricing evaluation. Ensures that at pricing time only promotions that are valid for the current site are evaluated. The current site is taken from the extra parameters map if available otherwise the pricing context or failing that the current site context. The vetoer checks the current site against the promotion item's sites and siteGroups properties.
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string |
protected java.lang.String |
mSiteConfigurationIdPropertyName
Property for the String name of the site configuration id property name. |
protected java.lang.String |
mSiteGroupSitesPropertyName
Property for the String name of the site group sites property name Defaults to 'sites' |
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 | |
---|---|
PricingModelEvaluationSiteVetoer()
|
Method Summary | |
---|---|
protected boolean |
containsSiteId(java.lang.String pSiteId,
java.util.Set pSites)
Checks through the given set of site configuration items and returns true if any of them match the given id. |
java.lang.String |
getSiteConfigurationIdPropertyName()
|
java.lang.String |
getSiteGroupSitesPropertyName()
|
java.lang.Object |
prepareForVetoing(PricingEngineService pPricingEngine,
PricingContext pPricingContext,
java.util.Map pExtraParametersMap)
Prepares the site vetoer for vetoing promotions. |
void |
setSiteConfigurationIdPropertyName(java.lang.String pSiteConfigurationIdPropertyName)
|
void |
setSiteGroupSitesPropertyName(java.lang.String pSiteGroupSitesPropertyName)
|
java.lang.String |
toString()
|
java.lang.String |
vetoPromotion(PricingEngineService pPricingEngine,
PricingContext pPricingContext,
java.util.Map pExtraParametersMap,
java.lang.Object pVetoParam)
Allows the promotion in pPricingContext to be vetoed by site. |
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, wait, wait, wait |
Field Detail |
---|
public static java.lang.String CLASS_VERSION
protected java.lang.String mSiteGroupSitesPropertyName
protected java.lang.String mSiteConfigurationIdPropertyName
Constructor Detail |
---|
public PricingModelEvaluationSiteVetoer()
Method Detail |
---|
public java.lang.String getSiteGroupSitesPropertyName()
public void setSiteGroupSitesPropertyName(java.lang.String pSiteGroupSitesPropertyName)
public java.lang.String getSiteConfigurationIdPropertyName()
public void setSiteConfigurationIdPropertyName(java.lang.String pSiteConfigurationIdPropertyName)
public java.lang.Object prepareForVetoing(PricingEngineService pPricingEngine, PricingContext pPricingContext, java.util.Map pExtraParametersMap)
Prepares the site vetoer for vetoing promotions.
This allows a vetoer to get the site id to veto against.
prepareForVetoing
in interface PricingModelEvaluationVetoer
pPricingEngine
- PricingEngineService that called this vetoerpPricingContext
- PricingContext for this pricing operationpExtraParametersMap
- Map of extra parameters if needed
vetoPromotion(PricingEngineService, PricingContext, Map, Object)
public java.lang.String vetoPromotion(PricingEngineService pPricingEngine, PricingContext pPricingContext, java.util.Map pExtraParametersMap, java.lang.Object pVetoParam)
Allows the promotion in pPricingContext to be vetoed by site.
This vetoer uses the passed in pVetoParam site id to decide whether the promotion should be vetoed by comparing it against the promotion.sites and siteGroups properties.
vetoPromotion
in interface PricingModelEvaluationVetoer
pPricingEngine
- PricingEngineService that called this vetoerpPricingContext
- PricingContext including the promotion to be checkedpExtraParametersMap
- Map of extra parameters if neededpVetoParam
- Object returned by prepareForVetoing method,
guaranteed to not be null.
prepareForVetoing(PricingEngineService, PricingContext, Map)
protected boolean containsSiteId(java.lang.String pSiteId, java.util.Set pSites)
pSiteId
- String id to matchpSites
- Set of siteConfiguration repository items
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |