com.elasticpath.service.catalogview.impl
Class ProductViewServiceImpl

java.lang.Object
  extended by com.elasticpath.service.impl.AbstractEpServiceImpl
      extended by com.elasticpath.service.catalogview.impl.ProductViewServiceImpl
All Implemented Interfaces:
ProductViewService, EpService

public class ProductViewServiceImpl
extends AbstractEpServiceImpl
implements ProductViewService

Represents a default implementation of SearchService.


Constructor Summary
ProductViewServiceImpl()
           
 
Method Summary
 Product getProduct(java.lang.String productCode, ProductLoadTuner loadTuner, ShoppingCart shoppingCart)
          Returns the product with the given product code.
 void setProductRetrieveStrategy(ProductRetrieveStrategy productRetrieveStrategy)
          Sets the ProductRetrieveStrategy.
 void setProductService(ProductService productService)
          Sets the product service.
 
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
 

Constructor Detail

ProductViewServiceImpl

public ProductViewServiceImpl()
Method Detail

getProduct

public Product getProduct(java.lang.String productCode,
                          ProductLoadTuner loadTuner,
                          ShoppingCart shoppingCart)
                   throws EpServiceException
Returns the product with the given product code. Return null if no matching product exists. You can give a product load tuner to fine control what data get populated of the returned product.

By giving a shopping cart, promotion rules will be applied to the returned product.

Specified by:
getProduct in interface ProductViewService
Parameters:
productCode - the product code.
loadTuner - the product load tuner
shoppingCart - the shopping cart, give null if you don't have it.
Returns:
the product if a product with the given code exists, otherwise null
Throws:
EpServiceException - - in case of any errors

setProductRetrieveStrategy

public void setProductRetrieveStrategy(ProductRetrieveStrategy productRetrieveStrategy)
Sets the ProductRetrieveStrategy.

Parameters:
productRetrieveStrategy - the product retrieve strategy

setProductService

public void setProductService(ProductService productService)
Sets the product service.

Parameters:
productService - the product service