Examples of ProductMarketingPojo


Examples of org.hoteia.qalingo.core.pojo.product.ProductMarketingPojo

    @Path("virtual/{catalogCode}/category/{categoryCode}/product/{productCode}")
    @Produces(MediaType.APPLICATION_JSON)
    public ProductPojoResponse productMarketingDetails(@PathParam("catalogCode") final String catalogCode, @PathParam("categoryCode") final String categoryCode,
                                                       @PathParam("productCode") final String productCode) {
        ProductPojoResponse productPojoResponse = new ProductPojoResponse();
        ProductMarketingPojo product = catalogService.getProductMarketing(productCode);
        productPojoResponse.setProductMarketing(product);
        return productPojoResponse;
    }
View Full Code Here

Examples of org.hoteia.qalingo.core.pojo.product.ProductMarketingPojo

            for (Iterator<CatalogCategoryPojo> iterator = categories.iterator(); iterator.hasNext();) {
                CatalogCategoryPojo catalogCategoryPojo = (CatalogCategoryPojo) iterator.next();
                if(catalogCategoryPojo.getCode().equals(categoryCode)){
                    List<ProductMarketingPojo> products = catalogCategoryPojo.getProductMarketings();
                    for (Iterator<ProductMarketingPojo> iteratorProductMarketingPojo = products.iterator(); iteratorProductMarketingPojo.hasNext();) {
                        ProductMarketingPojo productMarketingPojo = (ProductMarketingPojo) iteratorProductMarketingPojo.next();
                        productMarketingPojo.setProductBrand(null);
                        productMarketingPojo.setProductMarketingMarketAreaAttributes(null);
                        productMarketingPojo.setProductMarketingGlobalAttributes(null);
                        productMarketingPojo.setProductSkus(null);
                        productMarketingPojo.setProductAssociationLinks(null);
                    }
                    cmsProducts.setProductMarketings(products);
                }
            }
View Full Code Here

Examples of org.hoteia.qalingo.core.pojo.product.ProductMarketingPojo

            for (Iterator<CatalogCategoryPojo> iterator = categories.iterator(); iterator.hasNext();) {
                CatalogCategoryPojo catalogCategoryPojo = (CatalogCategoryPojo) iterator.next();
                if(catalogCategoryPojo.getCode().equals(categoryCode)){
                    List<ProductMarketingPojo> products = catalogCategoryPojo.getProductMarketings();
                    for (Iterator<ProductMarketingPojo> iteratorProductMarketingPojo = products.iterator(); iteratorProductMarketingPojo.hasNext();) {
                        ProductMarketingPojo productMarketingPojo = (ProductMarketingPojo) iteratorProductMarketingPojo.next();
                        productMarketingPojo.setProductBrand(null);
                        productMarketingPojo.setProductMarketingMarketAreaAttributes(null);
                        productMarketingPojo.setProductMarketingGlobalAttributes(null);
                        productMarketingPojo.setProductSkus(null);
                        productMarketingPojo.setProductAssociationLinks(null);
                    }
                    cmsProducts.setProductMarketings(products);
                }
            }
View Full Code Here

Examples of org.hoteia.qalingo.core.pojo.product.ProductMarketingPojo

        final ProductMarketing productMarketing = productService.getProductMarketingByCode(productMarketingCode);
        return buildProductMarketing(productMarketing);
    }
   
    public ProductMarketingPojo buildProductMarketing(final ProductMarketing productMarketing) {
        final ProductMarketingPojo productMarketingPojo = dozerBeanMapper.map(productMarketing, ProductMarketingPojo.class);
        logger.debug("Load {} product marketing", productMarketing.getCode());
        return productMarketingPojo;
    }
View Full Code Here

Examples of org.hoteia.qalingo.core.pojo.product.ProductMarketingPojo

        Map<String, ProductMarketingPojo> productMarketingMap = new HashMap<String, ProductMarketingPojo>();
        for (Iterator<ProductSku> iteratorProductSku = productSkus.iterator(); iteratorProductSku.hasNext();) {
            final ProductSku productSku = (ProductSku) iteratorProductSku.next();
            final ProductSku reloadedProductSku = productService.getProductSkuByCode(productSku.getCode(), new FetchPlan(productSkuFetchPlans));
            final ProductMarketing reloadedProductMarketing = productService.getProductMarketingById(reloadedProductSku.getProductMarketing().getId(), new FetchPlan(productMarketingFetchPlans));
            ProductMarketingPojo productMarketingPojo = catalogPojoService.buildProductMarketing(reloadedProductMarketing);
           
            // CLEAN NOT AVAILABLE SKU
            List<ProductSkuPojo> productSkuPojos = new ArrayList<ProductSkuPojo>(productMarketingPojo.getProductSkus());
            for (Iterator<ProductSkuPojo> iterator = productSkuPojos.iterator(); iterator.hasNext();) {
                ProductSkuPojo productSkuPojo = (ProductSkuPojo) iterator.next();
                if(!productSkuIds.contains(productSkuPojo.getId())){
                    productMarketingPojo.getProductSkus().remove(productSkuPojo);
                }
            }
            productMarketingMap.put(productMarketingPojo.getCode(), productMarketingPojo);
        }
       
        List<ProductMarketingPojo> sortedProductMarketings = new LinkedList<ProductMarketingPojo>(productMarketingMap.values());
        Collections.sort(sortedProductMarketings, new Comparator<ProductMarketingPojo>() {
            @Override
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.