Interface Catalog

  • All Known Implementing Classes:
    CatalogImpl

    public interface Catalog
    The catalog maintains a view of the inventory known to our application.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      int addToCart​(int id, String validEmail)
      Adds the selected product to the users' shopping cart and returns the count of items.
      List<Product> getProducts​(int offset, int limit)
      Returns a list of products in the catalog chunked into page sizes.
    • Method Detail

      • getProducts

        List<Product> getProducts​(int offset,
                                  int limit)
        Returns a list of products in the catalog chunked into page sizes.
        Parameters:
        offset -
        limit -
        Returns:
        list of products matching the paging criteria
      • addToCart

        int addToCart​(int id,
                      String validEmail)
        Adds the selected product to the users' shopping cart and returns the count of items.
        Parameters:
        id -
        validEmail -
        Returns:
        number of items in cart