|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectatg.nucleus.logging.VariableArgumentApplicationLoggingImpl
atg.nucleus.GenericService
atg.projects.store.collections.validator.ExcludeItemsInCartValidator
public class ExcludeItemsInCartValidator
This validator generates filtered results based on the products in the current order. All products in the unfiltered collection that are in the current order are excluded from the filtered results. This validator is useful for filtering upsell products or related products etc. to prevent promoting a product that is already in the cart.
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string |
protected atg.commerce.catalog.CatalogTools |
mCatalogTools
property: catalogTools |
protected java.lang.String |
mShoppingCartPath
property: shoppingCartPath |
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 | |
---|---|
ExcludeItemsInCartValidator()
|
Method Summary | |
---|---|
protected java.util.Collection |
createProductIdCollection(atg.commerce.order.Order pOrder)
This method creates a collection of product ids. |
protected java.lang.String |
findCommerceItemProductId(atg.commerce.order.CommerceItem pCommerceItem)
This method returns the product id associated with a commerce item. |
atg.commerce.order.Order |
findOrder()
Finds the current order using the nucleus specified by the shoppingCartPath property. |
atg.commerce.catalog.CatalogTools |
getCatalogTools()
|
java.lang.String |
getShoppingCartPath()
|
void |
setCatalogTools(atg.commerce.catalog.CatalogTools pCatalogTools)
|
void |
setShoppingCartPath(java.lang.String pShoppingCartPath)
|
boolean |
shouldApplyValidator()
Check if validator should be applied. |
boolean |
validateObject(java.lang.Object pObject)
This method validates the passed in product based on the products in the current order. |
Methods inherited from class atg.nucleus.GenericService |
---|
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 |
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
protected java.lang.String mShoppingCartPath
protected atg.commerce.catalog.CatalogTools mCatalogTools
Constructor Detail |
---|
public ExcludeItemsInCartValidator()
Method Detail |
---|
public void setShoppingCartPath(java.lang.String pShoppingCartPath)
pShoppingCartPath
- the shopping cart nucleus path to setpublic java.lang.String getShoppingCartPath()
public void setCatalogTools(atg.commerce.catalog.CatalogTools pCatalogTools)
pCatalogTools
- the CatalogTools to setpublic atg.commerce.catalog.CatalogTools getCatalogTools()
public boolean validateObject(java.lang.Object pObject)
validateObject
in interface atg.service.collections.validator.CollectionObjectValidator
pObject
- product to validate
public atg.commerce.order.Order findOrder()
public boolean shouldApplyValidator()
protected java.lang.String findCommerceItemProductId(atg.commerce.order.CommerceItem pCommerceItem)
pCommerceItem
- the commerce item
protected java.util.Collection createProductIdCollection(atg.commerce.order.Order pOrder)
pOrder
- the order
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |