Package org.hoteia.qalingo.core.pojo

Examples of org.hoteia.qalingo.core.pojo.UrlParameterMapping


   
    /**
     *
     */
    public void handleFrontofficeUrlParameters(final HttpServletRequest request) throws Exception {
        UrlParameterMapping urlParameterMapping = handleUrlParameters(request);
        String marketPlaceCode = urlParameterMapping.getMarketPlaceCode();
        String marketCode = urlParameterMapping.getMarketCode();
        String marketAreaCode = urlParameterMapping.getMarketAreaCode();
        String localizationCode = urlParameterMapping.getLocalizationCode();
        String retailerCode = urlParameterMapping.getRetailerCode();
        String currencyCode = urlParameterMapping.getCurrencyCode();

        EngineEcoSession engineEcoSession = getCurrentEcoSession(request);

        engineEcoSession = checkEngineEcoSession(request);

View Full Code Here


    /**
    *
    */
    public void handleBackofficeUrlParameters(final HttpServletRequest request) throws Exception {
        UrlParameterMapping urlParameterMapping = handleUrlParameters(request);
        String marketPlaceCode = urlParameterMapping.getMarketPlaceCode();
        String marketCode = urlParameterMapping.getMarketCode();
        String marketAreaCode = urlParameterMapping.getMarketAreaCode();
        String localizationCode = urlParameterMapping.getLocalizationCode();
        String retailerCode = urlParameterMapping.getRetailerCode();
        String currencyCode = urlParameterMapping.getCurrencyCode();

        EngineBoSession engineBoSession = getCurrentBoSession(request);

        engineBoSession = checkEngineBoSession(request);
       
View Full Code Here

        return requestData;
    }

    protected UrlParameterMapping handleUrlParameters(final HttpServletRequest request) {
        UrlParameterMapping urlParameterMapping = new UrlParameterMapping();
        String marketPlaceCode = null;
        String marketCode = null;
        String marketAreaCode = null;
        String localizationCode = null;
        String retailerCode = null;
        String currencyCode = null;
        String requestUri = request.getRequestURI();
        requestUri = requestUri.replace(request.getContextPath(), "");
        if (requestUri.startsWith("/")) {
            requestUri = requestUri.substring(1, requestUri.length());
        }
        String[] uriSegments = requestUri.toString().split("/");
        if (uriSegments.length > 4) {
            marketPlaceCode = uriSegments[0];
            marketCode = uriSegments[1];
            marketAreaCode = uriSegments[2];
            localizationCode = uriSegments[3];
            retailerCode = uriSegments[4];
        } else {
            marketPlaceCode = request.getParameter(RequestConstants.REQUEST_PARAMETER_MARKET_PLACE_CODE);
            marketCode = request.getParameter(RequestConstants.REQUEST_PARAMETER_MARKET_CODE);
            marketAreaCode = request.getParameter(RequestConstants.REQUEST_PARAMETER_MARKET_AREA_CODE);
            localizationCode = request.getParameter(RequestConstants.REQUEST_PARAMETER_MARKET_AREA_LANGUAGE);
            retailerCode = request.getParameter(RequestConstants.REQUEST_PARAMETER_MARKET_AREA_RETAILER_CODE);
            currencyCode = request.getParameter(RequestConstants.REQUEST_PARAMETER_MARKET_AREA_CURRENCY_CODE);
        }
       
        urlParameterMapping.setMarketPlaceCode(marketPlaceCode);
        urlParameterMapping.setMarketCode(marketCode);
        urlParameterMapping.setMarketAreaCode(marketAreaCode);
        urlParameterMapping.setLocalizationCode(localizationCode);
        urlParameterMapping.setRetailerCode(retailerCode);
        urlParameterMapping.setCurrencyCode(currencyCode);
       
        return urlParameterMapping;
    }
View Full Code Here

        if(engineEcoSession == null){
            initEcoSession(request);
        }
       
        // STEP 1 - CHECK THE URL PARAMETERS
        UrlParameterMapping urlParameterMapping = handleUrlParameters(request);
        String marketPlaceCode = urlParameterMapping.getMarketPlaceCode();
        if(StringUtils.isNotEmpty(marketPlaceCode)){
            marketPlace = marketService.getMarketPlaceByCode(marketPlaceCode);
            if(marketPlace != null){
                String marketCode = urlParameterMapping.getMarketCode();
                market = marketPlace.getMarket(marketCode);
                if(market != null){
                    String marketAreaCode = urlParameterMapping.getMarketAreaCode();
                    marketArea = market.getMarketArea(marketAreaCode);
                    return marketArea;
                }
            }
        }
View Full Code Here

TOP

Related Classes of org.hoteia.qalingo.core.pojo.UrlParameterMapping

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.