com.parthparekh
Interface ProductWebService

All Known Implementing Classes:
ProductWebServiceImpl

public interface ProductWebService

Interface for ProductWebService - defines the basic operations that Product web 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)
          retrieve 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 JSON containing name, description, status and price
Returns:
returns the product that is persisted

getProduct

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

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

getAll

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

Returns:
returns all the products from db

updateProduct

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

Parameters:
id - - product identifier for the existing product to update
product - - Product JSON containing updated name, description, status and/or price
Returns:
returns the product that was updated