Class DefaultVendorService
java.lang.Object
de.hybris.platform.marketplaceservices.vendor.impl.DefaultVendorService
- All Implemented Interfaces:
VendorService
Default implementation for
VendorService.-
Constructor Summary
Constructors -
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 vendorsprotected CategoryServiceprotected IndexedVendorsLookupStrategygetIndexVendors(PageableData pageableData) Get expected vendors shown in index pageprotected UserDaoprotected VendorActivationStrategygetVendorByCode(String code) 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 recursivelyprotected VendorCreationStrategyprotected VendorDaoprotected VendorDeactivationStrategygetVendorForConsignmentCode(String consignmentCode) Find vendor that the given consignment belongs tovoidsetCategoryService(CategoryService categoryService) voidsetIndexedVendorsLookupStrategy(IndexedVendorsLookupStrategy indexedVendorsLookupStrategy) voidsetUserDao(UserDao userDao) voidsetVendorActivationStrategy(VendorActivationStrategy vendorActivationStrategy) voidsetVendorCreationStrategy(VendorCreationStrategy vendorCreationStrategy) voidsetVendorDao(VendorDao vendorDao) voidsetVendorDeactivationStrategy(VendorDeactivationStrategy vendorDeactivationStrategy)
-
Constructor Details
-
DefaultVendorService
public DefaultVendorService()
-
-
Method Details
-
getVendorByCode
Description copied from interface:VendorServiceGet vendor for a given code- Specified by:
getVendorByCodein interfaceVendorService- Parameters:
code- vendor code- Returns:
- VendorModel if vendor exist otherwise return empty option
-
getVendorByUserId
Description copied from interface:VendorServiceGet vendor for a given userId- Specified by:
getVendorByUserIdin interfaceVendorService- Parameters:
userId- user name- Returns:
- VendorModel if vendor exist otherwise return empty option
-
getActiveVendors
Description copied from interface:VendorServiceGet all active vendors- Specified by:
getActiveVendorsin interfaceVendorService- Returns:
- all active vendors
-
deactivateVendor
Description copied from interface:VendorServiceDeactivate a specific vendor- Specified by:
deactivateVendorin interfaceVendorService- Parameters:
vendor- the specific vendor
-
activateVendor
Description copied from interface:VendorServiceActivate a specific vendor- Specified by:
activateVendorin interfaceVendorService- Parameters:
vendor- the specific vendor
-
getActiveCatalogs
Description copied from interface:VendorServiceFind all active catalog version including product catalog and classification.- Specified by:
getActiveCatalogsin interfaceVendorService- Returns:
- Set of CatalogModel
-
getActiveProductCatalogVersions
Description copied from interface:VendorServiceFind all active product active catalogVersions- Specified by:
getActiveProductCatalogVersionsin interfaceVendorService- Returns:
- Set of Active Catalog Version
-
getVendorByProduct
Description copied from interface:VendorServiceFind vendor that the given product belongs to- Specified by:
getVendorByProductin interfaceVendorService- Parameters:
product- product to check- Returns:
- An optional containing the specific vendor or an empty optional otherwise
-
getVendorForConsignmentCode
Description copied from interface:VendorServiceFind vendor that the given consignment belongs to- Specified by:
getVendorForConsignmentCodein interfaceVendorService- Parameters:
consignmentCode- code of the consignment- Returns:
- An optional containing the specific vendor or an empty optional otherwise
-
createVendor
Description copied from interface:VendorServiceInitialize vendor data for create vendor.- Specified by:
createVendorin interfaceVendorService- Parameters:
vendor- the target vendor model to saveuseCustomPage- if true will assign a vendor page to this vendor.
-
getVendorCategories
Description copied from interface:VendorServiceFind all categories and subcategories belongs to given vendor recursively- Specified by:
getVendorCategoriesin interfaceVendorService- Parameters:
vendorCode- code of vendor- Returns:
- collection of category
-
getIndexVendors
Description copied from interface:VendorServiceGet expected vendors shown in index page- Specified by:
getIndexVendorsin interfaceVendorService- Parameters:
pageableData- the pagination data- Returns:
- all expected vendors
-
getVendorDao
-
getUserDao
-
setUserDao
-
setVendorDao
-
getVendorActivationStrategy
-
setVendorActivationStrategy
-
getVendorDeactivationStrategy
-
setVendorDeactivationStrategy
-
getVendorCreationStrategy
-
setVendorCreationStrategy
-
getCategoryService
-
setCategoryService
-
getIndexedVendorsLookupStrategy
-
setIndexedVendorsLookupStrategy
public void setIndexedVendorsLookupStrategy(IndexedVendorsLookupStrategy indexedVendorsLookupStrategy)
-