com.elasticpath.sfweb.ajax.service.impl
Class SkuConfigurationServiceImpl

java.lang.Object
  extended by com.elasticpath.service.impl.AbstractEpServiceImpl
      extended by com.elasticpath.sfweb.ajax.service.impl.SkuConfigurationServiceImpl
All Implemented Interfaces:
EpService, SkuConfigurationService

public class SkuConfigurationServiceImpl
extends AbstractEpServiceImpl
implements SkuConfigurationService

Provides services relating to Sku Configuration.


Constructor Summary
SkuConfigurationServiceImpl()
           
 
Method Summary
 java.util.Set getAvailableOptionValues(long productUid, java.util.List selectedOptionValueCodes)
          Returns the set of SkuOptions with option values for which there are skus available given the selected when the primary option value.
 java.lang.String[] getPriceTierContents(ProductSku productSku, java.lang.String currencyCode)
          Set a reference to the product sku service.
 SkuConfigurationBean getSkuConfigurationBean(long productUid)
          Retrieve the multi-sku configuration options for a given product.
 GuidedSkuSelectionBean getSkuWithMatchingOptionValues(long productUid, java.util.List optionValueCodes, java.lang.String currencyCode, long shoppingCartUid)
          Gets a SKU matches the specifiec option value codes.
 void setPersistenceEngine(PersistenceEngine persistenceEngine)
          Sets the persistence engine.
 void setProductService(ProductService productService)
          Set a reference to the product service.
 void setProductSkuService(ProductSkuService productSkuService)
          Set a reference to the product sku service.
 void setShoppingCartService(ShoppingCartService shoppingCartService)
          Set a reference to the shopping cart service.
 void setSkuConfigurationDao(SkuConfigurationDao skuConfigurationDao)
          Set the SKU configuration DAO.
 
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

SkuConfigurationServiceImpl

public SkuConfigurationServiceImpl()
Method Detail

getAvailableOptionValues

public java.util.Set getAvailableOptionValues(long productUid,
                                              java.util.List selectedOptionValueCodes)
Returns the set of SkuOptions with option values for which there are skus available given the selected when the primary option value. The product's first option is considered the "primary" option and all of its option values are always returned.

Specified by:
getAvailableOptionValues in interface SkuConfigurationService
Parameters:
productUid - the UID of the product whose options are being selected
selectedOptionValueCodes - the option value codes that have already been selected
Returns:
A set of SkuOptions with each having the available SkuOptionValues in them

getPriceTierContents

public java.lang.String[] getPriceTierContents(ProductSku productSku,
                                               java.lang.String currencyCode)
Set a reference to the product sku service.

Specified by:
getPriceTierContents in interface SkuConfigurationService
Parameters:
productSku - the product sku
currencyCode - the currency code
Returns:
the String Array that contains the price tier information. A example of the format is:
"1 - 5 @ $10.99"
"6 + @ $8.99"

getSkuConfigurationBean

public SkuConfigurationBean getSkuConfigurationBean(long productUid)
Retrieve the multi-sku configuration options for a given product.

Specified by:
getSkuConfigurationBean in interface SkuConfigurationService
Parameters:
productUid - the uid of the product to retrieve options for
Returns:
a SkuConfigurationBean containing the requested information

getSkuWithMatchingOptionValues

public GuidedSkuSelectionBean getSkuWithMatchingOptionValues(long productUid,
                                                             java.util.List optionValueCodes,
                                                             java.lang.String currencyCode,
                                                             long shoppingCartUid)
Gets a SKU matches the specifiec option value codes. Also returns display information required by the client including the SKU price and the URL to the SKU's image.

Specified by:
getSkuWithMatchingOptionValues in interface SkuConfigurationService
Parameters:
productUid - the SKU's product UID
optionValueCodes - a list of option value codes the SKU must have
currencyCode - the code for the currency *
shoppingCartUid - the uid of the shopping cart
Returns:
a bean containing the selected SKU and other display information.

setPersistenceEngine

public void setPersistenceEngine(PersistenceEngine persistenceEngine)
Sets the persistence engine.

Parameters:
persistenceEngine - the persistence engine to set.

setProductService

public void setProductService(ProductService productService)
Set a reference to the product service.

Specified by:
setProductService in interface SkuConfigurationService
Parameters:
productService - the product service

setProductSkuService

public void setProductSkuService(ProductSkuService productSkuService)
Set a reference to the product sku service.

Parameters:
productSkuService - the product sku service

setShoppingCartService

public void setShoppingCartService(ShoppingCartService shoppingCartService)
Set a reference to the shopping cart service.

Parameters:
shoppingCartService - the shopping cart service.

setSkuConfigurationDao

public void setSkuConfigurationDao(SkuConfigurationDao skuConfigurationDao)
Set the SKU configuration DAO.

Specified by:
setSkuConfigurationDao in interface SkuConfigurationService
Parameters:
skuConfigurationDao - the SKU configuration DAO