Class DefaultVendorService
- java.lang.Object
-
- de.hybris.platform.marketplaceservices.vendor.impl.DefaultVendorService
-
- All Implemented Interfaces:
VendorService
public class DefaultVendorService extends java.lang.Object implements VendorService
Default implementation forVendorService.
-
-
Constructor Summary
Constructors Constructor Description DefaultVendorService()
-
Method Summary
All Methods Instance Methods Concrete 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 vendorsprotected CategoryServicegetCategoryService()protected IndexedVendorsLookupStrategygetIndexedVendorsLookupStrategy()SearchPageData<VendorModel>getIndexVendors(PageableData pageableData)Get expected vendors shown in index pageprotected UserDaogetUserDao()protected VendorActivationStrategygetVendorActivationStrategy()java.util.Optional<VendorModel>getVendorByCode(java.lang.String code)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 recursivelyprotected VendorCreationStrategygetVendorCreationStrategy()protected VendorDaogetVendorDao()protected VendorDeactivationStrategygetVendorDeactivationStrategy()java.util.Optional<VendorModel>getVendorForConsignmentCode(java.lang.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)
-
-
-
Method Detail
-
getVendorByCode
public java.util.Optional<VendorModel> getVendorByCode(java.lang.String code)
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
public java.util.Optional<VendorModel> getVendorByUserId(java.lang.String userId)
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
public java.util.Set<VendorModel> getActiveVendors()
Description copied from interface:VendorServiceGet all active vendors- Specified by:
getActiveVendorsin interfaceVendorService- Returns:
- all active vendors
-
deactivateVendor
public void deactivateVendor(VendorModel vendor)
Description copied from interface:VendorServiceDeactivate a specific vendor- Specified by:
deactivateVendorin interfaceVendorService- Parameters:
vendor- the specific vendor
-
activateVendor
public void activateVendor(VendorModel vendor)
Description copied from interface:VendorServiceActivate a specific vendor- Specified by:
activateVendorin interfaceVendorService- Parameters:
vendor- the specific vendor
-
getActiveCatalogs
public java.util.Set<CatalogModel> getActiveCatalogs()
Description copied from interface:VendorServiceFind all active catalog version including product catalog and classification.- Specified by:
getActiveCatalogsin interfaceVendorService- Returns:
- Set of CatalogModel
-
getActiveProductCatalogVersions
public java.util.Set<CatalogVersionModel> getActiveProductCatalogVersions()
Description copied from interface:VendorServiceFind all active product active catalogVersions- Specified by:
getActiveProductCatalogVersionsin interfaceVendorService- Returns:
- Set of Active Catalog Version
-
getVendorByProduct
public java.util.Optional<VendorModel> getVendorByProduct(ProductModel product)
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
public java.util.Optional<VendorModel> getVendorForConsignmentCode(java.lang.String consignmentCode)
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
public void createVendor(VendorModel vendor, boolean useCustomPage)
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
public java.util.Collection<CategoryModel> getVendorCategories(java.lang.String vendorCode)
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
public SearchPageData<VendorModel> getIndexVendors(PageableData pageableData)
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
protected VendorDao getVendorDao()
-
getUserDao
protected UserDao getUserDao()
-
setUserDao
public void setUserDao(UserDao userDao)
-
setVendorDao
public void setVendorDao(VendorDao vendorDao)
-
getVendorActivationStrategy
protected VendorActivationStrategy getVendorActivationStrategy()
-
setVendorActivationStrategy
public void setVendorActivationStrategy(VendorActivationStrategy vendorActivationStrategy)
-
getVendorDeactivationStrategy
protected VendorDeactivationStrategy getVendorDeactivationStrategy()
-
setVendorDeactivationStrategy
public void setVendorDeactivationStrategy(VendorDeactivationStrategy vendorDeactivationStrategy)
-
getVendorCreationStrategy
protected VendorCreationStrategy getVendorCreationStrategy()
-
setVendorCreationStrategy
public void setVendorCreationStrategy(VendorCreationStrategy vendorCreationStrategy)
-
getCategoryService
protected CategoryService getCategoryService()
-
setCategoryService
public void setCategoryService(CategoryService categoryService)
-
getIndexedVendorsLookupStrategy
protected IndexedVendorsLookupStrategy getIndexedVendorsLookupStrategy()
-
setIndexedVendorsLookupStrategy
public void setIndexedVendorsLookupStrategy(IndexedVendorsLookupStrategy indexedVendorsLookupStrategy)
-
-