catalog.model.service
Interface CatalogService

All Known Implementing Classes:
CachedCatalogServiceImpl, CatalogServiceImpl

public interface CatalogService

The catalog business service interface.

This class contains catalog management related businss logic.

Author:
Derek Y. Shen

Method Summary
 void deleteProduct(Product product)
          Delete product.
 java.util.List getAllCategories()
          Get all categories.
 java.util.List getAllProducts()
          Get all products.
 Category getCategory(java.lang.String categoryId)
          Get category by id.
 Product getProduct(java.lang.String productId)
          Get product by product id.
 Product saveProduct(Product product)
          Save the product.
 void updateProduct(Product product)
          Update product.
 

Method Detail

saveProduct

public Product saveProduct(Product product)
                    throws CatalogException
Save the product.

Parameters:
product - the product to be saved
Returns:
the product saved
Throws:
CatalogException

updateProduct

public void updateProduct(Product product)
                   throws CatalogException
Update product.

Parameters:
product - the product to be updated
Throws:
CatalogException

deleteProduct

public void deleteProduct(Product product)
                   throws CatalogException
Delete product.

Parameters:
product - the product to be deleted
Throws:
CatalogException

getProduct

public Product getProduct(java.lang.String productId)
                   throws CatalogException
Get product by product id.

Parameters:
productId - the product id
Returns:
the product associated with the product id
Throws:
CatalogException

getCategory

public Category getCategory(java.lang.String categoryId)
                     throws CatalogException
Get category by id.

Parameters:
categoryId - the category id
Returns:
the category associated with the category id
Throws:
CatalogException

getAllProducts

public java.util.List getAllProducts()
                              throws CatalogException
Get all products.

Returns:
a list with all products
Throws:
CatalogException

getAllCategories

public java.util.List getAllCategories()
                                throws CatalogException
Get all categories.

Returns:
a list with all categories
Throws:
CatalogException


Copyright (c) 2004 The JCatalog Project.