Interface CatalogService
- All Known Implementing Classes:
CatalogServiceImpl
public interface CatalogService
-
Method Summary
Modifier and TypeMethodDescriptioncountProductsUsingProductOptionById(Long productOptionId) createProduct(ProductType productType) findActiveProductsByCategory(Category category) findActiveProductsByCategory(Category category, int limit, int offset) Same asfindActiveProductsByCategory(Category)but allowing for pagination.findActiveProductsByCategory(Category category, Date currentDate, int limit, int offset) Deprecated, for removal: This API element is subject to removal in a future version.Use {@link #findActiveProductsByCategory(Category, limit, offset}findActiveSubCategoriesByCategory(Category category) findActiveSubCategoriesByCategory(Category category, int limit, int offset) findAllCategories(int limit, int offset) findAllProducts(int limit, int offset) findAllSkus(int offset, int limit) findAllSubCategories(Category category) findAllSubCategories(Category category, int limit, int offset) Returns a list ofAssignedProductOptionDTOfound for given theProduct.findAssignedProductOptionsByProductId(Long productId) Returns a list ofAssignedProductOptionDTOfound for given the productId.Find all ProductBundles whose automatic attribute is set to true.findCategoriesByName(String categoryName) Retrieve a list ofCategoryinstance based on the name property.findCategoriesByName(String categoryName, int limit, int offset) Retrieve a list ofCategoryinstances based on the search criteriafindCategoryByExternalId(String externalId) findCategoryById(Long categoryId) findCategoryByName(String categoryName) Deprecated, for removal: This API element is subject to removal in a future version.findCategoryByURI(String uri) Returns a category associated with the passed in URI or null if no Category is mapped to this URI.findFilteredActiveProductsByCategory(Category category, Date currentDate, SearchCriteria searchCriteria) Deprecated.findFilteredActiveProductsByCategory(Category category, SearchCriteria searchCriteria) Given a category and a ProudctSearchCriteria, returns the appropriate matching productsfindFilteredActiveProductsByQuery(String query, Date currentDate, SearchCriteria searchCriteria) Deprecated.findFilteredActiveProductsByQuery(String query, SearchCriteria searchCriteria) Given a search query and a SearchCriteria, returns the appropriate matching productsfindProductByExternalId(String externalId) findProductById(Long productId) findProductByURI(String uri) Returns a product associated with the passed in URI or null if no Product is mapped to this URI.findProductIdsUsingProductOptionById(Long productOptionId, int start, int pageSize) Returns a paginated list of Product Ids that are using the passed in ProductOption IDfindProductOptionById(Long productOptionId) findProductOptionValueById(Long productOptionValueId) findProductsByName(String searchName) findProductsByName(String searchName, int limit, int offset) Find a subset ofProductinstances whose name starts with or is equal to the passed in search parameter.findProductsForCategory(Category category) findProductsForCategory(Category category, int limit, int offset) findSkuByExternalId(String externalId) findSkuById(Long skuId) findSkuByUpc(String upc) Method to look up a Sku by the Universal Product Code (UPC).findSkuByURI(String uri) Returns a sku associated with the passed in URI or null if no sku is mapped to this URI.findSkusByIds(List<Long> ids) getChildCategoryURLMapByCategoryId(Long categoryId) Deprecated.this approach is inherently inefficient - don't use.voidremoveCategory(Category category) voidremoveProduct(Product product) voidsaveCategory(Category category) saveProduct(Product product) saveProductOption(ProductOption option) saveSkuFee(SkuFee fee) translateItemAttributeValue(OrderItemAttribute itemAttribute, ProductOption productOption) Returns a translated String attribute value for OrderItemAttribute
-
Method Details
-
saveProduct
-
findProductById
-
findProductByExternalId
-
findProductsByName
-
findProductsByName
Find a subset ofProductinstances 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
-
findFilteredActiveProductsByCategory
List<Product> findFilteredActiveProductsByCategory(Category category, SearchCriteria 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, SearchCriteria searchCriteria) Deprecated.- Parameters:
category-currentDate-searchCriteria-- Returns:
-
findFilteredActiveProductsByQuery
Given a search query and a SearchCriteria, returns the appropriate matching products- Parameters:
query-searchCriteria-- Returns:
- the matching products
-
findFilteredActiveProductsByQuery
List<Product> findFilteredActiveProductsByQuery(String query, Date currentDate, SearchCriteria searchCriteria) Deprecated. -
findActiveProductsByCategory
Same asfindActiveProductsByCategory(Category)but allowing for pagination.- Parameters:
category-limit-offset-- Returns:
-
findActiveProductsByCategory
@Deprecated(forRemoval=true) List<Product> findActiveProductsByCategory(Category category, Date currentDate, int limit, int offset) Deprecated, for removal: This API element is subject to removal in a future version.Use {@link #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
-
removeCategory
-
removeProduct
-
removeSku
-
findCategoryById
-
findCategoryByExternalId
-
findCategoryByName
Deprecated, for removal: This API element is subject to removal in a future version.Retrieve aCategoryinstance 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
Retrieve a list ofCategoryinstance based on the name property.- Parameters:
categoryName- the category name to search by- Returns:
- the list of matching Category instances
-
findCategoriesByName
Retrieve a list ofCategoryinstances 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
-
findAllCategories
-
findAllProducts
-
findAllProducts
-
findProductsForCategory
-
findProductsForCategory
-
saveSku
-
saveSkuFee
-
findAllSkus
-
findAllSkus
-
findSkusByIds
-
findSkuById
-
findSkuByExternalId
-
findSkuByUpc
Method to look up a Sku by the Universal Product Code (UPC).- Parameters:
upc-- Returns:
-
getChildCategoryURLMapByCategoryId
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
-
findTotalCategoryCount
Long findTotalCategoryCount() -
findAllSubCategories
-
findAllSubCategories
-
findActiveSubCategoriesByCategory
-
findActiveSubCategoriesByCategory
-
readAllProductOptions
List<ProductOption> readAllProductOptions() -
saveProductOption
-
findProductOptionById
-
findProductOptionValueById
-
findCategoryByURI
Returns a category associated with the passed in URI or null if no Category is mapped to this URI.- Parameters:
uri-- Returns:
-
findOriginalCategoryByURI
-
findProductByURI
Returns a product associated with the passed in URI or null if no Product is mapped to this URI.- Parameters:
uri-- Returns:
-
findOriginalProductByURI
-
findSkuByURI
Returns a sku associated with the passed in URI or null if no sku is mapped to this URI.- Parameters:
uri-- Returns:
-
findAssignedProductOptionsByProductId
Returns a list ofAssignedProductOptionDTOfound for given the productId.- Parameters:
productId-- Returns:
-
findAssignedProductOptionsByProduct
Returns a list ofAssignedProductOptionDTOfound for given theProduct.- Parameters:
product-- Returns:
-
countProductsUsingProductOptionById
-
findProductIdsUsingProductOptionById
Returns a paginated list of Product Ids that are using the passed in ProductOption ID- Parameters:
productOptionId-start-pageSize-- Returns:
-
translateItemAttributeValue
Returns a translated String attribute value for OrderItemAttribute- Parameters:
itemAttribute-productOption-- Returns:
-