Package org.hoteia.qalingo.core.domain

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


      addInfoMessage(request, getSpecificMessage(ScopeWebMessage.RETAILER, "comment_form_empty_warning_message",  locale));
      return displayRetailerCommentForm(request, retailerCode, model, retailerCommentForm);
    }
   
    final Retailer retailer = retailerService.getRetailerByCode(currentMarketArea.getId(), currentRetailer.getId(), retailerCode);
    final Customer customer = requestData.getCustomer();
   
    if (qualityOfService != 0) {
      RetailerCustomerRate retailerCustomerRate = new RetailerCustomerRate();
      retailerCustomerRate.setRate(qualityOfService);
      retailerCustomerRate.setRetailerId(retailer.getId());
      retailerCustomerRate.setCustomerId(customer.getId());
      retailerCustomerRate.setType("QUALITY_OF_SERVICE");
      retailerService.saveOrUpdateRetailerCustomerRate(retailerCustomerRate);
    }
   
    if (ratioQualityPrice != 0) {
      RetailerCustomerRate retailerCustomerRate = new RetailerCustomerRate();
      retailerCustomerRate.setRate(ratioQualityPrice);
      retailerCustomerRate.setRetailerId(retailer.getId());
      retailerCustomerRate.setCustomerId(customer.getId());
      retailerCustomerRate.setType("RATIO_QUALITY_PRICE");
      retailerService.saveOrUpdateRetailerCustomerRate(retailerCustomerRate);
    }
   
    if (priceScore != 0) {
      RetailerCustomerRate retailerCustomerRate = new RetailerCustomerRate();
      retailerCustomerRate.setRate(priceScore);
      retailerCustomerRate.setRetailerId(retailer.getId());
      retailerCustomerRate.setCustomerId(customer.getId());
      retailerCustomerRate.setType("PRICE_SCORE");
      retailerService.saveOrUpdateRetailerCustomerRate(retailerCustomerRate);
    }
   
    if (StringUtils.isNotEmpty(retailerCommentForm.getComment())) {
View Full Code Here


   
    final List<CustomerViewBean> customerViewBeans = new ArrayList<CustomerViewBean>();

    final List<Customer> customers = customerService.findCustomers();
    for (Iterator<Customer> iterator = customers.iterator(); iterator.hasNext();) {
      Customer customer = (Customer) iterator.next();
      customerViewBeans.add(backofficeViewBeanFactory.buildViewBeanCustomer(requestUtil.getRequestData(request), customer));
    }
    customerViewBeanPagedListHolder = new PagedListHolder<CustomerViewBean>(customerViewBeans);
    customerViewBeanPagedListHolder.setPageSize(Constants.PAGE_SIZE);
        request.getSession().setAttribute(sessionKey, customerViewBeanPagedListHolder);
View Full Code Here

    @ModelAttribute(ModelConstants.BILLING_ADDRESSES_VIEW_BEAN)
    public List<CustomerAddressViewBean> getBillingAddresses(HttpServletRequest request) {
        List<CustomerAddressViewBean> addressesValues = new ArrayList<CustomerAddressViewBean>();
        try {
            final RequestData requestData = requestUtil.getRequestData(request);
            final Customer customer = requestData.getCustomer();
            Set<CustomerAddress> addresses = customer.getAddresses();
            for (Iterator<CustomerAddress> iterator = addresses.iterator(); iterator.hasNext();) {
                final CustomerAddress customerAddress = (CustomerAddress) iterator.next();
                addressesValues.add(frontofficeViewBeanFactory.buildViewBeanCustomeAddress(requestData, customerAddress));
            }
View Full Code Here

    @ModelAttribute(ModelConstants.SHIPPING_ADDRESSES_VIEW_BEAN)
    public List<CustomerAddressViewBean> getshippingAddresses(HttpServletRequest request) {
        List<CustomerAddressViewBean> addressesValues = new ArrayList<CustomerAddressViewBean>();
        try {
            final RequestData requestData = requestUtil.getRequestData(request);
            final Customer customer = requestData.getCustomer();
            Set<CustomerAddress> addresses = customer.getAddresses();
            for (Iterator<CustomerAddress> iterator = addresses.iterator(); iterator.hasNext();) {
                final CustomerAddress customerAddress = (CustomerAddress) iterator.next();
                addressesValues.add(frontofficeViewBeanFactory.buildViewBeanCustomeAddress(requestData, customerAddress));
            }
View Full Code Here

    public void onAuthenticationSuccess(HttpServletRequest request, HttpServletResponse response, Authentication authentication) throws IOException, ServletException {

        try {
            final RequestData requestData = requestUtil.getRequestData(request);
            // CUSTOMER
            Customer customer = customerService.getCustomerByLoginOrEmail(authentication.getName());

            // Persit the new CustomerConnectionLog
            CustomerConnectionLog customerConnectionLog = new CustomerConnectionLog();
            customerConnectionLog.setCustomerId(customer.getId());
            customerConnectionLog.setLoginDate(new Date());
            customerConnectionLog.setAppCode(Constants.APP_NAME_FO_MCOMMERCE_CODE);
            customerConnectionLog.setHost(request.getRemoteHost());
            customerConnectionLog.setAddress(requestUtil.getRemoteAddr(request));
            customer.getConnectionLogs().add(customerConnectionLog);
            customerConnectionLogService.saveOrUpdateCustomerConnectionLog(customerConnectionLog);

            requestUtil.updateCurrentCustomer(request, customer);

            // UPDATE CART WITH THE CUSTOMER INFORMATIONS
View Full Code Here

TOP

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

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.