Interface VendorService

All Known Implementing Classes:
DefaultVendorService

public interface VendorService
Service with Vendor related methods
  • Method Details

    • getVendorByCode

      Optional<VendorModel> getVendorByCode(String vendorCode)
      Get vendor for a given code
      Parameters:
      vendorCode - vendor code
      Returns:
      VendorModel if vendor exist otherwise return empty option
    • getVendorByUserId

      Optional<VendorModel> getVendorByUserId(String userId)
      Get vendor for a given userId
      Parameters:
      userId - user name
      Returns:
      VendorModel if vendor exist otherwise return empty option
    • getActiveVendors

      Set<VendorModel> getActiveVendors()
      Get all active vendors
      Returns:
      all active vendors
    • deactivateVendor

      void deactivateVendor(VendorModel vendor)
      Deactivate a specific vendor
      Parameters:
      vendor - the specific vendor
    • activateVendor

      void activateVendor(VendorModel vendor)
      Activate a specific vendor
      Parameters:
      vendor - the specific vendor
    • getActiveCatalogs

      Set<CatalogModel> getActiveCatalogs()
      Find all active catalog version including product catalog and classification.
      Returns:
      Set of CatalogModel
    • getActiveProductCatalogVersions

      Set<CatalogVersionModel> getActiveProductCatalogVersions()
      Find all active product active catalogVersions
      Returns:
      Set of Active Catalog Version
    • getVendorByProduct

      Optional<VendorModel> getVendorByProduct(ProductModel product)
      Find vendor that the given product belongs to
      Parameters:
      product - product to check
      Returns:
      An optional containing the specific vendor or an empty optional otherwise
    • getVendorForConsignmentCode

      Optional<VendorModel> getVendorForConsignmentCode(String consignmentCode)
      Find vendor that the given consignment belongs to
      Parameters:
      consignmentCode - code of the consignment
      Returns:
      An optional containing the specific vendor or an empty optional otherwise
    • createVendor

      void createVendor(VendorModel vendor, boolean useCustomPage)
      Initialize vendor data for create vendor.
      Parameters:
      vendor - the target vendor model to save
      useCustomPage - if true will assign a vendor page to this vendor.
    • getVendorCategories

      Collection<CategoryModel> getVendorCategories(String vendorCode)
      Find all categories and subcategories belongs to given vendor recursively
      Parameters:
      vendorCode - code of vendor
      Returns:
      collection of category
    • getIndexVendors

      SearchPageData<VendorModel> getIndexVendors(PageableData pageableData)
      Get expected vendors shown in index page
      Parameters:
      pageableData - the pagination data
      Returns:
      all expected vendors