public String buildChangeLanguageUrl( final RequestData requestData, final Localization localization) throws Exception { return buildDefaultPrefix(requestData) + FoUrls.CHANGE_LANGUAGE.getUrlWithoutWildcard() + "?" + RequestConstants.REQUEST_PARAMETER_LOCALE_CODE + "=" + handleString(localization.getCode()); }
public String buildChangeLanguageUrl(final RequestData requestData) throws Exception { final MarketPlace marketPlace = requestData.getMarketPlace(); final Market market = requestData.getMarket(); final MarketArea marketArea = requestData.getMarketArea(); final Localization localization = requestData.getMarketAreaLocalization(); final Retailer retailer = requestData.getMarketAreaRetailer(); final CurrencyReferential currency = requestData.getMarketAreaCurrency(); String url = buildDefaultPrefix(requestData) + FoUrls.CHANGE_LANGUAGE.getUrlWithoutWildcard() + "?"; url = url + RequestConstants.REQUEST_PARAMETER_MARKET_PLACE_CODE + "=" + replaceSpaceAndUnderscore(marketPlace.getCode()); url = url + "&" + RequestConstants.REQUEST_PARAMETER_MARKET_CODE + "=" + replaceSpaceAndUnderscore(market.getCode()); url = url + "&" + RequestConstants.REQUEST_PARAMETER_MARKET_AREA_CODE + "=" + replaceSpaceAndUnderscore(marketArea.getCode()); url = url + "&" + RequestConstants.REQUEST_PARAMETER_MARKET_AREA_LANGUAGE + "=" + replaceSpaceAndUnderscore(localization.getCode()); url = url + "&" + RequestConstants.REQUEST_PARAMETER_MARKET_AREA_RETAILER_CODE + "=" + replaceSpaceAndUnderscore(retailer.getCode()); url = url + "&" + RequestConstants.REQUEST_PARAMETER_MARKET_AREA_CURRENCY_CODE + "=" + replaceSpaceAndUnderscore(currency.getCode()); return url; }
public String buildChangeContextUrl(final RequestData requestData) throws Exception { final MarketPlace marketPlace = requestData.getMarketPlace(); final Market market = requestData.getMarket(); final MarketArea marketArea = requestData.getMarketArea(); final Localization localization = requestData.getMarketAreaLocalization(); final Retailer retailer = requestData.getMarketAreaRetailer(); String url = buildDefaultPrefix(requestData) + FoUrls.CHANGE_CONTEXT.getUrlWithoutWildcard() + "?"; url = url + RequestConstants.REQUEST_PARAMETER_MARKET_PLACE_CODE + "=" + handleString(marketPlace.getCode()); url = url + "&" + RequestConstants.REQUEST_PARAMETER_MARKET_CODE + "=" + handleString(market.getCode()); url = url + "&" + RequestConstants.REQUEST_PARAMETER_MARKET_AREA_CODE + "=" + handleString(marketArea.getCode()); url = url + "&" + RequestConstants.REQUEST_PARAMETER_MARKET_LANGUAGE + "=" + handleString(localization.getCode()); url = url + "&" + RequestConstants.REQUEST_PARAMETER_RETAILER_CODE + "=" + handleString(retailer.getCode()); return url; }