Interface VendorService
-
- All Known Implementing Classes:
DefaultVendorService
public interface VendorServiceService with Vendor related methods
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidactivateVendor(VendorModel vendor)Activate a specific vendorvoidcreateVendor(VendorModel vendor, boolean useCustomPage)Initialize vendor data for create vendor.voiddeactivateVendor(VendorModel vendor)Deactivate a specific vendorjava.util.Set<CatalogModel>getActiveCatalogs()Find all active catalog version including product catalog and classification.java.util.Set<CatalogVersionModel>getActiveProductCatalogVersions()Find all active product active catalogVersionsjava.util.Set<VendorModel>getActiveVendors()Get all active vendorsSearchPageData<VendorModel>getIndexVendors(PageableData pageableData)Get expected vendors shown in index pagejava.util.Optional<VendorModel>getVendorByCode(java.lang.String vendorCode)Get vendor for a given codejava.util.Optional<VendorModel>getVendorByProduct(ProductModel product)Find vendor that the given product belongs tojava.util.Optional<VendorModel>getVendorByUserId(java.lang.String userId)Get vendor for a given userIdjava.util.Collection<CategoryModel>getVendorCategories(java.lang.String vendorCode)Find all categories and subcategories belongs to given vendor recursivelyjava.util.Optional<VendorModel>getVendorForConsignmentCode(java.lang.String consignmentCode)Find vendor that the given consignment belongs to
-
-
-
Method Detail
-
getVendorByCode
java.util.Optional<VendorModel> getVendorByCode(java.lang.String vendorCode)
Get vendor for a given code- Parameters:
vendorCode- vendor code- Returns:
- VendorModel if vendor exist otherwise return empty option
-
getVendorByUserId
java.util.Optional<VendorModel> getVendorByUserId(java.lang.String userId)
Get vendor for a given userId- Parameters:
userId- user name- Returns:
- VendorModel if vendor exist otherwise return empty option
-
getActiveVendors
java.util.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
java.util.Set<CatalogModel> getActiveCatalogs()
Find all active catalog version including product catalog and classification.- Returns:
- Set of CatalogModel
-
getActiveProductCatalogVersions
java.util.Set<CatalogVersionModel> getActiveProductCatalogVersions()
Find all active product active catalogVersions- Returns:
- Set of Active Catalog Version
-
getVendorByProduct
java.util.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
java.util.Optional<VendorModel> getVendorForConsignmentCode(java.lang.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 saveuseCustomPage- if true will assign a vendor page to this vendor.
-
getVendorCategories
java.util.Collection<CategoryModel> getVendorCategories(java.lang.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
-
-