Package org.hoteia.qalingo.core.domain

Examples of org.hoteia.qalingo.core.domain.DeliveryMethod


                }
            }
        } else if(event.getDestinationObject() instanceof FoDeliveryMethodPojo){
            if(event.getFieldMap().getDestFieldName().equals("code")){
                // INJECT BACKOFFICE URLS
                DeliveryMethod deliveryMethod = (DeliveryMethod) event.getSourceObject();
                FoDeliveryMethodPojo deliveryMethodPojo = (FoDeliveryMethodPojo) event.getDestinationObject();
                try {
                    final RequestData requestData = requestUtil.getRequestData(httpServletRequest);
                    final Cart cart = requestData.getCart();
                   
                    deliveryMethodPojo.setArrivalTime("??");
                    deliveryMethodPojo.setPrice(deliveryMethod.getPrice(cart.getCurrency().getId()));
                    deliveryMethodPojo.setPriceWithStandardCurrencySign(deliveryMethod.getPriceWithStandardCurrencySign(cart.getCurrency().getId()));

                    if(cart != null
                            && cart.getDeliveryMethods().contains(deliveryMethod)){
                        deliveryMethodPojo.setSelected(true);
                    }
View Full Code Here


        return savedWarehouse;
    }

    public DeliveryMethod createOrUpdateDeliveryMethod(DeliveryMethod deliveryMethod, final DeliveryMethodForm deliveryMethodForm) {
        if (deliveryMethod == null) {
            deliveryMethod = new DeliveryMethod();
        }
        if (StringUtils.isNotEmpty(deliveryMethodForm.getCode())) {
            deliveryMethod.setCode(deliveryMethodForm.getCode());
        }
        if (StringUtils.isNotEmpty(deliveryMethodForm.getName())) {
View Full Code Here

                    } else if (param instanceof Warehouse) {
                        Warehouse warehouse = (Warehouse) param;
                        getParams.put(RequestConstants.REQUEST_PARAMETER_WAREHOUSE_CODE, handleParamValue(warehouse.getCode().toString()));
                        break;
                    } else if (param instanceof DeliveryMethod) {
                        DeliveryMethod deliveryMethod = (DeliveryMethod) param;
                        getParams.put(RequestConstants.REQUEST_PARAMETER_DELIVERY_METHOD_CODE, handleParamValue(deliveryMethod.getCode().toString()));
                        break;
                    } else if (param instanceof Tax) {
                        Tax tax = (Tax) param;
                        getParams.put(RequestConstants.REQUEST_PARAMETER_TAX_CODE, handleParamValue(tax.getCode().toString()));
                        break;
View Full Code Here

        model.addAttribute(ModelConstants.URL_BACK, backofficeUrlService.generateUrl(BoUrls.WAREHOUSE_LIST, requestData));
       
        final List<DeliveryMethodViewBean> deliveryMethodViewBeans = new ArrayList<DeliveryMethodViewBean>();
        final List<DeliveryMethod> deliveryMethods = deliveryMethodService.findDeliveryMethodsByWarehouseId(warehouse.getId());
        for (Iterator<DeliveryMethod> iterator = deliveryMethods.iterator(); iterator.hasNext();) {
            DeliveryMethod deliveryMethod = (DeliveryMethod) iterator.next();
            deliveryMethodViewBeans.add(backofficeViewBeanFactory.buildViewBeanDeliveryMethod(requestUtil.getRequestData(request), deliveryMethod));
        }
        request.setAttribute(ModelConstants.DELIVERY_METHODS_VIEW_BEAN, deliveryMethodViewBeans);

        Object[] params = {warehouse.getName() + " (" + warehouse.getCode() + ")"};
View Full Code Here

TOP

Related Classes of org.hoteia.qalingo.core.domain.DeliveryMethod

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.