Interface ProductProvider

All Known Implementing Classes:
AbstractProductProvider, AliExpressProvider, AmazonProvider, GenericProvider

public interface ProductProvider
Contract for all product extraction providers.

Each implementation is responsible for extracting product data from a specific type of website (e.g. Amazon, AliExpress, etc.).

Providers must be stateless and thread-safe.

Version:
1.0.0
Author:
Dineth Dilhara
  • Method Summary

    Modifier and Type
    Method
    Description
    Extracts product information from the given URL.
    boolean
    Checks whether this provider can handle the given URL.
  • Method Details

    • supports

      boolean supports(String url)
      Checks whether this provider can handle the given URL.
      Parameters:
      url - product page URL
      Returns:
      true if provider supports the URL, false otherwise
    • extract

      ProductDetails extract(String url)
      Extracts product information from the given URL.
      Parameters:
      url - product page URL
      Returns:
      extracted ProductDetails