com.elasticpath.cmweb.ajaxservice.impl
Class SkuConfigurationServiceImpl

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

public class SkuConfigurationServiceImpl
extends AbstractEpServiceImpl
implements SkuConfigurationService

Provides services relating to Sku Configuration for the Commerce Manager.


Constructor Summary
SkuConfigurationServiceImpl()
           
 
Method Summary
 java.util.Map getSkuUsageMap(long productUid)
          Retreive the multi-sku mappings for a given product.
 void setProductService(ProductService productService)
          Set a reference to 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
 
Methods inherited from interface com.elasticpath.service.EpService
getElasticPath, setElasticPath
 

Constructor Detail

SkuConfigurationServiceImpl

public SkuConfigurationServiceImpl()
Method Detail

getSkuUsageMap

public java.util.Map getSkuUsageMap(long productUid)
Retreive the multi-sku mappings for a given product. This mapping consists of a map from an optionValueKey to an array of a map of available optionValueKeys of the next option, and a count of how many optionValueKeys are mapped (and therefore in use). For example: [ primaryKeyVal1 --> [ [ secondaryKeyVal1 --> [ [...], 5], secondaryKeyVal2 --> [ [...], 1] ], 2 ], primaryKeyVal2 --> [ ... ] ]

Specified by:
getSkuUsageMap in interface SkuConfigurationService
Parameters:
productUid - The uid of the product
Returns:
a Map containing nested mappings of optionValueKeys to maps of available optionValueKeys and count of options in use

setProductService

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

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