Package org.hoteia.qalingo.core.fetchplan

Examples of org.hoteia.qalingo.core.fetchplan.FetchPlan


        fetchplans.add(new SpecificFetchMode("attributes"));
        fetchplans.add(new SpecificFetchMode("groups"));
        fetchplans.add(new SpecificFetchMode("oauthAccesses"));
        fetchplans.add(new SpecificFetchMode("customerOrderAudit"));

        return new FetchPlan(fetchplans);
    }
View Full Code Here


    }

    public static FetchPlan defaultCustomerGroupFetchPlan() {
        List<SpecificFetchMode> fetchplans = new ArrayList<SpecificFetchMode>();
        fetchplans.add(new SpecificFetchMode("roles"));
        return new FetchPlan(fetchplans);
    }
View Full Code Here

    }
   
    public static FetchPlan defaultUserGroupFetchPlan() {
        List<SpecificFetchMode> fetchplans = new ArrayList<SpecificFetchMode>();
        fetchplans.add(new SpecificFetchMode("roles"));
        return new FetchPlan(fetchplans);
    }
View Full Code Here

  public ModelAndView productMarketingDetails(final HttpServletRequest request, final HttpServletResponse response) throws Exception {
    ModelAndViewThemeDevice modelAndView = new ModelAndViewThemeDevice(getCurrentVelocityPath(request), BoUrls.PRODUCT_MARKETING_DETAILS.getVelocityPage());
    final RequestData requestData = requestUtil.getRequestData(request);
    final String productMarketingCode = request.getParameter(RequestConstants.REQUEST_PARAMETER_PRODUCT_MARKETING_CODE);
   
        final ProductMarketing productMarketing = productService.getProductMarketingByCode(productMarketingCode, new FetchPlan(productMarketingFetchPlans));
        final ProductSku productSku = productMarketing.getDefaultProductSku();
        final List<CatalogCategoryVirtual> catalogCategories = catalogCategoryService.findVirtualCategoriesByProductSkuId(productSku.getId());
       
        final CatalogCategoryVirtual defaultVirtualCatalogCategory = productService.getDefaultVirtualCatalogCategory(productSku, catalogCategories, true);
       
View Full Code Here

   
    final String productMarketingCode = request.getParameter(RequestConstants.REQUEST_PARAMETER_PRODUCT_MARKETING_CODE);

    if(StringUtils.isNotEmpty(productMarketingCode)){
        // EDIT MODE
          final ProductMarketing productMarketing = productService.getProductMarketingByCode(productMarketingCode, new FetchPlan(productMarketingFetchPlans));
          final ProductSku productSku = productMarketing.getDefaultProductSku();
          final List<CatalogCategoryVirtual> catalogCategories = catalogCategoryService.findVirtualCategoriesByProductSkuId(productSku.getId());
          final CatalogCategoryVirtual defaultVirtualCatalogCategory = productService.getDefaultVirtualCatalogCategory(productMarketing, catalogCategories, true);
         
          ProductMarketingViewBean productMarketingViewBean = backofficeViewBeanFactory.buildViewBeanProductMarketing(requestUtil.getRequestData(request), defaultVirtualCatalogCategory, productMarketing, productSku);
View Full Code Here

            return productMarketingEdit(request, model, productMarketingForm);
        }
       
        ProductMarketing productMarketing = null;
        if(StringUtils.isNotEmpty(productMarketingForm.getId())){
            productMarketing = productService.getProductMarketingById(productMarketingForm.getId(), new FetchPlan(productMarketingFetchPlans));
        }

        try {
            // CREATE OR UPDATE WAREHOUSE
            webBackofficeService.createOrUpdateProductMarketing(productMarketing, productMarketingForm);
View Full Code Here

    protected ProductMarketingForm initProductMarketingForm(final HttpServletRequest request, final Model model) throws Exception {
        final RequestData requestData = requestUtil.getRequestData(request);
       
        final String productMarketingCode = request.getParameter(RequestConstants.REQUEST_PARAMETER_PRODUCT_MARKETING_CODE);
        if(StringUtils.isNotEmpty(productMarketingCode)){
            final ProductMarketing productMarketing = productService.getProductMarketingByCode(productMarketingCode, new FetchPlan(productMarketingFetchPlans));
            return backofficeFormFactory.buildProductMarketingForm(requestData, productMarketing);
        }
        return backofficeFormFactory.buildProductMarketingForm(requestData, null);
    }
View Full Code Here

  public ModelAndView productSkuDetails(final HttpServletRequest request, final HttpServletResponse response) throws Exception {
    ModelAndViewThemeDevice modelAndView = new ModelAndViewThemeDevice(getCurrentVelocityPath(request), BoUrls.PRODUCT_SKU_DETAILS.getVelocityPage());
    final RequestData requestData = requestUtil.getRequestData(request);
   
    final String productSkuCode = request.getParameter(RequestConstants.REQUEST_PARAMETER_PRODUCT_SKU_CODE);
    final ProductSku productSku = productService.getProductSkuByCode(productSkuCode, new FetchPlan(productSkuFetchPlans));

        ProductSkuViewBean productSkuViewBean = backofficeViewBeanFactory.buildViewBeanProductSku(requestUtil.getRequestData(request), productSku);
        modelAndView.addObject(ModelConstants.PRODUCT_SKU_VIEW_BEAN, productSkuViewBean);
       
        modelAndView.addObject("availableGlobaleAttributeDefinitions", backofficeViewBeanFactory.buildListViewBeanAttributeDefinition(requestData, attributeService.findProductSkuGlobalAttributeDefinitions()));
View Full Code Here

       
    final String productSkuCode = request.getParameter(RequestConstants.REQUEST_PARAMETER_PRODUCT_SKU_CODE);

        if (StringUtils.isNotEmpty(productSkuCode)) {
            // EDIT MODE
            final ProductSku productSku = productService.getProductSkuByCode(productSkuCode, new FetchPlan(productSkuFetchPlans));
            ProductSkuViewBean productSkuViewBean = backofficeViewBeanFactory.buildViewBeanProductSku(requestUtil.getRequestData(request), productSku);
            modelAndView.addObject(ModelConstants.PRODUCT_SKU_VIEW_BEAN, productSkuViewBean);

            modelAndView.addObject(ModelConstants.URL_BACK, backofficeUrlService.generateUrl(BoUrls.PRODUCT_SKU_DETAILS, requestData, productSku));

            Object[] params = { productSku.getName() + " (" + productSku.getCode() + ")" };
            overrideDefaultSeoPageTitleAndMainContentTitle(request, modelAndView, BoUrls.PRODUCT_SKU_EDIT.getKey(), params);

        } else {
            // ADD/CREATE MODE
            final String productMarketingCode = request.getParameter(RequestConstants.REQUEST_PARAMETER_PRODUCT_MARKETING_CODE);
            if (StringUtils.isNotEmpty(productMarketingCode)) {
                final ProductMarketing productMarketing = productService.getProductMarketingByCode(productMarketingCode, new FetchPlan(productMarketingFetchPlans));
               
                modelAndView.addObject(ModelConstants.URL_BACK, backofficeUrlService.generateUrl(BoUrls.PRODUCT_MARKETING_DETAILS, requestData, productMarketing));

                Object[] params = { "New Sku" };
                overrideDefaultSeoPageTitleAndMainContentTitle(request, modelAndView, BoUrls.PRODUCT_SKU_EDIT.getKey(), params);
View Full Code Here

            return productSkuEdit(request, model, productSkuForm);
        }
       
        ProductSku productSku = null;
        if(StringUtils.isNotEmpty(productSkuForm.getId())){
            productSku = productService.getProductSkuById(productSkuForm.getId(), new FetchPlan(productSkuFetchPlans));
        }

        try {
            // CREATE OR UPDATE WAREHOUSE
            ProductSku savedProductSku = webBackofficeService.createOrUpdateProductSku(productSku, productSkuForm);
View Full Code Here

TOP

Related Classes of org.hoteia.qalingo.core.fetchplan.FetchPlan

Copyright © 2018 www.massapicom. 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.