Class DefaultVendorService

    • Constructor Detail

      • DefaultVendorService

        public DefaultVendorService()
    • Method Detail

      • getVendorByCode

        public java.util.Optional<VendorModel> getVendorByCode​(java.lang.String code)
        Description copied from interface: VendorService
        Get vendor for a given code
        Specified by:
        getVendorByCode in interface VendorService
        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: VendorService
        Get vendor for a given userId
        Specified by:
        getVendorByUserId in interface VendorService
        Parameters:
        userId - user name
        Returns:
        VendorModel if vendor exist otherwise return empty option
      • getActiveCatalogs

        public java.util.Set<CatalogModel> getActiveCatalogs()
        Description copied from interface: VendorService
        Find all active catalog version including product catalog and classification.
        Specified by:
        getActiveCatalogs in interface VendorService
        Returns:
        Set of CatalogModel
      • getVendorByProduct

        public java.util.Optional<VendorModel> getVendorByProduct​(ProductModel product)
        Description copied from interface: VendorService
        Find vendor that the given product belongs to
        Specified by:
        getVendorByProduct in interface VendorService
        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: VendorService
        Find vendor that the given consignment belongs to
        Specified by:
        getVendorForConsignmentCode in interface VendorService
        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: VendorService
        Initialize vendor data for create vendor.
        Specified by:
        createVendor in interface VendorService
        Parameters:
        vendor - the target vendor model to save
        useCustomPage - 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: VendorService
        Find all categories and subcategories belongs to given vendor recursively
        Specified by:
        getVendorCategories in interface VendorService
        Parameters:
        vendorCode - code of vendor
        Returns:
        collection of category
      • getVendorDao

        protected VendorDao getVendorDao()
      • getUserDao

        protected UserDao getUserDao()
      • setUserDao

        public void setUserDao​(UserDao userDao)
      • setVendorDao

        public void setVendorDao​(VendorDao vendorDao)
      • setVendorActivationStrategy

        public void setVendorActivationStrategy​(VendorActivationStrategy vendorActivationStrategy)
      • setVendorDeactivationStrategy

        public void setVendorDeactivationStrategy​(VendorDeactivationStrategy vendorDeactivationStrategy)
      • setVendorCreationStrategy

        public void setVendorCreationStrategy​(VendorCreationStrategy vendorCreationStrategy)
      • setCategoryService

        public void setCategoryService​(CategoryService categoryService)
      • setIndexedVendorsLookupStrategy

        public void setIndexedVendorsLookupStrategy​(IndexedVendorsLookupStrategy indexedVendorsLookupStrategy)