Package org.hoteia.qalingo.core.domain

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


 
  protected static final String REQUEST_PARAM_OAUTH_VERIFIER = "oauth_verifier";
 
  protected Customer setCommonCustomerInformation(final HttpServletRequest request, final Customer customer) throws Exception {
      final RequestData requestData = requestUtil.getRequestData(request);
      final Market market = requestData.getMarket();
        final MarketArea marketArea = requestData.getMarketArea();
        Customer savedCustomer = webManagementService.buildAndSaveNewCustomer(requestData, market, marketArea, customer);
        return savedCustomer;
  }
View Full Code Here


        try {
            final RequestData requestData = requestUtil.getRequestData(request);
            modelAndView.getModelMap().put(ModelConstants.COMMON_VIEW_BEAN, backofficeViewBeanFactory.buildViewBeanCommon(requestData));
           
            final MarketPlace currentMarketPlace = requestData.getMarketPlace();
            final Market currentMarket = requestData.getMarket();
            final MarketArea currentMarketArea = requestData.getMarketArea();
            final Localization currentLocalization = requestData.getMarketAreaLocalization();
            final User user = requestData.getUser();
            final Company company = requestData.getCompany();
           
            if(user != null){
                modelAndView.getModelMap().put(ModelConstants.AUTHENTICATED_USER_VIEW_BEAN, backofficeViewBeanFactory.buildViewBeanUser(requestData, user));
            }
           
            modelAndView.getModelMap().put(ModelConstants.LEGAl_TERMS_VIEW_BEAN, backofficeViewBeanFactory.buildViewBeanLegalTerms(requestData));
           
            modelAndView.getModelMap().put(ModelConstants.HEADER_CART, backofficeViewBeanFactory.buildViewBeanHeaderCart(requestData));
           
            // ALL MARKETPLACES
            modelAndView.getModelMap().put(ModelConstants.MARKET_PLACES_VIEW_BEAN, backofficeViewBeanFactory.buildListViewBeanMarketPlace(requestData));

            // MARKETS FOR THE CURRENT MARKETPLACE
            Set<Market> marketList = currentMarketPlace.getMarkets();
            modelAndView.getModelMap().put(ModelConstants.MARKETS_VIEW_BEAN, backofficeViewBeanFactory.buildListViewBeanMarket(requestData, currentMarketPlace, new ArrayList<Market>(marketList)));

            // MARKET AREAS FOR THE CURRENT MARKET
            Set<MarketArea> marketAreaList = currentMarket.getMarketAreas();
            modelAndView.getModelMap().put(ModelConstants.MARKET_AREAS_VIEW_BEAN, backofficeViewBeanFactory.buildListViewBeanMarketArea(requestData, currentMarket, new ArrayList<MarketArea>(marketAreaList)));

            // LOCALIZATIONS FOR THE CURRENT MARKET AREA
            modelAndView.getModelMap().put(ModelConstants.MARKET_AREA_LANGUAGES_VIEW_BEAN, backofficeViewBeanFactory.buildListViewBeanLocalizationByMarketArea(requestData, currentLocalization));
View Full Code Here

 
  @RequestMapping(value = FoUrls.PERSONAL_EDIT_URL, method = RequestMethod.POST)
  public ModelAndView submitPersonalEdit(final HttpServletRequest request, @Valid @ModelAttribute("customerEditForm") CustomerEditForm customerEditForm,
                BindingResult result, final Model model) throws Exception {
        final RequestData requestData = requestUtil.getRequestData(request);
        final Market currentMarket = requestData.getMarket();
        final MarketArea currentMarketArea = requestData.getMarketArea();
   
    if (result.hasErrors()) {
      return displayPersonalEdit(request, model, customerEditForm);
    }
View Full Code Here

  @RequestMapping(value = FoUrls.PERSONAL_ADD_ADDRESS_URL, method = RequestMethod.POST)
  public ModelAndView submitCustomerAddAddress(final HttpServletRequest request, @Valid @ModelAttribute("customerAddressForm") CustomerAddressForm customerAddressForm,
                BindingResult result, final Model model) throws Exception {
        final RequestData requestData = requestUtil.getRequestData(request);
        final Market currentMarket = requestData.getMarket();
        final MarketArea currentMarketArea = requestData.getMarketArea();

    if (result.hasErrors()) {
      return displayCustomerAddAddress(request, model, customerAddressForm);
    }
View Full Code Here

  @RequestMapping(value = FoUrls.PERSONAL_EDIT_ADDRESS_URL, method = RequestMethod.POST)
  public ModelAndView submitCustomerEditAddress(final HttpServletRequest request, @Valid @ModelAttribute("customerAddressForm") CustomerAddressForm customerAddressForm,
                          BindingResult result, final Model model) throws Exception {
        final RequestData requestData = requestUtil.getRequestData(request);
        final Market currentMarket = requestData.getMarket();
        final MarketArea currentMarketArea = requestData.getMarketArea();

    if (result.hasErrors()) {
      return displayCustomerEditAddress(request, model, customerAddressForm);
    }
View Full Code Here

  @RequestMapping(value = FoUrls.CUSTOMER_CREATE_ACCOUNT_URL, method = RequestMethod.POST)
  public ModelAndView customerCreateAccount(final HttpServletRequest request, final Model model, @Valid @ModelAttribute(ModelConstants.FRONTOFFICE_CREATE_ACCOUNT_FORM) CreateAccountForm createAccountForm,
                BindingResult result) throws Exception {
        final RequestData requestData = requestUtil.getRequestData(request);
        final Market currentMarket = requestData.getMarket();
        final MarketArea currentMarketArea = requestData.getMarketArea();

    // SANITY CHECK: Customer logged
        final Customer currentCustomer = requestData.getCustomer();
    if(currentCustomer != null){
View Full Code Here

    @RequestMapping(value = FoUrls.CART_CREATE_ACCOUNT_URL, method = RequestMethod.POST)
    public ModelAndView checkoutCreateAccount(final HttpServletRequest request, final Model model, @Valid @ModelAttribute(ModelConstants.FRONTOFFICE_CREATE_ACCOUNT_FORM) CreateAccountForm createAccountForm,
                                BindingResult result) throws Exception {
        final RequestData requestData = requestUtil.getRequestData(request);
        final Market currentMarket = requestData.getMarket();
        final MarketArea currentMarketArea = requestData.getMarketArea();

        // SANITY CHECK: Customer logged
        final Customer currentCustomer = requestData.getCustomer();
        if(currentCustomer != null){
View Full Code Here

            final MarketArea marketArea = requestData.getMarketArea();
            if (marketArea != null && StringUtils.isNotEmpty(marketArea.getTheme())) {
                String themeFolder = marketArea.getTheme();
                requestUtil.updateCurrentTheme(request, themeFolder);
            } else {
                final Market market = requestData.getMarket();
                if (market != null && StringUtils.isNotEmpty(market.getTheme())) {
                    String themeFolder = market.getTheme();
                    requestUtil.updateCurrentTheme(request, themeFolder);
                } else {
                    final MarketPlace marketPlace = requestData.getMarketPlace();
                    if (marketPlace != null && StringUtils.isNotEmpty(marketPlace.getTheme())) {
                        String themeFolder = marketPlace.getTheme();
View Full Code Here

    @Autowired
    protected SecurityUtil securityUtil;
 
  void handleAuthenticationData(final HttpServletRequest request, final OpenIdAuthentication auth) throws Exception {
        final RequestData requestData = requestUtil.getRequestData(request);
        final Market market = requestData.getMarket();
        final MarketArea marketArea = requestData.getMarketArea();

    final String email = auth.getEmail();
    Customer customer = customerService.getCustomerByLoginOrEmail(email);
   
View Full Code Here

    }

    public List<MarketViewBean> buildListViewBeanMarketByMarketPlace(final RequestData requestData, final MarketPlace marketPlace, final List<Market> markets) throws Exception {
        List<MarketViewBean> marketViewBeans = new ArrayList<MarketViewBean>();
        for (Iterator<Market> iteratorMarket = markets.iterator(); iteratorMarket.hasNext();) {
            final Market marketNavigation = (Market) iteratorMarket.next();
            marketViewBeans.add(buildViewBeanMarket(requestData, marketNavigation));
        }
        return marketViewBeans;
    }
View Full Code Here

TOP

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

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.