Examples of BoCatalogCategoryPojo


Examples of org.hoteia.qalingo.core.pojo.catalog.BoCatalogCategoryPojo

                }
            }
        } else if(event.getDestinationObject() instanceof BoCatalogCategoryPojo){
            if(event.getFieldMap().getDestFieldName().equals("id")){
                // INJECT BACKOFFICE URLS
                BoCatalogCategoryPojo catalogCategoryPojo = (BoCatalogCategoryPojo) event.getDestinationObject();
                try {
                    RequestData requestData = requestUtil.getRequestData(httpServletRequest);
                   
                    Map<String, String> getParams = new HashMap<String, String>();
                    if(event.getSourceObject() instanceof CatalogCategoryMaster){
                        catalogCategoryPojo.setDetailsUrl(backofficeUrlService.generateUrl(BoUrls.MASTER_CATEGORY_DETAILS, requestData, (CatalogCategoryMaster) event.getSourceObject()));
                        catalogCategoryPojo.setEditUrl(backofficeUrlService.generateUrl(BoUrls.MASTER_CATEGORY_EDIT, requestData, (CatalogCategoryMaster) event.getSourceObject()));
                        getParams.put(RequestConstants.REQUEST_PARAMETER_PARENT_CATALOG_CATEGORY_CODE, ((CatalogCategoryMaster) event.getSourceObject()).getCode());
                        catalogCategoryPojo.setAddChildCategoryUrl(backofficeUrlService.generateUrl(BoUrls.MASTER_CATEGORY_ADD, requestData, getParams));
                       
                    } else if(event.getSourceObject() instanceof CatalogCategoryVirtual){
                        catalogCategoryPojo.setDetailsUrl(backofficeUrlService.generateUrl(BoUrls.VIRTUAL_CATEGORY_DETAILS, requestData, (CatalogCategoryVirtual) event.getSourceObject()));
                        catalogCategoryPojo.setEditUrl(backofficeUrlService.generateUrl(BoUrls.VIRTUAL_CATEGORY_EDIT, requestData, (CatalogCategoryVirtual) event.getSourceObject()));
                        getParams.put(RequestConstants.REQUEST_PARAMETER_PARENT_CATALOG_CATEGORY_CODE, ((CatalogCategoryVirtual) event.getSourceObject()).getCode());
                        catalogCategoryPojo.setAddChildCategoryUrl(backofficeUrlService.generateUrl(BoUrls.VIRTUAL_CATEGORY_ADD, requestData, getParams));
                       
                    }
                } catch (Exception e) {
                    logger.error("postWritingDestinationValue error with BoCatalogCategoryPojo", e);
                }
View Full Code Here

Examples of org.hoteia.qalingo.core.pojo.catalog.BoCatalogCategoryPojo

public class CatalogCategoryCustomBeanFactory implements BeanFactory  {

    @Override
    public Object createBean(Object source, Class<?> sourceClass, String targetBeanId) {
        return new BoCatalogCategoryPojo();
    }
View Full Code Here

Examples of org.hoteia.qalingo.core.pojo.catalog.BoCatalogCategoryPojo

    public BoCatalogCategoryPojo getProductListByCategory(final HttpServletRequest request, final HttpServletResponse response) throws Exception {
        final RequestData requestData = requestUtil.getRequestData(request);
        final String categoryCode = request.getParameter(RequestConstants.REQUEST_PARAMETER_CATALOG_CATEGORY_CODE);
        final String catalogType = request.getParameter(RequestConstants.REQUEST_PARAMETER_CATALOG_TYPE);

        BoCatalogCategoryPojo catalogCategoryPojo = new BoCatalogCategoryPojo();
        if("master".equals(catalogType)){
            FetchPlan fetchPlanWithProducts = new FetchPlan(categoryMasterFetchPlans);
            fetchPlanWithProducts.getFetchModes().add(new SpecificFetchMode(CatalogCategoryVirtual_.catalogCategoryProductSkuRels.getName()));
            fetchPlanWithProducts.getFetchModes().add(new SpecificFetchMode("catalogCategoryProductSkuRels.pk.productSku"));
            fetchPlanWithProducts.getFetchModes().add(new SpecificFetchMode(CatalogCategoryVirtual_.assets.getName()));
           
            CatalogCategoryMaster reloadedCategory = catalogCategoryService.getMasterCatalogCategoryByCode(categoryCode, requestData.getMasterCatalogCode(), fetchPlanWithProducts);
            catalogCategoryPojo = (BoCatalogCategoryPojo) catalogPojoService.buildCatalogCategory(reloadedCategory);
            final List<ProductSku> productSkus = reloadedCategory.getSortedProductSkus();
            catalogCategoryPojo.setProductMarketings(buildSortedProduct(productSkus));
           
        } else if("virtual".equals(catalogType)){
            FetchPlan fetchPlanWithProducts = new FetchPlan(categoryVirtualFetchPlans);
            fetchPlanWithProducts.getFetchModes().add(new SpecificFetchMode(CatalogCategoryVirtual_.catalogCategoryProductSkuRels.getName()));
            fetchPlanWithProducts.getFetchModes().add(new SpecificFetchMode(CatalogCategoryVirtual_.catalogCategoryProductSkuRels.getName() + "." + CatalogCategoryVirtualProductSkuRel_.pk.getName() "." + org.hoteia.qalingo.core.domain.CatalogCategoryVirtualProductSkuPk_.productSku.getName()));

            CatalogCategoryVirtual reloadedCategory = catalogCategoryService.getVirtualCatalogCategoryByCode(categoryCode, requestData.getVirtualCatalogCode(), requestData.getMasterCatalogCode(), fetchPlanWithProducts);
            catalogCategoryPojo = (BoCatalogCategoryPojo) catalogPojoService.buildCatalogCategory(reloadedCategory);
            final List<ProductSku> productSkus = reloadedCategory.getSortedProductSkus();
            catalogCategoryPojo.setProductMarketings(buildSortedProduct(productSkus));
        }
        return catalogCategoryPojo;
    }
View Full Code Here

Examples of org.hoteia.qalingo.core.pojo.catalog.BoCatalogCategoryPojo

    public BoCatalogCategoryPojo getProductListForCategory(final HttpServletRequest request, final HttpServletResponse response) throws Exception {
        final RequestData requestData = requestUtil.getRequestData(request);
        final String categoryCode = request.getParameter(RequestConstants.REQUEST_PARAMETER_CATALOG_CATEGORY_CODE);
        final String catalogType = request.getParameter(RequestConstants.REQUEST_PARAMETER_CATALOG_TYPE);

        BoCatalogCategoryPojo catalogCategoryPojo = new BoCatalogCategoryPojo();
        if("master".equals(catalogType)){
            CatalogCategoryMaster reloadedCategory = catalogCategoryService.getMasterCatalogCategoryByCode(categoryCode, requestData.getMasterCatalogCode(), new FetchPlan(categoryMasterFetchPlans));
            catalogCategoryPojo = (BoCatalogCategoryPojo) catalogPojoService.buildCatalogCategory(reloadedCategory);
           
            List<ProductSku> productSkus = productService.findProductSkusNotInThisMasterCatalogCategoryId(reloadedCategory.getId(), new FetchPlan(productSkuFetchPlans));
            catalogCategoryPojo.setProductMarketings(buildSortedProduct(productSkus));
           
        } else if("virtual".equals(catalogType)){
            CatalogCategoryVirtual reloadedCategory = catalogCategoryService.getVirtualCatalogCategoryByCode(categoryCode, requestData.getVirtualCatalogCode(), requestData.getMasterCatalogCode(), new FetchPlan(categoryVirtualFetchPlans));
            catalogCategoryPojo = (BoCatalogCategoryPojo) catalogPojoService.buildCatalogCategory(reloadedCategory);
           
            List<ProductSku> productSkus = productService.findProductSkusNotInThisVirtualCatalogCategoryId(reloadedCategory.getId(), new FetchPlan(productSkuFetchPlans));
            catalogCategoryPojo.setProductMarketings(buildSortedProduct(productSkus));
        }
        return catalogCategoryPojo;
    }
View Full Code Here

Examples of org.hoteia.qalingo.core.pojo.catalog.BoCatalogCategoryPojo

        final RequestData requestData = requestUtil.getRequestData(request);
        final String categoryCode = request.getParameter(RequestConstants.REQUEST_PARAMETER_CATALOG_CATEGORY_CODE);
        final String catalogType = request.getParameter(RequestConstants.REQUEST_PARAMETER_CATALOG_TYPE);
        final String skuCodes = request.getParameter(RequestConstants.REQUEST_PARAMETER_SKU_CODE_LIST);

        BoCatalogCategoryPojo catalogCategoryPojo = new BoCatalogCategoryPojo();

        if("master".equals(catalogType)){
            CatalogCategoryMaster reloadedCategory = catalogCategoryService.getMasterCatalogCategoryByCode(categoryCode, requestData.getMasterCatalogCode(), new FetchPlan(categoryMasterFetchPlans));
           
            if(StringUtils.isNotEmpty(skuCodes)){
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.