org.broadleafcommerce.core.catalog.service
Class CatalogServiceImpl

java.lang.Object
  extended by org.broadleafcommerce.core.catalog.service.CatalogServiceImpl
All Implemented Interfaces:
CatalogService

@Service(value="blCatalogService")
public class CatalogServiceImpl
extends Object
implements CatalogService


Field Summary
protected  CategoryDao categoryDao
           
protected  ProductDao productDao
           
protected  SkuDao skuDao
           
 
Constructor Summary
CatalogServiceImpl()
           
 
Method Summary
 Category createCategory()
           
 Product createProduct(ProductType productType)
           
 Sku createSku()
           
 List<Product> findActiveProductsByCategory(Category category, Date currentDate)
           
 List<Category> findActiveSubCategoriesByCategory(Category category)
           
 List<Category> findAllCategories()
           
 List<Product> findAllProducts()
           
 List<Sku> findAllSkus()
           
 List<Category> findAllSubCategories(Category category)
           
 List<Category> findCategoriesByName(String categoryName)
          Retrieve a list of Category instance based on the name property.
 Category findCategoryById(Long categoryId)
           
 Category findCategoryByName(String categoryName)
          Deprecated. 
 Product findProductById(Long productId)
           
 List<Product> findProductsByName(String searchName)
           
 List<Product> findProductsForCategory(Category category)
           
 Sku findSkuById(Long skuId)
           
 List<Sku> findSkusByIds(List<Long> ids)
           
 Map<String,List<Long>> getChildCategoryURLMapByCategoryId(Long categoryId)
           
 void removeCategory(Category category)
           
 Category saveCategory(Category category)
           
 Product saveProduct(Product product)
           
 Sku saveSku(Sku sku)
           
 void setCategoryDao(CategoryDao categoryDao)
           
 void setProductDao(ProductDao productDao)
           
 void setSkuDao(SkuDao skuDao)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

categoryDao

protected CategoryDao categoryDao

productDao

protected ProductDao productDao

skuDao

protected SkuDao skuDao
Constructor Detail

CatalogServiceImpl

public CatalogServiceImpl()
Method Detail

findProductById

public Product findProductById(Long productId)
Specified by:
findProductById in interface CatalogService

findProductsByName

public List<Product> findProductsByName(String searchName)
Specified by:
findProductsByName in interface CatalogService

findActiveProductsByCategory

public List<Product> findActiveProductsByCategory(Category category,
                                                  Date currentDate)
Specified by:
findActiveProductsByCategory in interface CatalogService

saveProduct

public Product saveProduct(Product product)
Specified by:
saveProduct in interface CatalogService

findCategoryById

public Category findCategoryById(Long categoryId)
Specified by:
findCategoryById in interface CatalogService

findCategoryByName

@Deprecated
public Category findCategoryByName(String categoryName)
Deprecated. 

Description copied from interface: CatalogService
Retrieve a Category instance based on its name property. Broadleaf allows more than one category to have the same name. Calling this method could produce an exception in such situations. Use CatalogService.findCategoriesByName(String) instead.

Specified by:
findCategoryByName in interface CatalogService
Parameters:
categoryName - the category name to search by
Returns:
the Category instance matching the categoryName

findCategoriesByName

public List<Category> findCategoriesByName(String categoryName)
Description copied from interface: CatalogService
Retrieve a list of Category instance based on the name property.

Specified by:
findCategoriesByName in interface CatalogService
Parameters:
categoryName - the category name to search by
Returns:
the list of matching Category instances

saveCategory

public Category saveCategory(Category category)
Specified by:
saveCategory in interface CatalogService

removeCategory

public void removeCategory(Category category)
Specified by:
removeCategory in interface CatalogService

findAllCategories

public List<Category> findAllCategories()
Specified by:
findAllCategories in interface CatalogService

findAllSubCategories

public List<Category> findAllSubCategories(Category category)
Specified by:
findAllSubCategories in interface CatalogService

findActiveSubCategoriesByCategory

public List<Category> findActiveSubCategoriesByCategory(Category category)
Specified by:
findActiveSubCategoriesByCategory in interface CatalogService

findAllProducts

public List<Product> findAllProducts()
Specified by:
findAllProducts in interface CatalogService

findAllSkus

public List<Sku> findAllSkus()
Specified by:
findAllSkus in interface CatalogService

findSkuById

public Sku findSkuById(Long skuId)
Specified by:
findSkuById in interface CatalogService

saveSku

public Sku saveSku(Sku sku)
Specified by:
saveSku in interface CatalogService

findSkusByIds

public List<Sku> findSkusByIds(List<Long> ids)
Specified by:
findSkusByIds in interface CatalogService

setProductDao

public void setProductDao(ProductDao productDao)

setSkuDao

public void setSkuDao(SkuDao skuDao)

findProductsForCategory

public List<Product> findProductsForCategory(Category category)
Specified by:
findProductsForCategory in interface CatalogService

setCategoryDao

public void setCategoryDao(CategoryDao categoryDao)

getChildCategoryURLMapByCategoryId

public Map<String,List<Long>> getChildCategoryURLMapByCategoryId(Long categoryId)
Specified by:
getChildCategoryURLMapByCategoryId in interface CatalogService

createCategory

public Category createCategory()
Specified by:
createCategory in interface CatalogService

createSku

public Sku createSku()
Specified by:
createSku in interface CatalogService

createProduct

public Product createProduct(ProductType productType)
Specified by:
createProduct in interface CatalogService


Copyright © 2012. All Rights Reserved.