Interface CatalogService

All Known Implementing Classes:
CatalogServiceImpl

public interface CatalogService
  • Method Details

    • saveProduct

      Product saveProduct(Product product)
    • findProductById

      Product findProductById(Long productId)
    • findProductByExternalId

      Product findProductByExternalId(String externalId)
    • 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 results
      offset - the starting point in the record set
      Returns:
      the list of product instances that fit the search criteria
    • findActiveProductsByCategory

      List<Product> findActiveProductsByCategory(Category category)
    • 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)
      Parameters:
      category -
      currentDate -
      searchCriteria -
      Returns:
    • findFilteredActiveProductsByQuery

      List<Product> findFilteredActiveProductsByQuery(String query, SearchCriteria searchCriteria)
      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)
    • findActiveProductsByCategory

      List<Product> findActiveProductsByCategory(Category category, int limit, int offset)
      Same as findActiveProductsByCategory(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

      Category saveCategory(Category category)
    • removeCategory

      void removeCategory(Category category)
    • removeProduct

      void removeProduct(Product product)
    • removeSku

      void removeSku(Sku sku)
    • findCategoryById

      Category findCategoryById(Long categoryId)
    • findCategoryByExternalId

      Category findCategoryByExternalId(String externalId)
    • findCategoryByName

      @Deprecated(forRemoval=true) Category findCategoryByName(String categoryName)
      Deprecated, for removal: This API element is subject to removal in a future version.
      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 by
      limit - the maximum number of results to return
      offset - 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()
    • findAllSkus

      List<Sku> findAllSkus(int offset, int limit)
    • findSkusByIds

      List<Sku> findSkusByIds(List<Long> ids)
    • findSkuById

      Sku findSkuById(Long skuId)
    • findSkuByExternalId

      Sku findSkuByExternalId(String externalId)
    • findSkuByUpc

      Sku findSkuByUpc(String upc)
      Method to look up a Sku by the Universal Product Code (UPC).
      Parameters:
      upc -
      Returns:
    • 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)
    • findTotalCategoryCount

      Long findTotalCategoryCount()
    • 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:
    • findOriginalCategoryByURI

      Category findOriginalCategoryByURI(String uri)
    • 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:
    • findOriginalProductByURI

      Product findOriginalProductByURI(String uri)
    • findSkuByURI

      Sku findSkuByURI(String uri)
      Returns a sku associated with the passed in URI or null if no sku is mapped to this URI.
      Parameters:
      uri -
      Returns:
    • findAssignedProductOptionsByProductId

      List<AssignedProductOptionDTO> findAssignedProductOptionsByProductId(Long productId)
      Returns a list of AssignedProductOptionDTO found for given the productId.
      Parameters:
      productId -
      Returns:
    • findAssignedProductOptionsByProduct

      List<AssignedProductOptionDTO> findAssignedProductOptionsByProduct(Product product)
      Returns a list of AssignedProductOptionDTO found for given the Product.
      Parameters:
      product -
      Returns:
    • countProductsUsingProductOptionById

      Long countProductsUsingProductOptionById(Long productOptionId)
    • findProductIdsUsingProductOptionById

      List<Long> findProductIdsUsingProductOptionById(Long productOptionId, int start, int pageSize)
      Returns a paginated list of Product Ids that are using the passed in ProductOption ID
      Parameters:
      productOptionId -
      start -
      pageSize -
      Returns:
    • translateItemAttributeValue

      String translateItemAttributeValue(OrderItemAttribute itemAttribute, ProductOption productOption)
      Returns a translated String attribute value for OrderItemAttribute
      Parameters:
      itemAttribute -
      productOption -
      Returns: