Search in sources :

Example 1 with Category

use of com.salesmanager.core.model.catalog.category.Category in project shopizer by shopizer-ecommerce.

the class ReadableProductDefinitionMapper method merge.

@Override
public ReadableProductDefinition merge(Product source, ReadableProductDefinition destination, MerchantStore store, Language language) {
    Validate.notNull(source, "Product cannot be null");
    Validate.notNull(destination, "Product destination cannot be null");
    ReadableProductDefinition returnDestination = destination;
    if (language == null) {
        returnDestination = new ReadableProductDefinitionFull();
    }
    List<com.salesmanager.shop.model.catalog.product.ProductDescription> fulldescriptions = new ArrayList<com.salesmanager.shop.model.catalog.product.ProductDescription>();
    returnDestination.setIdentifier(source.getSku());
    returnDestination.setId(source.getId());
    returnDestination.setVisible(source.isAvailable());
    returnDestination.setDateAvailable(DateUtil.formatDate(source.getDateAvailable()));
    ProductDescription description = null;
    if (source.getDescriptions() != null && source.getDescriptions().size() > 0) {
        for (ProductDescription desc : source.getDescriptions()) {
            if (language != null && desc.getLanguage() != null && desc.getLanguage().getId().intValue() == language.getId().intValue()) {
                description = desc;
                break;
            } else {
                fulldescriptions.add(populateDescription(desc));
            }
        }
    }
    if (description != null) {
        com.salesmanager.shop.model.catalog.product.ProductDescription tragetDescription = populateDescription(description);
        returnDestination.setDescription(tragetDescription);
    }
    if (source.getManufacturer() != null) {
        ReadableManufacturer manufacturer = readableManufacturerMapper.convert(source.getManufacturer(), store, language);
        returnDestination.setManufacturer(manufacturer);
    }
    if (!CollectionUtils.isEmpty(source.getCategories())) {
        List<ReadableCategory> categoryList = new ArrayList<ReadableCategory>();
        for (Category category : source.getCategories()) {
            ReadableCategory readableCategory = readableCategoryMapper.convert(category, store, language);
            categoryList.add(readableCategory);
        }
        returnDestination.setCategories(categoryList);
    }
    ProductSpecification specifications = new ProductSpecification();
    specifications.setHeight(source.getProductHeight());
    specifications.setLength(source.getProductLength());
    specifications.setWeight(source.getProductWeight());
    specifications.setWidth(source.getProductWidth());
    if (!StringUtils.isBlank(store.getSeizeunitcode())) {
        specifications.setDimensionUnitOfMeasure(DimensionUnitOfMeasure.valueOf(store.getSeizeunitcode().toLowerCase()));
    }
    if (!StringUtils.isBlank(store.getWeightunitcode())) {
        specifications.setWeightUnitOfMeasure(WeightUnitOfMeasure.valueOf(store.getWeightunitcode().toLowerCase()));
    }
    returnDestination.setProductSpecifications(specifications);
    if (source.getType() != null) {
        ReadableProductType readableType = readableProductTypeMapper.convert(source.getType(), store, language);
        returnDestination.setType(readableType);
    }
    returnDestination.setSortOrder(source.getSortOrder());
    // images
    Set<ProductImage> images = source.getImages();
    if (CollectionUtils.isNotEmpty(images)) {
        List<ReadableImage> imageList = images.stream().map(i -> this.convertImage(source, i, store)).collect(Collectors.toList());
        returnDestination.setImages(imageList);
    }
    // quantity
    ProductAvailability availability = null;
    for (ProductAvailability a : source.getAvailabilities()) {
        availability = a;
        returnDestination.setCanBePurchased(availability.getProductStatus());
        returnDestination.setQuantity(availability.getProductQuantity() == null ? 1 : availability.getProductQuantity());
    }
    FinalPrice price = null;
    try {
        price = pricingService.calculateProductPrice(source);
    } catch (ServiceException e) {
        throw new ConversionRuntimeException("Unable to get product price", e);
    }
    if (price != null) {
        returnDestination.setPrice(price.getStringPrice());
    }
    if (returnDestination instanceof ReadableProductDefinitionFull) {
        ((ReadableProductDefinitionFull) returnDestination).setDescriptions(fulldescriptions);
    }
    return returnDestination;
}
Also used : DateUtil(com.salesmanager.shop.utils.DateUtil) Autowired(org.springframework.beans.factory.annotation.Autowired) StringUtils(org.apache.commons.lang3.StringUtils) CollectionUtils(org.apache.commons.collections4.CollectionUtils) ArrayList(java.util.ArrayList) ServiceException(com.salesmanager.core.business.exception.ServiceException) Language(com.salesmanager.core.model.reference.language.Language) MerchantStore(com.salesmanager.core.model.merchant.MerchantStore) ConversionRuntimeException(com.salesmanager.shop.store.api.exception.ConversionRuntimeException) FinalPrice(com.salesmanager.core.model.catalog.product.price.FinalPrice) ReadableImage(com.salesmanager.shop.model.catalog.product.ReadableImage) ReadableProductDefinition(com.salesmanager.shop.model.catalog.product.product.definition.ReadableProductDefinition) DimensionUnitOfMeasure(com.salesmanager.shop.model.references.DimensionUnitOfMeasure) Qualifier(org.springframework.beans.factory.annotation.Qualifier) PricingService(com.salesmanager.core.business.services.catalog.product.PricingService) ReadableProductDefinitionFull(com.salesmanager.shop.model.catalog.product.product.definition.ReadableProductDefinitionFull) Mapper(com.salesmanager.shop.mapper.Mapper) Product(com.salesmanager.core.model.catalog.product.Product) ReadableProductType(com.salesmanager.shop.model.catalog.product.type.ReadableProductType) Set(java.util.Set) ImageFilePath(com.salesmanager.shop.utils.ImageFilePath) Collectors(java.util.stream.Collectors) Category(com.salesmanager.core.model.catalog.category.Category) ReadableManufacturer(com.salesmanager.shop.model.catalog.manufacturer.ReadableManufacturer) List(java.util.List) Component(org.springframework.stereotype.Component) Validate(org.apache.commons.lang3.Validate) ProductImage(com.salesmanager.core.model.catalog.product.image.ProductImage) ReadableCategory(com.salesmanager.shop.model.catalog.category.ReadableCategory) ProductSpecification(com.salesmanager.shop.model.catalog.product.ProductSpecification) ProductAvailability(com.salesmanager.core.model.catalog.product.availability.ProductAvailability) ProductDescription(com.salesmanager.core.model.catalog.product.description.ProductDescription) WeightUnitOfMeasure(com.salesmanager.shop.model.references.WeightUnitOfMeasure) Category(com.salesmanager.core.model.catalog.category.Category) ReadableCategory(com.salesmanager.shop.model.catalog.category.ReadableCategory) ProductImage(com.salesmanager.core.model.catalog.product.image.ProductImage) ArrayList(java.util.ArrayList) ReadableImage(com.salesmanager.shop.model.catalog.product.ReadableImage) ProductAvailability(com.salesmanager.core.model.catalog.product.availability.ProductAvailability) ReadableCategory(com.salesmanager.shop.model.catalog.category.ReadableCategory) FinalPrice(com.salesmanager.core.model.catalog.product.price.FinalPrice) ConversionRuntimeException(com.salesmanager.shop.store.api.exception.ConversionRuntimeException) ReadableManufacturer(com.salesmanager.shop.model.catalog.manufacturer.ReadableManufacturer) ReadableProductDefinition(com.salesmanager.shop.model.catalog.product.product.definition.ReadableProductDefinition) ProductSpecification(com.salesmanager.shop.model.catalog.product.ProductSpecification) ReadableProductDefinitionFull(com.salesmanager.shop.model.catalog.product.product.definition.ReadableProductDefinitionFull) ServiceException(com.salesmanager.core.business.exception.ServiceException) ProductDescription(com.salesmanager.core.model.catalog.product.description.ProductDescription) ReadableProductType(com.salesmanager.shop.model.catalog.product.type.ReadableProductType)

