org.broadleafcommerce.core.catalog.service
Interface CatalogService
- All Known Implementing Classes:
- CatalogServiceImpl
public interface CatalogService
|
Method Summary |
Category |
createCategory()
|
Product |
createProduct(ProductType productType)
|
Sku |
createSku()
|
List<Product> |
findActiveProductsByCategory(Category category)
|
List<Product> |
findActiveProductsByCategory(Category category,
Date currentDate)
Deprecated. Use findActiveProductsByCategory |
List<Product> |
findActiveProductsByCategory(Category category,
Date currentDate,
int limit,
int offset)
Deprecated. Use #findActiveProductsByCategory(Category, limit, offset |
List<Product> |
findActiveProductsByCategory(Category category,
int limit,
int offset)
Same as findActiveProductsByCategory(Category) but allowing for pagination. |
List<Category> |
findActiveSubCategoriesByCategory(Category category)
|
List<Category> |
findActiveSubCategoriesByCategory(Category category,
int limit,
int offset)
|
List<Category> |
findAllCategories()
|
List<Category> |
findAllCategories(int limit,
int offset)
|
List<Category> |
findAllParentCategories()
|
List<Product> |
findAllProducts()
|
List<Product> |
findAllProducts(int limit,
int offset)
|
List<Sku> |
findAllSkus()
|
List<Category> |
findAllSubCategories(Category category)
|
List<Category> |
findAllSubCategories(Category category,
int limit,
int offset)
|
List<ProductBundle> |
findAutomaticProductBundles()
Find all ProductBundles whose automatic attribute is set to true. |
List<Category> |
findCategoriesByName(String categoryName)
Retrieve a list of Category instance based on the name
property. |
List<Category> |
findCategoriesByName(String categoryName,
int limit,
int offset)
Retrieve a list of Category instances based on the search criteria |
Category |
findCategoryById(Long categoryId)
|
Category |
findCategoryByName(String categoryName)
Deprecated. |
Category |
findCategoryByURI(String uri)
Returns a category associated with the passed in URI or null if no Category is
mapped to this URI. |
List<Product> |
findFilteredActiveProductsByCategory(Category category,
Date currentDate,
ProductSearchCriteria searchCriteria)
Deprecated. Use findFilteredActiveProductsByCategory(Category, ProductSearchCriteria) |
List<Product> |
findFilteredActiveProductsByCategory(Category category,
ProductSearchCriteria searchCriteria)
Given a category and a ProudctSearchCriteria, returns the appropriate matching products |
List<Product> |
findFilteredActiveProductsByQuery(String query,
Date currentDate,
ProductSearchCriteria searchCriteria)
Deprecated. Use findFilteredActiveProductsByCategory(Category, ProductSearchCriteria) |
List<Product> |
findFilteredActiveProductsByQuery(String query,
ProductSearchCriteria searchCriteria)
Given a search query and a ProductSearchCriteria, returns the appropriate matching products |
Product |
findProductById(Long productId)
|
Product |
findProductByURI(String uri)
Returns a product associated with the passed in URI or null if no Product is
mapped to this URI. |
ProductOption |
findProductOptionById(Long productOptionId)
|
ProductOptionValue |
findProductOptionValueById(Long productOptionValueId)
|
List<Product> |
findProductsByName(String searchName)
|
List<Product> |
findProductsByName(String searchName,
int limit,
int offset)
Find a subset of Product instances whose name starts with
or is equal to the passed in search parameter. |
List<Product> |
findProductsForCategory(Category category)
|
List<Product> |
findProductsForCategory(Category category,
int limit,
int offset)
|
Sku |
findSkuById(Long skuId)
|
List<Sku> |
findSkusByIds(List<Long> ids)
|
Map<String,List<Long>> |
getChildCategoryURLMapByCategoryId(Long categoryId)
Deprecated. this approach is inherently inefficient - don't use. |
List<ProductOption> |
readAllProductOptions()
|
void |
removeCategory(Category category)
|
Category |
saveCategory(Category category)
|
Product |
saveProduct(Product product)
|
ProductOption |
saveProductOption(ProductOption option)
|
Sku |
saveSku(Sku sku)
|
SkuFee |
saveSkuFee(SkuFee fee)
|
saveProduct
Product saveProduct(Product product)
findProductById
Product findProductById(Long productId)
findProductsByName
List<Product> findProductsByName(String searchName)
findProductsByName
List<Product> findProductsByName(String searchName,
int limit,
int offset)
- Find a subset of
Product instances whose name starts with
or is equal to the passed in search parameter. Res
- Parameters:
searchName - limit - the maximum number of resultsoffset - the starting point in the record set
- Returns:
- the list of product instances that fit the search criteria
findActiveProductsByCategory
List<Product> findActiveProductsByCategory(Category category)
findActiveProductsByCategory
List<Product> findActiveProductsByCategory(Category category,
Date currentDate)
- Deprecated. Use findActiveProductsByCategory
- Parameters:
category - currentDate -
- Returns:
findFilteredActiveProductsByCategory
List<Product> findFilteredActiveProductsByCategory(Category category,
ProductSearchCriteria searchCriteria)
- Given a category and a ProudctSearchCriteria, returns the appropriate matching products
- Parameters:
category - searchCriteria -
- Returns:
- the matching products
findFilteredActiveProductsByCategory
List<Product> findFilteredActiveProductsByCategory(Category category,
Date currentDate,
ProductSearchCriteria searchCriteria)
- Deprecated. Use
findFilteredActiveProductsByCategory(Category, ProductSearchCriteria)
- Parameters:
category - currentDate - searchCriteria -
- Returns:
findFilteredActiveProductsByQuery
List<Product> findFilteredActiveProductsByQuery(String query,
ProductSearchCriteria searchCriteria)
- Given a search query and a ProductSearchCriteria, returns the appropriate matching products
- Parameters:
query - searchCriteria -
- Returns:
- the matching products
findFilteredActiveProductsByQuery
List<Product> findFilteredActiveProductsByQuery(String query,
Date currentDate,
ProductSearchCriteria searchCriteria)
- Deprecated. Use
findFilteredActiveProductsByCategory(Category, ProductSearchCriteria)
findActiveProductsByCategory
List<Product> findActiveProductsByCategory(Category category,
int limit,
int offset)
- Same as
findActiveProductsByCategory(Category) but allowing for pagination.
- Parameters:
category - limit - offset -
- Returns:
findActiveProductsByCategory
List<Product> findActiveProductsByCategory(Category category,
Date currentDate,
int limit,
int offset)
- Deprecated. Use
#findActiveProductsByCategory(Category, limit, offset
findAutomaticProductBundles
List<ProductBundle> findAutomaticProductBundles()
- Find all ProductBundles whose automatic attribute is set to true.
Automatic product bundles are collections of products that can receive special
pricing. With automatic product bundles, if a customer adds all of the
components of the bundle individually to the cart, they will automatically get
assembeled into a bundle.
- Returns:
saveCategory
Category saveCategory(Category category)
removeCategory
void removeCategory(Category category)
findCategoryById
Category findCategoryById(Long categoryId)
findCategoryByName
@Deprecated
Category findCategoryByName(String categoryName)
- Deprecated.
- 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
findCategoriesByName(String) instead.
- Parameters:
categoryName - the category name to search by
- Returns:
- the Category instance matching the categoryName
findCategoriesByName
List<Category> findCategoriesByName(String categoryName)
- Retrieve a list of
Category instance based on the name
property.
- Parameters:
categoryName - the category name to search by
- Returns:
- the list of matching Category instances
findCategoriesByName
List<Category> findCategoriesByName(String categoryName,
int limit,
int offset)
- Retrieve a list of
Category instances based on the search criteria
- Parameters:
categoryName - the name of the category to search bylimit - the maximum number of results to returnoffset - the starting point of the records to return
- Returns:
- a list of category instances that match the search criteria
findAllCategories
List<Category> findAllCategories()
findAllCategories
List<Category> findAllCategories(int limit,
int offset)
findAllProducts
List<Product> findAllProducts()
findAllProducts
List<Product> findAllProducts(int limit,
int offset)
findProductsForCategory
List<Product> findProductsForCategory(Category category)
findProductsForCategory
List<Product> findProductsForCategory(Category category,
int limit,
int offset)
saveSku
Sku saveSku(Sku sku)
saveSkuFee
SkuFee saveSkuFee(SkuFee fee)
findAllSkus
List<Sku> findAllSkus()
findSkusByIds
List<Sku> findSkusByIds(List<Long> ids)
findSkuById
Sku findSkuById(Long skuId)
getChildCategoryURLMapByCategoryId
@Deprecated
Map<String,List<Long>> getChildCategoryURLMapByCategoryId(Long categoryId)
- Deprecated. this approach is inherently inefficient - don't use.
- Get a hierarchical map of all child categories keyed on the url
- Parameters:
categoryId - the parent category to which the children belong
- Returns:
- hierarchical map of all child categories
createCategory
Category createCategory()
createSku
Sku createSku()
createProduct
Product createProduct(ProductType productType)
findAllParentCategories
List<Category> findAllParentCategories()
findAllSubCategories
List<Category> findAllSubCategories(Category category)
findAllSubCategories
List<Category> findAllSubCategories(Category category,
int limit,
int offset)
findActiveSubCategoriesByCategory
List<Category> findActiveSubCategoriesByCategory(Category category)
findActiveSubCategoriesByCategory
List<Category> findActiveSubCategoriesByCategory(Category category,
int limit,
int offset)
readAllProductOptions
List<ProductOption> readAllProductOptions()
saveProductOption
ProductOption saveProductOption(ProductOption option)
findProductOptionById
ProductOption findProductOptionById(Long productOptionId)
findProductOptionValueById
ProductOptionValue findProductOptionValueById(Long productOptionValueId)
findCategoryByURI
Category findCategoryByURI(String uri)
- Returns a category associated with the passed in URI or null if no Category is
mapped to this URI.
- Parameters:
uri -
- Returns:
findProductByURI
Product findProductByURI(String uri)
- Returns a product associated with the passed in URI or null if no Product is
mapped to this URI.
- Parameters:
uri -
- Returns:
Copyright © 2013. All Rights Reserved.