public class PricingModelEvaluationSiteVetoer extends GenericService implements PricingModelEvaluationVetoer
Modifier and Type | Field and Description |
---|---|
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'
|
SERVICE_INFO_KEY
DEFAULT_LOG_TRACE_STATUS
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS
Constructor and Description |
---|
PricingModelEvaluationSiteVetoer() |
Modifier and Type | Method and Description |
---|---|
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.
|
addLogListener, createAdminServlet, doStartService, doStopService, getAbsoluteName, getAdminServlet, getAdminServletOutputStreamEncoding, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isAdminServletUseServletOutputStream, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, reResolveThis, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setAdminServletOutputStreamEncoding, setAdminServletUseServletOutputStream, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning
public static java.lang.String CLASS_VERSION
protected java.lang.String mSiteGroupSitesPropertyName
protected java.lang.String mSiteConfigurationIdPropertyName
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 neededvetoPromotion(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 itemspublic java.lang.String toString()
toString
in class java.lang.Object