com.parthparekh
Interface ProductService

All Known Implementing Classes:
ProductCacheService, ProductServiceImpl

public interface ProductService

Interface for ProductService - defines the basic operations that Product service offers


Method Summary
 Product createProduct(Product product)
          creates a product with name, description and price
 java.util.List<Product> getAll()
          retrieves all the available products
 Product getProduct(java.lang.String id)
          retrieves product information from id
 Product updateProduct(java.lang.String id, Product product)
          update product information
 

Method Detail

createProduct

Product createProduct(Product product)
creates a product with name, description and price

Parameters:
product - - product containing name, description, status and price
Returns:
returns the product persisted in db

getProduct

Product getProduct(java.lang.String id)
retrieves product information from id

Parameters:
id - - product id
Returns:
returns the product from db

getAll

java.util.List<Product> getAll()
retrieves all the available products

Returns:
returns all the products stored in db

updateProduct

Product updateProduct(java.lang.String id,
                      Product product)
update product information

Parameters:
id - - product identifier to update
product - - product object containing updated fields
Returns:
returns the updated product