Package org.hoteia.qalingo.core.domain

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


    @Before
    public void setUp() throws Exception {
        marketArea = new MarketArea();
        marketArea.setId(new Long("1"));
       
        customer = new Customer();
        customer.setId(Long.parseLong("21"));
        customer.setFirstname("vivek");
        customer.setEmail("vivek@gmail.com");
        customer.setGender("mail");
        customer.setTitle("customer details");
View Full Code Here


           
            final MarketPlace currentMarketPlace = requestData.getMarketPlace();
            final Market currentMarket = requestData.getMarket();
            final MarketArea currentMarketArea = requestData.getMarketArea();
            final Localization currentLocalization = requestData.getMarketAreaLocalization();
            final Customer customer = requestData.getCustomer();
            if(customer != null){
                modelAndView.getModelMap().put(ModelConstants.CUSTOMER_VIEW_BEAN, frontofficeViewBeanFactory.buildViewBeanCustomer(requestData, customer));
            }
           
            modelAndView.getModelMap().put(ModelConstants.LEGAl_TERMS_VIEW_BEAN, frontofficeViewBeanFactory.buildViewBeanLegalTerms(requestData));
View Full Code Here

        if (!(authentication instanceof AnonymousAuthenticationToken)) {
            String currentCustomerName = authentication.getName();
           
            if(StringUtils.isNotEmpty(currentCustomerName)){
                if(StringUtils.isNotEmpty(wishlistPojoRequest.getMarketAreaCode())){
                    Customer customer = customerService.getCustomerByLoginOrEmail(currentCustomerName);
                    MarketArea marketArea = marketService.getMarketAreaByCode(wishlistPojoRequest.getMarketAreaCode());
                    List<CustomerWishlistPojo> wishlists = customerPojoService.getWishlist(customer, marketArea);
                    wishlistPojoResponse.setWishlists(wishlists);
                    return wishlistPojoResponse;
                   
View Full Code Here

        Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
        if (!(authentication instanceof AnonymousAuthenticationToken)) {
            String currentCustomerName = authentication.getName();
           
            if(StringUtils.isNotEmpty(currentCustomerName)){
                Customer customer = customerService.getCustomerByLoginOrEmail(currentCustomerName);
               
                if(StringUtils.isNotEmpty(addToWishlistPojoRequest.getMarketAreaCode())){
                    MarketArea marketArea = marketService.getMarketAreaByCode(addToWishlistPojoRequest.getMarketAreaCode());
                    String catalogCategoryCode = addToWishlistPojoRequest.getCatalogCategoryCode();
                    String productSkuCode = addToWishlistPojoRequest.getProductSkuCode();
View Full Code Here

        Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
        if (!(authentication instanceof AnonymousAuthenticationToken)) {
            String currentCustomerName = authentication.getName();
           
            if(StringUtils.isNotEmpty(currentCustomerName)){
                Customer customer = customerService.getCustomerByLoginOrEmail(currentCustomerName);
                MarketArea marketArea = marketService.getMarketAreaByCode(checkoutProcessPojoRequest.getMarketAreaCode());
               
                if(checkoutProcessPojoRequest.getPaymentPojo().isWantSavedPaymentInformations()){
                    // Save payment information
                    final CustomerPaymentInformation customerPaymentInformation = new CustomerPaymentInformation();
                    customerPaymentInformation.setPaymentType(checkoutProcessPojoRequest.getPaymentPojo().getPaymentType());
                    customerPaymentInformation.setCardHolderName(checkoutProcessPojoRequest.getPaymentPojo().getCardHolderName());
                    customerPaymentInformation.setCardNumber(checkoutProcessPojoRequest.getPaymentPojo().getCardNumber());
                    customerPaymentInformation.setCardExpMonth(checkoutProcessPojoRequest.getPaymentPojo().getCardExpMonth());
                    customerPaymentInformation.setCardExpYear(checkoutProcessPojoRequest.getPaymentPojo().getCardExpYear());
                    customerPaymentInformation.setCardCVV(checkoutProcessPojoRequest.getPaymentPojo().getCardCVV());
                   
                    customerPaymentInformation.setCustomerMarketAreaId(marketArea.getId());
                   
                    customerService.savePaymentInformation(customer, customerPaymentInformation);
                }

                Cart cart = cartService.getCartByMarketAreaIdAndCustomerId(marketArea.getId(), customer.getId());
               
                // Create and Save a new order
                checkoutService.checkout(customer, cart);
               
                // WebManagementService.buildAndSaveNewOrderConfirmationMail
View Full Code Here

        logger.debug("Found {} customers", customers.size());
        return PojoUtil.mapAll(dozerBeanMapper, customers, CustomerPojo.class);
    }

    public CustomerPojo getCustomerById(final String id) {
        Customer customer = customerService.getCustomerById(id);
        logger.debug("Found customer {} for id {}", customer, id);
        return customer == null ? null : dozerBeanMapper.map(customer, CustomerPojo.class);
    }
View Full Code Here

        logger.debug("Found customer {} for id {}", customer, id);
        return customer == null ? null : dozerBeanMapper.map(customer, CustomerPojo.class);
    }
   
    public CustomerPojo getCustomerByLoginOrEmail(final String usernameOrEmail) {
        Customer customer = customerService.getCustomerByLoginOrEmail(usernameOrEmail);
        logger.debug("Found customer {} for usernameOrEmail {}", customer, usernameOrEmail);
        return customer == null ? null : dozerBeanMapper.map(customer, CustomerPojo.class);
    }
View Full Code Here

        logger.debug("Found customer {} for usernameOrEmail {}", customer, usernameOrEmail);
        return customer == null ? null : dozerBeanMapper.map(customer, CustomerPojo.class);
    }

    public CustomerPojo getCustomerByPermalink(final String permalink) {
        Customer customer = customerService.getCustomerByPermalink(permalink);
        logger.debug("Found customer {} for usernameOrEmail {}", customer, permalink);
        return customer == null ? null : dozerBeanMapper.map(customer, CustomerPojo.class);
    }
View Full Code Here

        return customer == null ? null : dozerBeanMapper.map(customer, CustomerPojo.class);
    }
   
    @Transactional
    public void saveOrUpdate(final CustomerPojo customerJsonPojo) throws Exception {
        Customer customer = dozerBeanMapper.map(customerJsonPojo, Customer.class);
        logger.info("Saving customer {}", customer);
        customerService.saveOrUpdateCustomer(customer);
    }
View Full Code Here

        Criteria criteria = createDefaultCriteria(Customer.class);
       
        FetchPlan fetchPlan = handleSpecificFetchMode(criteria, params);

        criteria.add(Restrictions.eq("id", customerId));
        Customer customer = (Customer) criteria.uniqueResult();
        if(customer != null){
            customer.setFetchPlan(fetchPlan);
        }
        return customer;
  }
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.