Example 2 with Category

use of com.salesmanager.core.model.catalog.category.Category in project shopizer by shopizer-ecommerce.

the class ProductFacadeImpl method addProductToCategory.

@Override
public ReadableProduct addProductToCategory(Category category, Product product, Language language) throws Exception {
    Validate.notNull(category, "Category cannot be null");
    Validate.notNull(product, "Product cannot be null");
    // not alloweed if category already attached
    List<Category> assigned = product.getCategories().stream().filter(cat -> cat.getId().longValue() == category.getId().longValue()).collect(Collectors.toList());
    if (assigned.size() > 0) {
        throw new OperationNotAllowedException("Category with id [" + category.getId() + "] already attached to product [" + product.getId() + "]");
    }
    product.getCategories().add(category);
    productService.update(product);
    ReadableProduct readableProduct = new ReadableProduct();
    ReadableProductPopulator populator = new ReadableProductPopulator();
    populator.setPricingService(pricingService);
    populator.setimageUtils(imageUtils);
    populator.populate(product, readableProduct, product.getMerchantStore(), language);
    return readableProduct;
}
Also used : ProductPrice(com.salesmanager.core.model.catalog.product.price.ProductPrice) Date(java.util.Date) ProductFacade(com.salesmanager.shop.store.controller.product.facade.ProductFacade) StringUtils(org.apache.commons.lang3.StringUtils) LanguageService(com.salesmanager.core.business.services.reference.language.LanguageService) ServiceException(com.salesmanager.core.business.exception.ServiceException) PersistableProduct(com.salesmanager.shop.model.catalog.product.PersistableProduct) MerchantStore(com.salesmanager.core.model.merchant.MerchantStore) FinalPrice(com.salesmanager.core.model.catalog.product.price.FinalPrice) PricingService(com.salesmanager.core.business.services.catalog.product.PricingService) CategoryService(com.salesmanager.core.business.services.catalog.category.CategoryService) ReadableProductPrice(com.salesmanager.shop.model.catalog.product.ReadableProductPrice) CustomerService(com.salesmanager.core.business.services.customer.CustomerService) ReadableProduct(com.salesmanager.shop.model.catalog.product.ReadableProduct) ProductAttribute(com.salesmanager.core.model.catalog.product.attribute.ProductAttribute) ProductCriteria(com.salesmanager.core.model.catalog.product.ProductCriteria) ProductReview(com.salesmanager.core.model.catalog.product.review.ProductReview) ProductRelationshipService(com.salesmanager.core.business.services.catalog.product.relationship.ProductRelationshipService) PersistableProductReviewPopulator(com.salesmanager.shop.populator.catalog.PersistableProductReviewPopulator) Page(org.springframework.data.domain.Page) Collectors(java.util.stream.Collectors) List(java.util.List) LocaleUtils(com.salesmanager.shop.utils.LocaleUtils) ProductRelationship(com.salesmanager.core.model.catalog.product.relationship.ProductRelationship) PersistableProductReview(com.salesmanager.shop.model.catalog.product.PersistableProductReview) ReadableProductPopulator(com.salesmanager.shop.populator.catalog.ReadableProductPopulator) ServiceRuntimeException(com.salesmanager.shop.store.api.exception.ServiceRuntimeException) ProductRelationshipType(com.salesmanager.core.model.catalog.product.relationship.ProductRelationshipType) ProductAvailability(com.salesmanager.core.model.catalog.product.availability.ProductAvailability) ReadableProductList(com.salesmanager.shop.model.catalog.product.ReadableProductList) ProductPriceEntity(com.salesmanager.shop.model.catalog.product.ProductPriceEntity) ProductService(com.salesmanager.core.business.services.catalog.product.ProductService) Constants(com.salesmanager.shop.constants.Constants) DateUtil(com.salesmanager.shop.utils.DateUtil) CollectionUtils(org.apache.commons.collections4.CollectionUtils) PersistableProductPopulator(com.salesmanager.shop.populator.catalog.PersistableProductPopulator) ArrayList(java.util.ArrayList) Inject(javax.inject.Inject) Language(com.salesmanager.core.model.reference.language.Language) ReadableFinalPricePopulator(com.salesmanager.shop.populator.catalog.ReadableFinalPricePopulator) ResourceNotFoundException(com.salesmanager.shop.store.api.exception.ResourceNotFoundException) Service(org.springframework.stereotype.Service) Qualifier(org.springframework.beans.factory.annotation.Qualifier) Manufacturer(com.salesmanager.core.model.catalog.product.manufacturer.Manufacturer) ReadableProductReview(com.salesmanager.shop.model.catalog.product.ReadableProductReview) ProductAttributeService(com.salesmanager.core.business.services.catalog.product.attribute.ProductAttributeService) OperationNotAllowedException(com.salesmanager.shop.store.api.exception.OperationNotAllowedException) ProductReviewService(com.salesmanager.core.business.services.catalog.product.review.ProductReviewService) Product(com.salesmanager.core.model.catalog.product.Product) ProductPriceRequest(com.salesmanager.shop.model.catalog.product.ProductPriceRequest) LightPersistableProduct(com.salesmanager.shop.model.catalog.product.LightPersistableProduct) ImageFilePath(com.salesmanager.shop.utils.ImageFilePath) Profile(org.springframework.context.annotation.Profile) Category(com.salesmanager.core.model.catalog.category.Category) ReadableProductReviewPopulator(com.salesmanager.shop.populator.catalog.ReadableProductReviewPopulator) Validate(org.apache.commons.lang3.Validate) ProductSpecification(com.salesmanager.shop.model.catalog.product.ProductSpecification) Comparator(java.util.Comparator) Category(com.salesmanager.core.model.catalog.category.Category) ReadableProductPopulator(com.salesmanager.shop.populator.catalog.ReadableProductPopulator) ReadableProduct(com.salesmanager.shop.model.catalog.product.ReadableProduct) OperationNotAllowedException(com.salesmanager.shop.store.api.exception.OperationNotAllowedException)

Example 3 with Category

use of com.salesmanager.core.model.catalog.category.Category in project shopizer by shopizer-ecommerce.

the class ShoppingCategoryController method getProducts.

private ProductList getProducts(final int start, final int max, final String store, final String language, final String category, final List<QueryFilter> filters, Model model, HttpServletRequest request, HttpServletResponse response) throws Exception {
    try {
        MerchantStore merchantStore = (MerchantStore) request.getAttribute(Constants.MERCHANT_STORE);
        List<BigDecimal> prices = new ArrayList<BigDecimal>();
        String ref = "";
        if (request.getParameter("ref") != null) {
            ref = request.getParameter("ref");
        }
        request.setAttribute("ref", ref);
        Map<String, Language> langs = languageService.getLanguagesMap();
        if (merchantStore != null) {
            if (!merchantStore.getCode().equals(store)) {
                // reset for the current request
                merchantStore = null;
            }
        }
        if (merchantStore == null) {
            merchantStore = merchantStoreService.getByCode(store);
        }
        if (merchantStore == null) {
            LOGGER.error("Merchant store is null for code " + store);
            // TODO localized message
            response.sendError(503, "Merchant store is null for code " + store);
            return null;
        }
        // get the category by code
        Category cat = categoryService.getBySeUrl(merchantStore, category);
        if (cat == null) {
            LOGGER.error("Category " + category + " is null");
            // TODO localized message
            response.sendError(503, "Category is null");
            return null;
        }
        String lineage = new StringBuilder().append(cat.getLineage()).toString();
        List<Category> categories = categoryService.getListByLineage(store, lineage);
        List<Long> ids = new ArrayList<Long>();
        if (categories != null && categories.size() > 0) {
            for (Category c : categories) {
                if (c.isVisible()) {
                    ids.add(c.getId());
                }
            }
        }
        ids.add(cat.getId());
        Language lang = langs.get(language);
        if (lang == null) {
            lang = langs.get(Constants.DEFAULT_LANGUAGE);
        }
        ProductCriteria productCriteria = new ProductCriteria();
        productCriteria.setMaxCount(max);
        productCriteria.setStartIndex(start);
        productCriteria.setCategoryIds(ids);
        productCriteria.setAvailable(true);
        if (filters != null) {
            for (QueryFilter filter : filters) {
                if (filter.getFilterType().name().equals(QueryFilterType.BRAND.name())) {
                    // the only filter implemented
                    productCriteria.setManufacturerId(filter.getFilterId());
                }
            }
        }
        com.salesmanager.core.model.catalog.product.ProductList products = productService.listByStore(merchantStore, lang, productCriteria);
        ReadableProductPopulator populator = new ReadableProductPopulator();
        populator.setPricingService(pricingService);
        populator.setimageUtils(imageUtils);
        ProductList productList = new ProductList();
        for (Product product : products.getProducts()) {
            // create new proxy product
            ReadableProduct p = populator.populate(product, new ReadableProduct(), merchantStore, lang);
            productList.getProducts().add(p);
            prices.add(p.getPrice());
        }
        /**
         * order products based on the specified order *
         */
        Collections.sort(productList.getProducts(), new Comparator<ReadableProduct>() {

            @Override
            public int compare(ReadableProduct o1, ReadableProduct o2) {
                int order1 = o1.getSortOrder();
                int order2 = o2.getSortOrder();
                return order1 - order2;
            }
        });
        productList.setProductCount(Math.toIntExact(products.getTotalCount()));
        if (CollectionUtils.isNotEmpty(prices)) {
            BigDecimal minPrice = (BigDecimal) Collections.min(prices);
            BigDecimal maxPrice = (BigDecimal) Collections.max(prices);
            if (minPrice != null && maxPrice != null) {
                productList.setMinPrice(minPrice);
                productList.setMaxPrice(maxPrice);
            }
        }
        return productList;
    } catch (Exception e) {
        LOGGER.error("Error while getting products", e);
        response.sendError(503, "An error occured while retrieving products " + e.getMessage());
    }
    return null;
}
Also used : ReadableCategory(com.salesmanager.shop.model.catalog.category.ReadableCategory) Category(com.salesmanager.core.model.catalog.category.Category) ArrayList(java.util.ArrayList) ReadableProduct(com.salesmanager.shop.model.catalog.product.ReadableProduct) Product(com.salesmanager.core.model.catalog.product.Product) Language(com.salesmanager.core.model.reference.language.Language) ReadableProductPopulator(com.salesmanager.shop.populator.catalog.ReadableProductPopulator) MerchantStore(com.salesmanager.core.model.merchant.MerchantStore) ProductCriteria(com.salesmanager.core.model.catalog.product.ProductCriteria) ReadableProduct(com.salesmanager.shop.model.catalog.product.ReadableProduct) BigDecimal(java.math.BigDecimal) ProductList(com.salesmanager.shop.model.catalog.ProductList) QueryFilter(com.salesmanager.shop.store.model.filter.QueryFilter)

Example 4 with Category

use of com.salesmanager.core.model.catalog.category.Category in project shopizer by shopizer-ecommerce.

the class ShoppingCategoryController method getSubCategories.

private List<ReadableCategory> getSubCategories(MerchantStore store, Category category, Map<Long, Long> productCount, Language language, Locale locale) throws Exception {
    // sub categories
    List<Category> subCategories = categoryService.listByParent(category, language);
    ReadableCategoryPopulator populator = new ReadableCategoryPopulator();
    List<ReadableCategory> subCategoryProxies = new ArrayList<ReadableCategory>();
    for (Category sub : subCategories) {
        ReadableCategory cProxy = populator.populate(sub, new ReadableCategory(), store, language);
        if (productCount != null) {
            Long total = productCount.get(cProxy.getId());
            if (total != null) {
                cProxy.setProductCount(total.intValue());
            }
        }
        subCategoryProxies.add(cProxy);
    }
    return subCategoryProxies;
}
Also used : ReadableCategory(com.salesmanager.shop.model.catalog.category.ReadableCategory) Category(com.salesmanager.core.model.catalog.category.Category) ReadableCategory(com.salesmanager.shop.model.catalog.category.ReadableCategory) ArrayList(java.util.ArrayList) ReadableCategoryPopulator(com.salesmanager.shop.populator.catalog.ReadableCategoryPopulator)

