Interface VendorService
- All Known Implementing Classes:
DefaultVendorService
public interface VendorService
Service with Vendor related methods
-
Method Summary
Modifier and TypeMethodDescriptionvoidactivateVendor(VendorModel vendor) Activate a specific vendorvoidcreateVendor(VendorModel vendor, boolean useCustomPage) Initialize vendor data for create vendor.voiddeactivateVendor(VendorModel vendor) Deactivate a specific vendorFind all active catalog version including product catalog and classification.Find all active product active catalogVersionsGet all active vendorsgetIndexVendors(PageableData pageableData) Get expected vendors shown in index pagegetVendorByCode(String vendorCode) Get vendor for a given codegetVendorByProduct(ProductModel product) Find vendor that the given product belongs togetVendorByUserId(String userId) Get vendor for a given userIdgetVendorCategories(String vendorCode) Find all categories and subcategories belongs to given vendor recursivelygetVendorForConsignmentCode(String consignmentCode) Find vendor that the given consignment belongs to
-
Method Details
-
getVendorByCode
Get vendor for a given code- Parameters:
vendorCode- vendor code- Returns:
- VendorModel if vendor exist otherwise return empty option
-
getVendorByUserId
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
Deactivate a specific vendor- Parameters:
vendor- the specific vendor
-
activateVendor
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
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
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
Initialize vendor data for create vendor.- Parameters:
vendor- the target vendor model to saveuseCustomPage- if true will assign a vendor page to this vendor.
-
getVendorCategories
Find all categories and subcategories belongs to given vendor recursively- Parameters:
vendorCode- code of vendor- Returns:
- collection of category
-
getIndexVendors
Get expected vendors shown in index page- Parameters:
pageableData- the pagination data- Returns:
- all expected vendors
-