com.elasticpath.service.catalogview.impl
Class NoCachingProductRetrieveStrategyImpl

java.lang.Object
  extended by com.elasticpath.service.impl.AbstractEpServiceImpl
      extended by com.elasticpath.service.catalogview.impl.AbstractProductRetrieveStrategyImpl
          extended by com.elasticpath.service.catalogview.impl.NoCachingProductRetrieveStrategyImpl
All Implemented Interfaces:
ProductRetrieveStrategy, EpService

public class NoCachingProductRetrieveStrategyImpl
extends AbstractProductRetrieveStrategyImpl
implements ProductRetrieveStrategy

Provied an implementation of ProductRetrieveStrategy with no caching ability.

This service will return different instance of a product for different customers. So it will take more more memory than other implmentations, but it makes possible for customer-specific rules being applied to products.


Constructor Summary
NoCachingProductRetrieveStrategyImpl()
           
 
Method Summary
 Product retrieveProduct(long productUid, ShoppingCart shoppingCart, ProductLoadTuner productLoadTuner)
          Retrieve a Product with the given product uid.
 java.util.List retrieveProducts(java.util.Collection productUids, ShoppingCart shoppingCart, ProductLoadTuner productLoadTuner)
          Retrieve a list of Product of the given product uids.
 
Methods inherited from class com.elasticpath.service.catalogview.impl.AbstractProductRetrieveStrategyImpl
getProductService, setEpRuleEngine, setProductService
 
Methods inherited from class com.elasticpath.service.impl.AbstractEpServiceImpl
getElasticPath, setElasticPath
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.elasticpath.service.EpService
getElasticPath, setElasticPath
 

Constructor Detail

NoCachingProductRetrieveStrategyImpl

public NoCachingProductRetrieveStrategyImpl()
Method Detail

retrieveProduct

public Product retrieveProduct(long productUid,
                               ShoppingCart shoppingCart,
                               ProductLoadTuner productLoadTuner)
Retrieve a Product with the given product uid. Return null if a product with the given uid doesn't exist or the product is not displayable.

Specified by:
retrieveProduct in interface ProductRetrieveStrategy
Parameters:
productUid - a product uid
shoppingCart - the customer shopping cart
productLoadTuner - the product load tuner
Returns:
a Product with the given product uid.

retrieveProducts

public java.util.List retrieveProducts(java.util.Collection productUids,
                                       ShoppingCart shoppingCart,
                                       ProductLoadTuner productLoadTuner)
Retrieve a list of Product of the given product uids. Only those products which are displayable are returned.

Specified by:
retrieveProducts in interface ProductRetrieveStrategy
Parameters:
productUids - a collection of product uids
shoppingCart - the customer shopping cart
productLoadTuner - the product load tuner
Returns:
a list of Product.