Example 5 with Category

use of com.salesmanager.core.model.catalog.category.Category in project shopizer by shopizer-ecommerce.

the class StoreFilter method setTopCategories.

@SuppressWarnings("unchecked")
private void setTopCategories(MerchantStore store, Language language, HttpServletRequest request) throws Exception {
    StringBuilder categoriesKey = new StringBuilder();
    categoriesKey.append(store.getId()).append("_").append(Constants.CATEGORIES_CACHE_KEY).append("-").append(language.getCode());
    StringBuilder categoriesKeyMissed = new StringBuilder();
    categoriesKeyMissed.append(categoriesKey.toString()).append(Constants.MISSED_CACHE_KEY);
    // language code - List of category
    Map<String, List<ReadableCategory>> objects = null;
    List<ReadableCategory> loadedCategories = null;
    if (store.isUseCache()) {
        objects = (Map<String, List<ReadableCategory>>) webApplicationCache.getFromCache(categoriesKey.toString());
        if (objects == null) {
            // load categories
            ReadableCategoryList categoryList = categoryFacade.getCategoryHierarchy(store, null, 0, language, null, 0, // null
            200);
            loadedCategories = categoryList.getCategories();
            // filter out invisible category
            loadedCategories.stream().filter(cat -> cat.isVisible() == true).collect(Collectors.toList());
            objects = new ConcurrentHashMap<String, List<ReadableCategory>>();
            objects.put(language.getCode(), loadedCategories);
            webApplicationCache.putInCache(categoriesKey.toString(), objects);
        } else {
            loadedCategories = objects.get(language.getCode());
        }
    } else {
        ReadableCategoryList categoryList = categoryFacade.getCategoryHierarchy(store, null, 0, language, null, 0, // null // filter
        200);
        loadedCategories = categoryList.getCategories();
    }
    if (loadedCategories != null) {
        request.setAttribute(Constants.REQUEST_TOP_CATEGORIES, loadedCategories);
    }
}
Also used : ContentDescription(com.salesmanager.core.model.content.ContentDescription) LocaleContextHolder(org.springframework.context.i18n.LocaleContextHolder) LoggerFactory(org.slf4j.LoggerFactory) AnonymousCustomer(com.salesmanager.shop.model.customer.AnonymousCustomer) StringUtils(org.apache.commons.lang3.StringUtils) LanguageService(com.salesmanager.core.business.services.reference.language.LanguageService) HandlerInterceptorAdapter(org.springframework.web.servlet.handler.HandlerInterceptorAdapter) MerchantStore(com.salesmanager.core.model.merchant.MerchantStore) Content(com.salesmanager.core.model.content.Content) UserContext(com.salesmanager.core.model.common.UserContext) ContentType(com.salesmanager.core.model.content.ContentType) ReadableCategoryPopulator(com.salesmanager.shop.populator.catalog.ReadableCategoryPopulator) CategoryService(com.salesmanager.core.business.services.catalog.category.CategoryService) MerchantStoreService(com.salesmanager.core.business.services.merchant.MerchantStoreService) SecurityContextHolder(org.springframework.security.core.context.SecurityContextHolder) CustomerService(com.salesmanager.core.business.services.customer.CustomerService) Breadcrumb(com.salesmanager.shop.model.shop.Breadcrumb) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) Collectors(java.util.stream.Collectors) CategoryDescription(com.salesmanager.core.model.catalog.category.CategoryDescription) ModelAndView(org.springframework.web.servlet.ModelAndView) BreadcrumbItem(com.salesmanager.shop.model.shop.BreadcrumbItem) CacheUtils(com.salesmanager.core.business.utils.CacheUtils) MerchantConfiguration(com.salesmanager.core.model.system.MerchantConfiguration) LanguageUtils(com.salesmanager.shop.utils.LanguageUtils) GeoLocationUtils(com.salesmanager.shop.utils.GeoLocationUtils) CoreConfiguration(com.salesmanager.core.business.utils.CoreConfiguration) ReadableCategory(com.salesmanager.shop.model.catalog.category.ReadableCategory) Address(com.salesmanager.shop.model.customer.address.Address) Authentication(org.springframework.security.core.Authentication) WebApplicationCacheUtils(com.salesmanager.shop.utils.WebApplicationCacheUtils) ProductService(com.salesmanager.core.business.services.catalog.product.ProductService) java.util(java.util) CategoryFacade(com.salesmanager.shop.store.controller.category.facade.CategoryFacade) Constants(com.salesmanager.shop.constants.Constants) CollectionUtils(org.apache.commons.collections4.CollectionUtils) Language(com.salesmanager.core.model.reference.language.Language) Inject(javax.inject.Inject) BreadcrumbItemType(com.salesmanager.shop.model.shop.BreadcrumbItemType) HttpServletRequest(javax.servlet.http.HttpServletRequest) LabelUtils(com.salesmanager.shop.utils.LabelUtils) PageInformation(com.salesmanager.shop.model.shop.PageInformation) Nullable(javax.annotation.Nullable) Product(com.salesmanager.core.model.catalog.product.Product) Logger(org.slf4j.Logger) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper) Customer(com.salesmanager.core.model.customer.Customer) MerchantConfig(com.salesmanager.core.model.system.MerchantConfig) HttpServletResponse(javax.servlet.http.HttpServletResponse) MerchantConfigurationService(com.salesmanager.core.business.services.system.MerchantConfigurationService) ReadableCategoryList(com.salesmanager.shop.model.catalog.category.ReadableCategoryList) ContentService(com.salesmanager.core.business.services.content.ContentService) Category(com.salesmanager.core.model.catalog.category.Category) MerchantConfigurationType(com.salesmanager.core.model.system.MerchantConfigurationType) ReadableCategory(com.salesmanager.shop.model.catalog.category.ReadableCategory) ReadableCategoryList(com.salesmanager.shop.model.catalog.category.ReadableCategoryList) ReadableCategoryList(com.salesmanager.shop.model.catalog.category.ReadableCategoryList)

