Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * #%L
   * BroadleafCommerce Framework
   * %%
   * Copyright (C) 2009 - 2013 Broadleaf Commerce
   * %%
   * Licensed under the Apache License, Version 2.0 (the "License");
   * you may not use this file except in compliance with the License.
   * You may obtain a copy of the License at
  * 
  *       http://www.apache.org/licenses/LICENSE-2.0
  * 
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  * #L%
  */
 package org.broadleafcommerce.core.catalog.service;
 
 
 import java.util.Date;
 import java.util.List;
 import java.util.Map;
 
 public interface CatalogService {
 
     public Product saveProduct(Product product);
 
     public Product findProductById(Long productId);
 
     public List<ProductfindProductsByName(String searchName);

    
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
 
     public List<ProductfindProductsByName(String searchNameint limitint offset);
 
     public List<ProductfindActiveProductsByCategory(Category category);

    

Deprecated:
Use findActiveProductsByCategory
Parameters:
category
currentDate
Returns:
 
     public List<ProductfindActiveProductsByCategory(Category categoryDate currentDate);
    
    
Given a category and a ProudctSearchCriteria, returns the appropriate matching products

Parameters:
category
searchCriteria
Returns:
the matching products
 
     public List<ProductfindFilteredActiveProductsByCategory(Category categoryProductSearchCriteria searchCriteria);

    
 
     public List<ProductfindFilteredActiveProductsByCategory(Category categoryDate currentDateProductSearchCriteria searchCriteria);
    
    
Given a search query and a ProductSearchCriteria, returns the appropriate matching products

Parameters:
query
searchCriteria
Returns:
the matching products
 
     public List<ProductfindFilteredActiveProductsByQuery(String queryProductSearchCriteria searchCriteria);

    
 
     public List<ProductfindFilteredActiveProductsByQuery(String queryDate currentDateProductSearchCriteria searchCriteria);

    
Same as findActiveProductsByCategory(org.broadleafcommerce.core.catalog.domain.Category) but allowing for pagination.

Parameters:
category
limit
offset
Returns:
    public List<ProductfindActiveProductsByCategory(Category categoryint limitint offset);

    

Deprecated:
Use findActiveProductsByCategory(Category, limit, offset
    public List<ProductfindActiveProductsByCategory(Category categoryDate currentDateint limitint offset);

    
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:
    public Category saveCategory(Category category);
    
    public void removeCategory(Category category);
    public void removeProduct(Product product);
    public Category findCategoryById(Long categoryId);

    
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(java.lang.String) instead.

Parameters:
categoryName the category name to search by
Returns:
the Category instance matching the categoryName
    @Deprecated
    public Category findCategoryByName(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
    public List<CategoryfindCategoriesByName(String categoryName);

    
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
    public List<CategoryfindCategoriesByName(String categoryNameint limitint offset);
    public List<CategoryfindAllCategories();
    public List<CategoryfindAllCategories(int limitint offset);
    public List<ProductfindAllProducts();
    public List<ProductfindAllProducts(int limitint offset);
    public List<ProductfindProductsForCategory(Category category);
    public List<ProductfindProductsForCategory(Category categoryint limitint offset);
    public Sku saveSku(Sku sku);
    
    public SkuFee saveSkuFee(SkuFee fee);
    public List<SkufindAllSkus();
    public List<SkufindSkusByIds(List<Longids);
    public Sku findSkuById(Long skuId);

    
Get a hierarchical map of all child categories keyed on the url

Deprecated:
this approach is inherently inefficient - don't use.
Parameters:
categoryId the parent category to which the children belong
Returns:
hierarchical map of all child categories
    @Deprecated
    public Map<StringList<Long>> getChildCategoryURLMapByCategoryId(Long categoryId);
    public Category createCategory();
    
    public Sku createSku();
    
    public Product createProduct(ProductType productType);
    
    public List<CategoryfindAllSubCategories(Category category);
    public List<CategoryfindAllSubCategories(Category categoryint limitint offset);
    public List<CategoryfindActiveSubCategoriesByCategory(Category categoryint limitint offset);
    
    
    
    public ProductOption findProductOptionById(Long productOptionId);
    
    public ProductOptionValue findProductOptionValueById(Long productOptionValueId);
    
    
Returns a category associated with the passed in URI or null if no Category is mapped to this URI.

Parameters:
uri
Returns:
    public Category findCategoryByURI(String uri);
    
    
Returns a product associated with the passed in URI or null if no Product is mapped to this URI.

Parameters:
uri
Returns:
    
    public Product findProductByURI(String uri);
New to GrepCode? Check out our FAQ X