Aggregations

Category (com.salesmanager.core.model.catalog.category.Category)52 Language (com.salesmanager.core.model.reference.language.Language)30 ReadableCategory (com.salesmanager.shop.model.catalog.category.ReadableCategory)28 ArrayList (java.util.ArrayList)28 MerchantStore (com.salesmanager.core.model.merchant.MerchantStore)26 Product (com.salesmanager.core.model.catalog.product.Product)20 ServiceException (com.salesmanager.core.business.exception.ServiceException)15 ProductAttribute (com.salesmanager.core.model.catalog.product.attribute.ProductAttribute)14 ProductAvailability (com.salesmanager.core.model.catalog.product.availability.ProductAvailability)14 ConversionException (com.salesmanager.core.business.exception.ConversionException)13 ProductDescription (com.salesmanager.core.model.catalog.product.description.ProductDescription)13 ResourceNotFoundException (com.salesmanager.shop.store.api.exception.ResourceNotFoundException)13 List (java.util.List)13 Collectors (java.util.stream.Collectors)13 ReadableCategoryPopulator (com.salesmanager.shop.populator.catalog.ReadableCategoryPopulator)12 ServiceRuntimeException (com.salesmanager.shop.store.api.exception.ServiceRuntimeException)12 Validate (org.apache.commons.lang3.Validate)12 Manufacturer (com.salesmanager.core.model.catalog.product.manufacturer.Manufacturer)11 ProductPrice (com.salesmanager.core.model.catalog.product.price.ProductPrice)11 PersistableCategory (com.salesmanager.shop.model.catalog.category.PersistableCategory)11